[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] m2e and AbstractMavenLifecycleParticipants

m2e does not directly execute Maven build lifecycle, so
AbstractMavenLifecycleParticipant will not be called be default, at
least I do not believe it will.

Have a look at ILifecycleMapping2 and AbstractMavenDependencyResolver.
AbstractMavenDependencyResolver.resolveProjectDependencies is called
right after m2e read MavenProject instance and I think it can be used to
execute AbstractMavenLifecycleParticipant.afterProjectsRead.


On 11-11-30 1:00 AM, Christopher Hunt wrote:
Hi there,

I've written a Maven Extension that defines a new packaging type of "js" for JavaScript projects (1). It is unclear to me how I can inform m2e 1.0.100 that this extension needs to be run so that the m2e project can pick up on the configuration it applies.

in summary the extension implements Maven's org.apache.maven.AbstractMavenLifecycleParticipant and afterProjectsRead method (2). It performs the following configurations for js projects:

1. Plugin configuration
2. Adds in common dependencies
3. Adds resource folders
4. Configures the main artifact and attachments

Thanks for your guidance.

Kind regards,

(1) http://svn.codehaus.org/mojo/branches/javascript-maven-tools-proposal/
(2) http://svn.codehaus.org/mojo/branches/javascript-maven-tools-proposal/javascript-maven-plugin/src/main/java/org/codehaus/mojo/javascript/Configurer.java
m2e-dev mailing list