You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Timothy Reilly <tr...@prolifics.com> on 2008/04/01 17:25:25 UTC

Classpath for mojo

Can anyone tell me the "best" way to get the project classpath from with
a plug-in including transitive dependencies?
 
I've tried mavenProject.getCompileClasspath() but it doesn't seem to
have the transitive deps
Some problem with mavenProject.getDependencies()
 
I think I need mavenProject.getArtifacts() but how do I resolve this to
paths to the local repository? 
Am I missing something much simpler like a component or property I can
just use?

Re: Classpath for mojo

Posted by nicolas de loof <ni...@apache.org>.
Take a look at
http://svn.codehaus.org/mojo/trunk/sandbox/gwt-maven-plugin/src/main/java/org/codehaus/mojo/gwt/CompileMojo.java

The "addProjectClasspathElements" method creates the set of URL to be used
by an URLClassLoader.

Nicolas.


2008/4/1, Timothy Reilly <tr...@prolifics.com>:
>
> Can anyone tell me the "best" way to get the project classpath from with
> a plug-in including transitive dependencies?
>
> I've tried mavenProject.getCompileClasspath() but it doesn't seem to
> have the transitive deps
> Some problem with mavenProject.getDependencies()
>
> I think I need mavenProject.getArtifacts() but how do I resolve this to
> paths to the local repository?
> Am I missing something much simpler like a component or property I can
> just use?
>