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 2007/11/27 11:25:18 UTC

DO NOT REPLY [Bug 43971] New: - ant.bat execution fails if CLASSPATH ends with double-quotes

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43971>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43971

           Summary: ant.bat execution fails if CLASSPATH ends with double-
                    quotes
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Wrapper scripts
        AssignedTo: dev@ant.apache.org
        ReportedBy: dim.242@gmail.com


If the CLASSPATH environment variable ends with a " (double-quote character),
then the Ant scripts will not work; the error message is "The syntax of the
command is incorrect.".
This is due to the line 82 in the script file ant\bin\ant.bat:

if not _%CLASSPATH:~-1%==_\ goto findAntHome

Indeed, variable expansion+manipulation here results in this:

if not _"==_\ goto findAntHome

which obviously breaks the syntax of the shell.

A quick fix is
* either to remove the double-quote characters around the last CLASSPATH entry
* or to add an additional semi-colon ( ; ) character at the end of your
environment CLASSPATH value

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43971] - ant.bat execution fails if CLASSPATH ends with double-quotes

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43971>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43971


stevel@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Additional Comments From stevel@apache.org  2007-11-27 02:35 -------
we know this, but we also dont see an easy way to detect and fix it in ant.bat;
it is in the category of 'system specific configuration errors', I'm afraid. 

There is no need whatsoever to have double quotes in the CLASSPATH variable.
Really. If you have them, delete them. Ideally, you shouldnt use CLASSPATH at all.

marking as WONTFIX, though it is actually CANTFIX.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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