ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sadaf_Choudhry" <Sadaf_Choud...@infosys.com>
Subject 2 questions, please help!!
Date Wed, 25 Aug 2004 16:53:02 GMT
1.
 
I have recently upgraded to ant 1.6.2..
and now that the optional.jar is broken down into many many smaller
jars,
I tried to get junit.jar into an external library..
I copied ant-junit.jar to this external library as well..
 
then I use taskdef to get junit and junitreport tasks recognised..
 
    <path id="junit.path">
    <pathelement location="${lib-ext-java.dir}/ant-junit.jar"/>
    <pathelement location="${lib-ext-java.dir}/junit.jar"/>
 </path>
 <taskdef  name="junitreport"  classpathref="junit.path"
classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggrega
tor"/>
 <taskdef  name="junit"  classpathref="junit.path"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
 
This makes ant recognise tha task and my tests run fine, but the
junitreport task fails and I get this
 
test and report:
[echo]
[echo] C:\home\sadaf\work\Engineering\Libraries2\external\java
[junit] Running UsesNewJar
[junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.328 sec
[junit] Test UsesNewJar FAILED
BUILD FAILED
C:\...\build.xml:244: The following error occurred while exec uting this
line:
java.lang.NoClassDefFoundError:
org/apache/tools/ant/taskdefs/optional/junit/XalanExecutor
 
Why?
 
It obviously recognises junitreport, then why this??? and what to do to
get rid of this??
 
2.
Next, I use my build.xml to set the java.endorsed.dir under junit task..
it works for junit, but as soon as It comes out of junit, the property
is reset to the java_home/lib/endorsed..
How can I make this sysproperty stick for all my future tasks.. my need
is to get junitreport to use xalan 2.4.1 and I do not want to keep this
under java_home, but in my external library..
any pointers??
 
Please help
Thanx
Sadaf

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message