ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject Re: using environment variables on Solaris
Date Tue, 14 Aug 2001 14:14:47 GMT
This has been fixed in CVS. Try Ant 1.4 Beta 1.

Conor

----- Original Message -----
From: "Anna Englund" <anna.englund@accenture.com>
To: <ant-user@jakarta.apache.org>
Sent: Wednesday, August 15, 2001 12:02 AM
Subject: using environment variables on Solaris


> Hi,
>
> I'm trying to reach environment variables in my ant script for Solaris.
>
> The problem I'm having is that I get an StringIndexOutOfBoundsException
when ant loads the environment variables. When I run the same script on
Win2K the environment variables are loaded just fine.
>
> Any ideas?
> Would be very thankful for any help!
> //Anna
>
> Basics: ant 1.3, ant-optional: 1.4 alpha, jdk 1.3.1
>
> Script:
>   <property environment="env"/>
>   <echo message="HOME=${env.HOME}"/>
>
> Output (in debug mode):
> ...
> Build sequence for target `init' is [init]
> Complete build sequence is [init, jsp, web-inf, javadoc, clean, compile,
buildejb, all]
>
> init:
>  [property] Loading Environment env.
>
> BUILD FAILED
>
> /usr/local/wls/scripts/build.xml:30: /usr/local/wls/scripts/build.xml:30:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> --- Nested Exception ---
> /usr/local/wls/scripts/build.xml:30:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> --- Nested Exception ---
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1525)
>         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.Target.execute(Target.java:153)
>         at org.apache.tools.ant.Project.runTarget(Project.java:898)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:510)
>         at org.apache.tools.ant.Main.runBuild(Main.java:421)
>         at org.apache.tools.ant.Main.main(Main.java:149)
>
>
>


Mime
View raw message