You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kevin Lawrence <ke...@gmail.com> on 2007/10/26 01:06:57 UTC

[newbie] Pass path to jar dependency to Ant

The AntRun plugin gives me a way to pass a maven classpath to ant:

  <property name="test_classpath" refid="maven.test.classpath"/>


Is there a way get the path to an arbitrary jar in my local repository?

My ant script requires a taskdef and I want to install the required jar into
my repository and I'd like some way to turn this:

  <artifactId>com.junitfactory.runner</artifactId>
  <groupId>junitfactory</groupId>
  <version>2.1.1</version>

into an pathref or property that I can refer to in Ant like this:

  <taskdef resource="taskdef.xml" classpath="${ant-junitfactory.jar}"/>

or this:

  <taskdef resource="taskdef.xml">
    <classpath refid="ant-junitfactory-path-refid"/>
  </taskdef>

Or maybe there is a better way to approach what I want to do?


Ultimately, I am going to write a maven plugin but, for now, I just want to
find an easy way to make our Ant task work with Maven.

Thanks in advance,


Kevin

http://www.junitfactory.com
You send us code. We send you tests. For free.
One million tests served.