ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 11511] New: - Ant script on Cygwin sets ANT_LIB before fixing ANT_HOME
Date Tue, 06 Aug 2002 19:43:25 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11511>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11511

Ant script on Cygwin sets ANT_LIB before fixing ANT_HOME

           Summary: Ant script on Cygwin sets ANT_LIB before fixing ANT_HOME
           Product: Ant
           Version: 1.5
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Wrapper scripts
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: dmkarr@earthlink.net


In version 1.5, the "ant" script will generate an invalid classpath, as it
computes the value of "ANT_LIB" before it converts ANT_HOME to a Unix-based
path.  When the value of ANT_LIB is later used to form the classpath, it will
still have a DOS-based path, which will corrupt the CLASSPATH value.

The fix is easy, just to move the setting of "ANT_LIB" after the block where it
converts ANT_HOME to a Unix path.  Following this is a diff showing this change.

*** /c/jakarta/ant/bin/ant~	Tue Aug  6 11:31:35 2002
--- /c/jakarta/ant/bin/ant	Tue Aug  6 12:35:21 2002
***************
*** 69,77 ****
    cd $saveddir
  fi
  
- # set ANT_LIB location
- ANT_LIB=${ANT_HOME}/lib
- 
  # For Cygwin, ensure paths are in UNIX format before anything is touched
  if $cygwin ; then
    [ -n "$ANT_HOME" ] &&
--- 69,74 ----
***************
*** 82,87 ****
--- 79,87 ----
      CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
  fi
  
+ # set ANT_LIB location
+ ANT_LIB=${ANT_HOME}/lib
+ 
  if [ -z "$JAVACMD" ] ; then 
    if [ -n "$JAVA_HOME"  ] ; then
      if [ -x "$JAVA_HOME/jre/sh/java" ] ; then

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message