Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-dev] how to listen to local maven repo's changes?

Hi, All,
    As I mentioned below, I'm trying to listen to local repo's changes by m2e.
As igor suggested, I'm using ILocalRepositoryListener.
   It works great, when download artifacts from remote repo.

but if I tried to install my project into local repo(I'm using Maven install in eclipse to install my artifact), that listener won't be invoked.
is it correct? 

Of course, I haven't upload my project to remote maven repo yet.
From comments of LocalRepositoryMaintainer, artifactInstalled should be fired when addition of an artifact to the local repo by a local build.

Regards
Simon

2011/9/14 Igor Fedorenko <igor@xxxxxxxxxxxxxx>
m2e provides org.eclipse.m2e.core.embedder.ILocalRepositoryListener.

Please direct any further questions to m2e-dev@xxxxxxxxxxx as this list
is about developing maven itself.

--
Regards,
Igor


On 11-09-14 2:54 AM, Wang YunFeng wrote:
Thanks lgor, RespositoryListener is what I'm looking for!

*I'm trying to get maven session from m2eclipse*, and then I could add my
own repo listener into session.
but I haven't found right API to get maven session.
Do you have any suggestions?

*what I'm trying to do is:*
create a eclipse plugin to listen to local repo's changes. I think it should
work with m2eclipse,
new plugin should get m2eclipse's maven session and then add its own repo
listener into it.
Am I correct?

Regards
Simon

2011/9/14 Igor Fedorenko<igor@xxxxxxxxxxxxxx>

Have a look at org.sonatype.aether.**RepositoryListener, this is what we
use in m2e to track changes to the local repository. This, of course,
does not receive events from builds running concurrently in other vms,
but I don't have a solution for that.

--
Regards,
Igor


On 11-09-13 8:46 PM, Wang YunFeng wrote:

Hi, All,

I want to listen to changes of local maven repo.
Then I could invoke some customized script. My question is: is there any
hook for maven to listen to whether maven is downloading new artifactsfrom
remote repo?

Regards
Simon


------------------------------**------------------------------**---------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.**org<dev-unsubscribe@maven.apache.org>

For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxx




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxx




Back to the top