ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill.J.Fell...@mail.sprint.com
Subject RE: using environment variables on Solaris
Date Tue, 14 Aug 2001 14:07:58 GMT
No thoughts yet, but what's line 30 of your build.xml do?  Who's 
throwin' the IOOBE?

/bill

-----Original Message-----
From: anna.englund [mailto:anna.englund@accenture.com]
Sent: Tuesday, August 14, 2001 9:03 AM
To: ant-user
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