ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Mehdi.Rakhsh...@gxs.com>
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
also).

 

CLASSPATH=.;c:\Tools\apache-ant-1.6.5/lib/ant-launcher.jar;c:\Tools\ant-
contrib/lib/ant-contrib.jar;c:\Tools\apache-ant-1.6.5/lib/ant.jar

PATH=C:\Tools\j2sdk1.4.2_09/bin;c:\Tools\apache-ant-1.6.5/bin;

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%
org.apache.tools.ant.launch.Launcher -verbose -buildfile %BUILD_FILE% %1
%2 %3 %4

 

build.xml:

 

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

 

Exception with ant.jar in the classpath:

 

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

Perhaps JAVA_HOME does not point to the JDK at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHe
lper.java:539) at
org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:3
80)

 

Exception without ant.jar in classpath:

 

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

jar:file:/C:/Tools/ant-contrib/lib/ant-contrib.jar!/net/sf/antcontrib/an
tlib.xml:3: taskdef A class needed by class
net.sf.antcontrib.platform.ShellScriptTask cannot be found:
org/apache/tools/ant/taskdefs/ExecTask at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHe
lper.java:539)

 

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

 

Thanks,

Mehdi Rakhshani


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