ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Jennings <>
Subject junit deletes class files and fails
Date Sat, 30 Jan 2010 06:34:53 GMT
I must be missing something. The attached build.xml has a target "junit"
that causes the classes and test classes to be compiled to "build/..." and
then runs the tests. All the compiles work. The test get run. There are a
fair number of tests but after a few successes all the rest fail. All the
failure reports are due to ClassNotFound errors. When I then look in the
build folder all the compiled classes are gone. ... But there's no "delete"
command. It's driving me nuts. ... And the "compile" targets all work as

All the tests pass when run in IntelliJ IDEA, not via ANT.

I'm using ANT 1.7.
junit.jar (version 4.4) is in my lib folder -- so is on the classpath during
the build

Example test report:

Testsuite: my.stuff.SampleTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec

Caused an ERROR
java.lang.ClassNotFoundException: my.stuff.SampleTest
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(

Any ideas?


View raw message