Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Trying to get maven plugin working with m2e

You can see how m2e "maps" your plugin execution to Eclipse workspace
build in project properties, under Maven, Lifecycle Mapping. Check that
it says mapping=execute and source=maven-plugin there. You can also
enable debug log and see if m2e logs anything interesting in
.metadata/.plugins/org.eclipse.m2e.logback.configuration/.

Beware that there is generally no good way to integrate maven plugin
execution in Eclipse workspace build. BuildContext you are trying to use
does not clean obsolete generated files in some cases. There is also
takari incrementalbuild library, which is very difficult to use
correctly.

[6] https://github.com/takari/io.takari.incrementalbuild

-- 
Regards,
Igor

On Tue, Oct 4, 2016, at 10:47 AM, Mike Samuel wrote:
> I'm having trouble getting m2e to invoke my maven code generating
> plugin[1].
> 
> I've rewritten it to use BuildContext per [2] and I set up the
> lifecycle-mapping-metadata.xml [3].
> 
> With that, Eclipse complains about a demo project that includes the
> plugin when I install a snapshot with syntax errors in the XML, so it
> seems to be found, and I've got enough logging to see that m2e is
> kicking off the maven-resources-plugin when a change a text file in
> Eclipse, but my plugin doesn't seem to be invoked even though it works
> fine from the command line.
> 
> [4] references a plugin.xml, "The follow extension in plugin.xml
> registers ANTLR project configurator with m2e," but I can't find where
> that's supposed to go.  I see [5] but I'm not writing an
> eclipse-plugin -- just piggybacking off m2e.
> 
> Can someone take a look or is there a minimal project template that
> shows how to integrate these things?  I trawled through the ANTLR4
> plugin and found a lot of helpful stuff but haven't gotten things
> wired up right yet.
> 
> thanks, mike
> 
> 
> [1] - https://github.com/mikesamuel/closure-maven-plugin
> [2] -
> https://www.eclipse.org/m2e/documentation/m2e-making-maven-plugins-compat.html
> [3] -
> https://github.com/mikesamuel/closure-maven-plugin/blob/master/plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
> [4] -
> https://eclipse.org/m2e/documentation/m2e-extension-development.html
> [5] -
> https://wiki.eclipse.org/FAQ_What_is_the_plug-in_manifest_file_(plugin.xml)%3F
> _______________________________________________
> m2e-users mailing list
> m2e-users@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/m2e-users


Back to the top