Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Reading a plugin's configuration during project configuration



On 11-10-28 2:42 PM, Ian Robertson wrote:

One other piece of advice: in your lifecycle-mapping-metadata.xml file,
you'll probably want to map your configurator to the
maven-compiler-plugin mojo, so that the eclipse project buildpath is
already set up when your configurator runs. In your plugin.xml, you'll
want your configurator marked as
secondaryTo="org.eclipse.m2e.jdt.javaConfigurator". Finally, in
lifecycle-mapping-metadata.xml, also map the maven plugin you're
actually interested in to <action><ignore/></action>.


This actually is not recommended and should not be necessary for most
project configurators. For java code generation it should be enough to
extend o.e.m.j.AbstractJavaProjectConfigurator or
implement IJavaProjectConfigurator. See antlr support for example.

[1] https://github.com/sonatype/m2eclipse-extras/tree/master/org.sonatype.m2e.antlr/src/org/sonatype/m2e/antlr/internal

--
Regards,
Igor


Back to the top