You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Sadaf_Choudhry <Sa...@infosys.com> on 2004/08/25 18:53:02 UTC
2 questions, please help!!
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