2013/2/8 Albretch Mueller <lbrt...@gmail.com>:
> after (apparently) compiling tc just fine:
>
>
> $ java -version
> java version "1.6.0_39"
>
> $ ant -version
> Apache Ant(TM) version 1.8.4 compiled on October 13 2012
>
> $ ant -logfile ant_apache-tomcat-7.0.35-src_201308075437.log 2>&1
> Buildfile: 
> /media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/build.xml
> $ tail -n 3 ant_apache-tomcat-7.0.35-src_20130208075437.log 2>&1
>
> BUILD SUCCESSFUL
> Total time: 28 seconds
>
> $ ls -l /media/sdb1/inst/sw/tc/7.0.35
> total 24
> drwxr-xr-x 3 knoppix knoppix 4096 Feb  8 11:54 commons-daemon-1.0.10
> drwxr-xr-x 5 knoppix knoppix 4096 Feb  8 11:54 commons-dbcp-1.4-src
> drwxr-xr-x 3 knoppix knoppix 4096 Feb  8 11:54 commons-pool-1.5.7-src
> drwxr-xr-x 2 knoppix knoppix 4096 Feb  8 11:54 ecj-4.2.1
> drwxr-xr-x 3 knoppix knoppix 4096 Feb  8 11:54 tomcat7-deps
> drwxr-xr-x 2 knoppix knoppix 4096 Feb  8 11:54 tomcat-native-1.1.24
>
>
> I am having problems while trying to run the ant tests:
>
>
> $ date; _DT=$(date +%Y%m%d%H%M%S); ant -lib
> /media/sdb1/inst/sw/apache-ant-1.8.4/lib/junit.jar

1. The actual file name in your listing below is not junit.jar.

Though as those jars are in ANT_HOME/lib folder, there should be no
need to use the "-lib" option.

> test -logfile
> ant_test_apache-tomcat-7.0.35-src_${_DT}.log 2>&1; date
> Fri Feb  8 12:29:26 UTC 2013
> Buildfile: 
> /media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/build.xml
> Fri Feb  8 12:29:30 UTC 2013
> $ tail -n 18 ant_test_apache-tomcat-7.0.35-src_${_DT}.log
>
> BUILD FAILED
> /media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/build.xml:1168:
> The following error occurred while executing this line:
> /media/sdb1/prjx/tomcat/srcs/7.0.35/apache-tomcat-7.0.35-src/build.xml:1201:
> 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
>         -/media/sdb1/inst/sw/apache-ant-1.8.4/lib
>         -/home/knoppix/.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
>
>
> Total time: 3 seconds
> $ ls -l $ANT_HOME/lib | grep junit
> -rw-r--r-- 1 knoppix knoppix    6257 Oct  8 20:11 ant-junit4.jar
> -rw-r--r-- 1 knoppix knoppix   18549 Oct  8 20:11 ant-junit.jar
> -rw-r--r-- 1 knoppix knoppix  253160 Feb  8 12:24 junit-4.10.jar
>
>

2. Ant documentation is at http://ant.apache.org/manual/

Maybe try to download a fresh copy of Ant and compare it with your installation?

3. I do not have junit<version>.jar in my ANT_HOME/lib, but I can
successfully build & run the tests for Tomcat.

Tomcat build script downloads and uses junit 4.8.2.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to