Bug 10743

Summary: In bin/ant: path for $ANT_LIB incorrect under cygwin in bin/ant
Product: Ant Reporter: Dave Derry <dderry>
Component: Wrapper scriptsAssignee: Ant Notifications List <notifications>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 1.5   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Dave Derry 2002-07-12 15:18:20 UTC
Running in a cygwin command window in Maven, 'ant install' failed. When I 
investigated I found that the problem was that my constructed classpath had 
entries like 'C:\Jakarta\ant-1.5/lib/ant.jar:C:\Jakarta\ant-
1.5/lib/optional.jar'. These were not being converted by   'CLASSPATH=`cygpath -
-path --windows "$CLASSPATH"`'

I was able to correct this by changing:
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
  [ -n "$ANT_HOME" ] &&
    ANT_HOME=`cygpath --unix "$ANT_HOME"`
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$CLASSPATH" ] &&
    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi

to:
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
  [ -n "$ANT_HOME" ] &&
    ANT_HOME=`cygpath --unix "$ANT_HOME"`
  [ -n "$ANT_LIB" ] &&
    ANT_LIB=`cygpath --unix "$ANT_LIB"`
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$CLASSPATH" ] &&
    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi


I am not submitting a diff because when I looked in the CVS repository 
(http://cvs.apache.org/viewcvs/jakarta-ant/src/bin/) and there were no files 
there (only in the Attic).

Dave Derry
Comment 1 Stephane Bailliez 2002-07-12 15:22:07 UTC

*** This bug has been marked as a duplicate of 10664 ***