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 11280] New: - More problems with wapper script in cygwin/w2k
Date Tue, 30 Jul 2002 10:16:27 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=11280>.
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=11280

More problems with wapper script in cygwin/w2k

           Summary: More problems with wapper script in cygwin/w2k
           Product: Ant
           Version: 1.5
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Wrapper scripts
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: olle.sundblad@eris.se


I used the updated ant wrapper script but still encountered two problems:


1. If you have a home dir path ($HOME variable) with spaces in it, for example, 
c:/Documents and Settings/... and also use an .antrc file the script crashes. 

  bash> c:/ant/bin/ant
  .: Can't open /cygdrive/c/Documents: No such file or directory

My $HOME variable is:
  /cygdrive/c/Documents and Settings/osu.CID-LAP2/My Documents

This is easily fixed by quoting the call to .antrc (the following diff fixed it)

21c21
<   . $HOME/.antrc
---
>   . "$HOME/.antrc"

Note the version 1.4.1 wrapper script had the same problem (when I downloaded 
it a while ago).


2. The second problem also has to do with spaces in home environment variable. 
It is the ANT_OPTS (line 184) that makes the java call (line 187) crash:

  bash> c:/ant/bin/ant.sh
  Exception in thread "main" java.lang.NoClassDefFoundError: and

The actual call (line 187) to java looks like this:

/cygdrive/c/Java/j2sdk1.4.0/bin/java -classpath c:\ant\lib\xml-
apis.jar;c:\ant\lib\xercesImpl.jar;c:\ant\lib\optional.jar;c:\ant\lib\ant.jar;c:
\Java\j2sdk1.4.0\lib\tools.jar -Dant.home=c:\ant -
Dcygwin.user.home=c:\Documents and Settings\osu.CID-LAP2\My Documents 
org.apache.tools.ant.Main

thus java tries to start the class "and" (the and in "Documents and Settings"). 
I found no simple way to quote the path here so my solution was to comment out 
line 184:

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

I don't know yet if this causes other problems but everything seems to be 
working ok on w2k at least.

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