ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Chamness" <ma...@cacheware.com>
Subject RE: System Environment variables don't work
Date Wed, 16 May 2001 22:19:14 GMT
Try this build file:

build.xml
---------------------------------------------
<project name="test" basedir="." default="test">
        <property environment="env"/>
        <target name="test">
                <echo message="test"/>
        </target>
</project>
---------------------------------------------

$ uname -a
CYGWIN_NT-5.0 LEON 1.1.8(0.34/3/2) 2001-01-31 10:08 i686 unknown

$ /cygdrive/c/dev/ant/jakarta-ant-1.3/bin/ant
Buildfile: build.xml

BUILD FAILED

z:\metamngr\build\tmp\build.xml:3: z:\metamngr\build\tmp\build.xml:3:
java.lang.
StringIndexOutOfBoundsException: String index out of range: -1
--- Nested Exception ---
z:\metamngr\build\tmp\build.xml:3:
java.lang.StringIndexOutOfBoundsException: St
ring index out of range: -1
--- Nested Exception ---
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1503)
        at
org.apache.tools.ant.taskdefs.Property.loadEnvironment(Property.java:
248)
        at org.apache.tools.ant.taskdefs.Property.execute(Property.java:172)
        at
org.apache.tools.ant.ProjectHelper$TaskHandler.finished(ProjectHelper
.java:482)
        at
org.apache.tools.ant.ProjectHelper$AbstractHandler.endElement(Project
Helper.java:204)
        at com.sun.xml.parser.Parser.maybeElement(Parser.java:1413)
        at com.sun.xml.parser.Parser.content(Parser.java:1499)
        at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
        at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
        at com.sun.xml.parser.Parser.parse(Parser.java:284)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
        at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:117)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
a:85)
        at org.apache.tools.ant.Main.runBuild(Main.java:403)
        at org.apache.tools.ant.Main.main(Main.java:149)

Total time: 0 seconds

-mark


> -----Original Message-----
> From: Nico Seessle [mailto:nico@apache.org]
> Sent: Wednesday, May 16, 2001 1:17 PM
> To: ant-user@jakarta.apache.org
> Subject: Re: System Environment variables don't work
>
>
> ----- Original Message -----
> From: "Mark Chamness" <markc@cacheware.com>
> To: <ant-user@jakarta.apache.org>
> Sent: Wednesday, May 16, 2001 7:42 PM
> Subject: RE: System Environment variables don't work
>
>
> > This bug is
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=975
> >
> > It claims to be fixed but it's not.
> > I checked the May 15th java sources,
> > http://jakarta.apache.org/builds/jakarta-ant/nightly/2001-05-15/
> >
> > The problem file is
> >  src/main/org/apache/tools/ant/taskdefs/Property.java
> >
> > The problem is with parsing of cygwin bash environment
> > variables containing new lines, such as
> > PS1=\[\033]0;\w\007
> > \033[32m\]\u@\h \[\033[33m\w\033[0m\]
> > $
> >
> I tried to reproduce this, but I failed. I was using the latest
> version from
> CVS which should be the same (since there are not so many changes
> currently).
>
> I started the cygwin environment using C:\cygwin\cygwin.bat (I don't know
> which shell is running by default) and the following build.xml worked.
>
> <?xml version="1.0"?>
>
> <project name="test" basedir="." default="test">
>
>   <target name="test">
>     <property environment="env"/>
>   </target>
>
> </project>
>
> Then I executed 'bash' and tried again. It still worked. Then I executed
> 'bash ant' and it still worked. And yes, the PS1-variable is set.
>
> Nico
>
>


Mime
View raw message