13 Jan 2010 16:40
JUnit and Apache Ant issues
Sagara Wijetunga <sagaralists2 <at> yahoo.com>
2010-01-13 15:40:20 GMT
2010-01-13 15:40:20 GMT
Hi all
1. I have installed JUnit-4.8.1.
CLASSPATH is set as follows:
export CLASSPATH=/usr/share/junit-4.3.1/junit-4.3.1.jar:/usr/share/junit-4.3.1
Following regression tests fails:
java org.junit.runner.JUnitCore org.junit.tests.AllTests
Exception in thread "main" java.lang.NoClassDefFoundError: org/junit/runner/JUnitCore
Caused by: java.lang.ClassNotFoundException: org.junit.runner.JUnitCore
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
2. I have installed Apache Ant-1.7.1
Build fails:
./build.sh -Ddist.dir=/opt/ant-1.7.1 dist
BUILD FAILED
apache-ant-1.7.1/build.xml:1106: The following error occurred while executing this line:
apache-ant-1.7.1/build.xml:912: We cannot build the test jar unless JUnit is present, as JUnit is needed
to compile the test classes.
(Continue reading)
RSS Feed