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 10654] New: - cygwin.user.home definition fails when $HOME contains spaces
Date Wed, 10 Jul 2002 16:30:58 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=10654>.
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=10654

cygwin.user.home definition fails when $HOME contains spaces

           Summary: cygwin.user.home definition fails when $HOME contains
                    spaces
           Product: Ant
           Version: 1.5
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Wrapper scripts
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: mmchenry@carnegielearning.com


I'm running cygnus, and using the 'ant' sh script to launch ant.  The last thing
this script does before executing java is to convert paths back to windows
format.  In ant 1.4.1, this was just a few calls to 'cygpath'.  In 1.5, however,
line 184 reads:

  ANT_OPTS="$ANT_OPTS -Dcygwin.user.home="`cygpath --path --windows "$HOME"`

On my system, $HOME contains a space:

$ echo $HOME
/CVS Tree

When I run ant, I get the following:

$ ant
java.lang.NoClassDefFoundError: Tree

The command that the script is trying to execute is (classpath trimmed for brevity):

/jdk1.3.1_03/bin/java -classpath
C:\progra~1\jakarta-ant-1.5\lib\xml-apis.jar;C:\progra~1\jakarta-ant-1.5\lib\xercesImpl.jar;<...>;C:\jdk1.3.1_03\lib\tools.jar
-Dant.home=C:\progra~1\jakarta-ant-1.5 -Dbuild.compiler=jikes
-Dbuild.compiler.fulldepend=true -Dcygwin.user.home=C:\CVS Tree
org.apache.tools.ant.Main -find build.xml

Instead, it should put quotes around the value of cygwin.user.home:

/jdk1.3.1_03/bin/java -classpath
C:\progra~1\jakarta-ant-1.5\lib\xml-apis.jar;C:\progra~1\jakarta-ant-1.5\lib\xercesImpl.jar;<...>;C:\jdk1.3.1_03\lib\tools.jar
-Dant.home=C:\progra~1\jakarta-ant-1.5 -Dbuild.compiler=jikes
-Dbuild.compiler.fulldepend=true -Dcygwin.user.home="C:\CVS Tree"
org.apache.tools.ant.Main -find build.xml

Proposed change:

184c184,186
<   ANT_OPTS="$ANT_OPTS -Dcygwin.user.home="`cygpath --path --windows "$HOME"`
---
>   "$JAVACMD" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS
-Dcygwin.user.home="`cygpath --path --windows "$HOME"`"
org.apache.tools.ant.Main $ANT_ARGS "$@"
> else
>   "$JAVACMD" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS
org.apache.tools.ant.Main $ANT_ARGS "$@"
186,187d187
< 
< "$JAVACMD" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS
org.apache.tools.ant.Main $ANT_ARGS "$@"

--
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