maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henrik Niehaus <>
Subject Inject dependecies into the compileClasspath from a mojo at runtime
Date Wed, 30 Mar 2011 13:47:13 GMT

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,


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:
For additional commands, e-mail:

View raw message