ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Harms <>
Subject [RESOLVED] Re: Trying to get Ant + JUnit working peaceably
Date Sun, 06 Jun 2010 06:59:37 GMT
I went back to my /usr/local/src/apache-ant....

1.  Used the fetch.xml script to retrieve all the 3rd party components
and put them into lib/optional
2.  Re-built ant
3.  Verified that $ANTDIR/lib/optional had ant-junit in there
4.  jar tf ant-junit ... it was BIG this time and included JUnitTask

After that I was able to get the junit task to function.

On Sat, Jun 5, 2010 at 6:13 PM, Steven Harms <> wrote:
> Shawn,
> Thanks for your suggestions and for your prompt reply.
>> The junit jar is responsible for junit itself, NOT the ability to run junit from
ant.  In order to run junit > from ant, you also need the ant-junit.jar in the $ANTHOME/lib
directory.  This should be part of
>> the normal installation of ant so I am not sure why it isn't working for you.
> I can confirm that ant-junit.jar is present:
> $ pwd
> /usr/local/apache-ant-1.8.0/lib
> $ ls -l ant-junit.jar
> -rw-r--r--  1 stharms  everyone  12736 May  2 11:10 ant-junit.jar
> Here are the jar's contents:
> jar tf ant-junit.jar |more
> org/
> org/apache/
> org/apache/tools/
> org/apache/tools/ant/
> org/apache/tools/ant/taskdefs/
> org/apache/tools/ant/taskdefs/optional/
> org/apache/tools/ant/taskdefs/optional/junit/
> org/apache/tools/ant/taskdefs/optional/junit/xsl/
> org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
> org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-noframes.xsl
>> Since you are new to java, you may not know that you can open up any jar with a zip
tool, like Winzip or winrar.  I do this a lot to inspect the contents of the jar.  If you
open up ant-junit.jar, you will see that the
class is inside.
> Notably, in my installation that /isn't/ present!  That would explain
> the error, the question would be how do I fix my install?  I've been
> using ant pretty successfully to do work-based projects.  Should I try
> to re-build and re-configure the source?
> Steven

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message