ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: using environment variables on Solaris
Date Tue, 14 Aug 2001 14:13:54 GMT
You probably have an oddly formatted environment variable ... can you send us 
the results of executing "set"

On Wed, 15 Aug 2001 00:02, Anna Englund wrote:
> 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)

-- 
Cheers,

Pete

*-----------------------------------------------------*
* "Faced with the choice between changing one's mind, *
* and proving that there is no need to do so - almost *
* everyone gets busy on the proof."                   *
*              - John Kenneth Galbraith               *
*-----------------------------------------------------*

Mime
View raw message