You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris Graham <ch...@warpspeed.com.au> on 2009/01/21 12:42:12 UTC
Getting classpath list from non ant-run plugins
Hi all.
Using the ant-run plugin, you can get properties, like this:
<property name="project.build.classpath" refid="maven.compile.classpath" />
What I'd like to do it to get access to the same classpath entries but from
a normal (ie not an ant-run derivative) plugin.
Ideally, I'd like to use something like this:
<configuration>
<classPath>${maven.compile.classpath}</classPath>
</configuration>
Or some other variable.
Can this be done?
-Chris
--
View this message in context: http://www.nabble.com/Getting-classpath-list-from-non-ant-run-plugins-tp21581532p21581532.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
AW: Getting classpath list from non ant-run plugins
Posted by Mark Struberg <st...@yahoo.de>.
Hi Chris!
The classpath to the compiled classes can be injected into your Java Mojo:
/**
* List of all class path elements that will be searched for...
*
* @parameter expression="${project.compileClasspathElements}"
* @required
* @readonly
*/
protected List classpathElements;
So you don't even need an additional configuration in your pom.
LieGrue,
strub
--- Chris Graham <ch...@warpspeed.com.au> schrieb am Mi, 21.1.2009:
> Von: Chris Graham <ch...@warpspeed.com.au>
> Betreff: Getting classpath list from non ant-run plugins
> An: users@maven.apache.org
> Datum: Mittwoch, 21. Januar 2009, 12:42
> Hi all.
>
> Using the ant-run plugin, you can get properties, like
> this:
>
> <property name="project.build.classpath"
> refid="maven.compile.classpath" />
>
> What I'd like to do it to get access to the same
> classpath entries but from
> a normal (ie not an ant-run derivative) plugin.
>
> Ideally, I'd like to use something like this:
>
> <configuration>
>
> <classPath>${maven.compile.classpath}</classPath>
> </configuration>
>
> Or some other variable.
>
> Can this be done?
>
> -Chris
>
> --
> View this message in context:
> http://www.nabble.com/Getting-classpath-list-from-non-ant-run-plugins-tp21581532p21581532.html
> Sent from the Maven - Users mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail:
> users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org