I haven't attempted to call junit directly from a build.xml file in quite
some time because of classpath issues, but decided to try it again, since I
got someonelse's build file with junit tasks in it.

I've dutifully read the documentation on the junit task and see that I need
to make sure that ant can find junit.jar.  So I put junit-3.8.1.jar in
/opt/jakarta/ant/lib along with optional.jar.  However when I run antk, it
can't figure out what to do with junit tasks, other optional tasks work
just fine.  I even went so far as to modify the shell script to print out
the actual commandline executed:
/usr/java/j2sdk1.4.2/bin/java -classpath 
/opt/jakarta/ant/lib/xml-apis.jar:/opt/jakarta/ant/lib/xercesImpl.jar:/opt/jakarta/ant/lib/optional.jar:/opt/jakarta/ant/lib/junit-3.8.1.jar:/opt/jakarta/ant/lib/ant.jar:/usr/java/j2sdk1.4.2/lib/tools.jar
 -Dant.home=/opt/jakarta/ant org.apache.tools.ant.Main -v testall

Looks ok to me.

Here's what I get:
file:/home/jpschewe/src/java/threadbench/build.xml:64: Could not create task or type 
of type: junit.

I'm using ant 1.5.1 with java 1.4.2-b28 on Linux.  Any help would be
appreciated.  Just pointing me to a previous mailing list posting that
explains the problem or a FAQ would be just fine. 

-- 
Jon Schewe | http://mtu.net/~jpschewe | [EMAIL PROTECTED]
For I am convinced that neither death nor life, neither angels 
nor demons, neither the present nor the future, nor any 
powers, neither height nor depth, nor anything else in all 
creation, will be able to separate us from the love of God that 
is in Christ Jesus our Lord. - Romans 8:38-39

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

Reply via email to