You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Henrik Niehaus <he...@gmx.de> on 2011/03/30 15:47:13 UTC

Inject dependecies into the compileClasspath from a mojo at runtime

Hi,

I'm trying to get our Eclipse RCP build plug-in for Maven 2 to work again.
What our plug-in does for each Eclipse plug-in in our reactor build:
It analyses the manifest file for dependencies and adds them at runtime 
to the POM dependencies. The dependencies have the system scope and 
point to the jar files of an eclipse target platform. Our plugin is 
bound to the initialize phase, so that the compiler plug-in has all 
dependencies in the compileClasspath.

This used to work for a "mvn clean package". We now want to run another 
plug-in before the compile. Something like "mvn clean other:plugin 
package" and with this call, it stops working, because the 
compileClasspath does not contain our injected dependencies anymore.

With Maven 3 even the "mvn clean package" does not work.

So my question is, what is the best way to augment the compileClasspath 
at runtime with a Maven 2 plug-in? Would be great, if it also worked 
with Maven 3, so that we can easily migrate to Maven 3 in the future.

Any hints are appreciated.
Thanks in advance,

Henrik

P.S.: I know, there is tycho to build Eclipse RCP applications with 
maven, but we are bound to Maven 2 and cannot use it.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org