ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Harms <steven.ha...@gmail.com>
Subject Trying to get Ant + JUnit working peaceably
Date Sat, 05 Jun 2010 22:19:52 GMT
Hello,

I'm attempting to learn Java at present and needed to add some
automation around my build and test cycle.  Coming from Ruby, I've got
a real test-first design discipline.

When I attempted to make a <junit> task call, I started getting this
error (I can hear eyes rolling...).


BUILD FAILED
/Users/stharms/java_card/build.xml:38: Problem: failed to create task
or type junit
Cause: the class
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found.
        This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
        -/usr/local/apache-ant-1.8.0/lib
        -/Users/stharms/.ant/lib
        -a directory added on the command line with the -lib argument

OK, I'm open to trying to step through the directions.

Most searches and archives suggested that it was paramount to make
sure that the junit library was in $ANTDIR/lib.

In this directory I have both:

junit-3.8.2.jar : retrieved with ant -f fetch.xml -Ddest=system
junit-4.9-SNAPSHOT-20100512-0041.jar : built from github

I then thought, OK let's go with the instructions strictly, what's in
the lib/optional subdir.  Nothing!  OK, so I used the fetch.xml task
to pull the jars into optional.

Re-try, same error.

OK, IRC.  A kind soul there pointed out that on his debian system this
class file was part of optionals.jar that "just worked" as part of
using apt-get ant-optionals.  Hm, regrettably that answer isn't
portable to my platform.

So, I'm stuck.  Can anyone help me get around this low point.  I'm
excited to start programming Java, but I've wound up programming Ant
most of the day -- not a bad thing, just not the shiny app I had
dreamt of :)

Thanks in advance, mysterious guru with the answer,

Steven

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


Mime
View raw message