Thanks for the suggestion here. I was able to solve this in a slightly different way. At each call to configure, getBuildParticipant, getSourceFolders, and a few other times, I check the MavenProjectFacade to see if the extra dependencies that I require exist, and if not, I add them. This appears to fix all of my problems. In case you're interested, here's what I did: https://github.com/aeisenberg/jsria/blob/e5492acd84ac8c3a76677f688f3f6b411b1b8aad/org.codehaus.mojo.jsria/src/org/codehaus/mojo/jsria/JsriaProjectConfigurator.java
On Sat, Jun 9, 2012 at 8:24 PM, Igor Fedorenko <[email protected]> wrote: > I believe build extensions are injected, but m2e does not implement full > maven build lifecycle inside workspace (does not really make sense) and > not all build extensions get a chance to do their thing. > > Assuming you are still talking about a build extension that provides > AbstractMavenLifecycleParticipant implementation to inject additional > dependencies, you should be able to invoke this implementation using > ILifecycleMapping2 and a subclass of DefaultMavenDependencyResolver, > which will lookup required component(s) from the project realm and > execute them before delegating to m2e default dependency resolution > logic. Beware that I have not actually tried this, so m2e may need some > fixing to make this work. > > -- > Regards, > Igor > > > On 12-06-08 12:05 PM, Andrew Eisenberg wrote: >> >> The project configurator needs to inject extra dependencies into a >> project so that when it delegates to the maven plugin for execution >> these dependencies are included. >> >> More precisely, there is a maven extension >> http://maven.apache.org/guides/mini/guide-using-extensions.html that >> injects things during a command line build, but this extension is not >> being (cannot be?) invoked from inside of m2e, so the configurator >> must take over its job. >> >> So, my questions are: >> >> 1. Is it possible to delegate to a maven extension inside of m2e? >> >> 2. If not, then my configurator needs to redo much of the same work >> that the extension does. Most importantly, it needs to inject the >> implicit dependencies for delegated plugins. How do I do that? >> >> thanks, >> Andrew >> _______________________________________________ >> m2e-users mailing list >> [email protected] >> https://dev.eclipse.org/mailman/listinfo/m2e-users >> > > _______________________________________________ > m2e-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/m2e-users _______________________________________________ m2e-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/m2e-users
