You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2001/06/08 20:35:16 UTC
[Bug 2082] New: - ant.bat strips more than just last occurrence of "\bin\"
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2082
*** shadow/2082 Fri Jun 8 11:35:16 2001
--- shadow/2082.tmp.21444 Fri Jun 8 11:35:16 2001
***************
*** 0 ****
--- 1,40 ----
+ +============================================================================+
+ | ant.bat strips more than just last occurrence of "\bin\" |
+ +----------------------------------------------------------------------------+
+ | Bug #: 2082 Product: Ant |
+ | Status: NEW Version: 1.3 |
+ | Resolution: Platform: PC |
+ | Severity: Normal OS/Version: Windows NT/2K |
+ | Priority: Other Component: Wrapper scripts |
+ +----------------------------------------------------------------------------+
+ | Assigned To: ant-dev@jakarta.apache.org |
+ | Reported By: Daniel.Barclay@digitalfocus.com |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ The script ant.bat, when trying to set ANT_HOME relative to its own location,
+ strips out more that just the last occurrence of "\bin\" in the pathname.
+
+ The code uses a construct that removes multiple occurrences of "\bin\"
+ instead of some more-focused construct to remove just the last occurrence.
+
+ Test sequence:
+
+ - Install Ant under a directory named "bin", e.g, C:\test\bin\ant.
+ - Make sure ANT_HOME is not set.
+ - Run C:\test\bin\ant\bin\ant.bat.
+ - Note the error message:
+ The system cannot find the path specified.
+
+ In ant.bat, note the line:
+
+ set DEFAULT_ANT_HOME=%DEFAULT_ANT_HOME:\bin\=%
+
+ This construct deletes all occurrences of "\bin\" in C:\test\bin\ant\bin\,
+ leaving C:\testant instead of C:\test\bin\ant.
+
+
+ Perhaps the build script should use %DEFAULT_ANT_HOME%\.., or
+ some construct that removes only the last directory name.
\ No newline at end of file