Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Project configurator to inject new dependencies to a build

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
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users




Back to the top