ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject ant-contrib requires ant.jar but including it breaks javac
Date Fri, 17 Feb 2006 16:35:40 GMT


I started using foreach from ant-contrib. It seems to require ant.jar to
be in classpath. However, when I put it in the classpath, ant cannot
compile any java code (I can manually compile of course and it works
fine, removing foreach and compiling java code through ant works fine




Apache Ant version 1.6.5 compiled on June 2 2005

Buildfile: build.xml

Detected Java version: 1.4 in: C:\Tools\j2sdk1.4.2_09\jre

Detected OS: Windows XP


Ant startup:


%JAVA_HOME%/bin/java -classpath %CLASSPATH% -Dant.home=%ANT_HOME% -verbose -buildfile %BUILD_FILE% %1
%2 %3 %4




   <taskdef resource="net/sf/antcontrib/antlib.xml" />


Exception with ant.jar in the classpath:


build.xml:162: Unable to find a javac compiler;
is not on the classpath.

Perhaps JAVA_HOME does not point to the JDK at at


Exception without ant.jar in classpath:


build.xml:67: The following error occurred while executing this line:

tlib.xml:3: taskdef A class needed by class
net.sf.antcontrib.platform.ShellScriptTask cannot be found:
org/apache/tools/ant/taskdefs/ExecTask at


I have a feeling that there is another jar file(s) that I am missing.
Any ideas?



Mehdi Rakhshani

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message