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

==================================
[EMAIL PROTECTED] $ 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:

==================================
[EMAIL PROTECTED] $ 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. he 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:

==================================
[EMAIL PROTECTED] $ ant
Buildfile: build.xml

echo:
    [echo] .;C;//server/share/dir1/lib1.jar;C;//server/share/dir2/lib2.jar

BUILD SUCCESSFUL
Total time: 0 seconds
==================================

--
Weiqi Gao
[EMAIL PROTECTED]
http://www.weiqigao.com/blog/


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to