ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yves Martin <yves.mar...@elca.ch>
Subject How to get the jar file of a resource ?
Date Fri, 17 Dec 2004 15:43:59 GMT

   Hello,

 I want to put the file ant-junit.jar in the ClassPath of a forked Java command
 wherever Ant is installed.

 I have only half the way to get it work:

  <whichresource
   class="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"
   property="ant-junit.url"/>

  <java
    fork="yes"
    classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner">
    <classpath path="${my.test.classpath}:${ant-junit.url}"/>

 My idea is too limit the ClassPath to the strict needed jars - so I do not
 want to use ${java.class.path} in the forked JVM ClassPath.

 Of course it does not work because 
  ant-junit.url == 
  /my/path/to/apache-ant-1.6.2/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.class

 How can I get only the resource file
 /my/path/to/apache-ant-1.6.2/lib/ant-junit.jar to use it in ClassPath ?

 I would have expected an additionnal attribute in whichresource for instance
 ignoreref="true".

 Thank you in advance for your help
-- 
Yves Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message