I reported this minor Ant bug 62 days ago. It hasn't been acknowledged yet although it has gotten one vote. I'm assuming everybody on the Ant team is busy with more important stuff. Hope I can save somebody somewhere some time and trouble by posting it here.
I'm having problems with CLASSPATH handling with the apache-ant-1.6.2/bin/ant
shell script on Cygwin.
In lines 236-238, the CLASSPATH environment variable is processed unnecessarily
through "cygpath --path --$format". These three lines of shell script should be
deleted.
Here's a small test case:
<project default="echo">
<property environment="env"/>
<target name="echo">
<echo message="${env.CLASSPATH}"/>
</target>
</project>
When the CLASSPATH variable contains ".;C:\dir1\lib1.jar;C:\dir2\lib2.jar" and
the current drive is the C:\ drive, running the build.xml file with Ant 1.6.2
results in
==================================
[weiqi@gao] $ ant
Buildfile: build.xml
echo:
[echo] .;C;c:/dir1/lib1.jar;C;c:/dir2/lib2.jar
BUILD SUCCESSFUL
Total time: 0 seconds
==================================
This is clearly weird but still works.
When the same command is executed while the current drive is the R:\ drive, the
result looks like this:
==================================
[weiqi@gao] $ ant
Buildfile: build.xml
echo:
[echo] .;C;r:/dir1/lib1.jar;C;r:/dir2/lib2.jar
BUILD SUCCESSFUL
Total time: 0 seconds
==================================
This is wrong. The result is also wrong when I worked from a shared home
directory with a UNC path //server/share as HOME. The result looks like this:
==================================
[weiqi@gao] $ ant
Buildfile: build.xml
echo:
[echo] .;C;//server/share/dir1/lib1.jar;C;//server/share/dir2/lib2.jar
BUILD SUCCESSFUL
Total time: 0 seconds
==================================