ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k9...@operamail.com
Subject ant 1.8.4 has junit installed (by 'fetch'), but builds FAIL with "the class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found." ?
Date Tue, 24 Jul 2012 00:02:59 GMT

I have

	ant -version
		Apache Ant(TM) version 1.8.4 compiled on July 22 2012

installed on linux/64.

after the build, I pulled in additions,

	echo $ANT_HOME
		/usr/local/ant
	cd $ANT_HOME
		ant -f fetch.xml -Ddest=system

which include 'junit'

	ls -al $ANT_HOME/lib/*junit*
		-rw-rw-r--+ 1 root root 6.2K Jul 22 19:26
		/usr/local/ant/lib/ant-junit4.jar
		-rw-rw-r--+ 1 root root 2.8K Jul 22 19:26
		/usr/local/ant/lib/ant-junit4.pom
		-rw-rw-r--+ 1 root root  19K Jul 22 19:26
		/usr/local/ant/lib/ant-junit.jar
		-rw-rw-r--+ 1 root root 3.9K Jul 22 19:26
		/usr/local/ant/lib/ant-junit.pom
		-rw-rw-r--+ 1 root root 232K Jul 22 19:27
		/usr/local/ant/lib/junit-4.8.1.jar

But when I try to use ant, I get repeated FAIL messages re: a missing
'junit' class.  For example,

	cd /usr/local/apache-solr-3.6.1
	ant clean
	ant
		...
		BUILD FAILED
		/usr/local/apache-solr-3.6.1/build.xml:23: The following
		error occurred while executing this line:
		/usr/local/apache-solr-3.6.1/lucene/build.xml:48: The
		following error occurred while executing this line:
		/usr/local/apache-solr-3.6.1/lucene/common-build.xml:692:
		The following error occurred while executing this line:
		/usr/local/apache-solr-3.6.1/lucene/common-build.xml:596:
		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/ant/lib
		        -/root/.ant/lib
		        -a directory added on the command line with the
		        -lib argument

		Do not panic, this is a common problem.
		The commonest cause is a missing JAR.

		This is not a bug; it is a configuration problem
		...

Why isn't apparently installed/presente junit jar being found/used?

Thanks.

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


Mime
View raw message