ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Lee <w...@sendmail.com>
Subject Unable to use the Junit task in 1.3b1
Date Tue, 13 Feb 2001 18:03:18 GMT
I can't seem to get the junit optional task to work under Ant 1.3b1.  I
download the optional.jar also and put it in the ANT_HOME/lib.  But then
when I try to use the <junit> tag in the build.xml file, I got the
following:

/home/wlee/smi/gui/vcube/build/build.xml:132: Could not create task of
type:
junit. Common solutions are to use taskdef to declare your task, or, if
this is
an optional task, to put the optional.jar in the lib directory of your
ant
installation (ANT_HOME).

I tried to add the classpath to the wrapper script that I have:

CHECKOUT_HOME=../../../
ANT_HOME=${CHECKOUT_HOME}/pkgs/jakarta-ant

# Constructs the classpath for ant to use
CLASSPATH=$CLASSPATH:${CHECKOUT_HOME}/pkgs/junit/junit.jar

if [ "$JAVA_HOME" != "" ] ; then
      ${ANT_HOME}/bin/ant -buildfile build.xml $@
else
  echo "Warning: JAVA_HOME environment variable is not set."
  echo "  If build fails because sun.* classes could not be found"
  echo "  you will need to set the JAVA_HOME environment variable"
  echo "  to the installation directory of java."
fi

This won't work either, I got the same result.  Can anyone show me where
to actually add the classpath and why Ant can't see the optional task?

Thanks,

Will

Mime
View raw message