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 -->
    </path>

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}"/>
  </j:forEach>
</ant:fileset>

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

grz,

- LSD



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to