Bug 10743 - In bin/ant: path for $ANT_LIB incorrect under cygwin in bin/ant
Summary: In bin/ant: path for $ANT_LIB incorrect under cygwin in bin/ant
Status: RESOLVED DUPLICATE of bug 10664
Alias: None
Product: Ant
Classification: Unclassified
Component: Wrapper scripts (show other bugs)
Version: 1.5
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-12 15:18 UTC by Dave Derry
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***