maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <>
Subject tip: getting at the classpath for a plugin
Date Thu, 05 Jun 2003 13:05:34 GMT
Hi all,

I'm currently writing a forrest plugin. I needed a way to get at all the 
dependencies of forrest to build a classpath. Most plugins I found do 
something like:

     <!-- Setup the classpath for this plugin -->
     <path id="some-classpath">
       <pathelement path="${plugin.getDependencyPath('commons-lang')}"/>
       <pathelement path="${plugin.getDependencyPath('log4j')}"/>
       <pathelement path="${plugin.getDependencyPath('velocity')}"/>
       <pathelement path="${plugin.getDependencyPath('village')}"/>
       <!-- etc etc -->

after a lot of twiddling, I figured out that

<ant:fileset dir="${mavenRepoLocal}">
   <j:forEach var="dep" items="${plugin.dependencies}">
     <ant:include name="${dep.artifactDirectory}/jars/${dep.artifact}"/>

is a way to autobuild such a classpath from the plugin POM.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message