ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (David M. Karr)
Subject Re: Basic setup of Junit in Ant?
Date Mon, 25 Feb 2002 22:44:04 GMT
>>>>> "David" == David M Karr <> writes:

    David> I've been using Ant for basic building, packaging, and manual tests.  I'd now
    David> like to set up to use JUnit.

    David> I'm having trouble understanding exactly what I have to put in the "build.xml"
    David> file, setting up external dependencies, and finally, how to actually RUN the
    David> tests.

    David> Of all the documentation I've found, I can't find anything that says clearly
    David> what element the "junit" element is in.  I would guess it's a subelement of
    David> "project" element, but I can't confirm that from the documentation.

    David> I'm using JDK 1.4 and Ant 1.4.  I've put "jakarta-ant-1.4-optional.jar" in the
    David> $ANT_HOME/lib directory.

    David> When I run "ant", I get the error:

    David>   Unexpected element "junit"

I've got this working.  Thanks for the replies.

My missing element was putting junit.jar in the $ANT_HOME/lib directory.  This
appears to be one of those "you should have known that".  The documentation
(AFAICT) doesn't state this directly.  It would also be useful to state the
fact that task references are always in targets.  I'm sure this is stated
somewhere, but I didn't see it.

David M. Karr          ; Java/J2EE/XML/Unix/C++

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

View raw message