ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M. Erik Husby" <mhu...@genome.wi.mit.edu>
Subject Re: Figure out why spec. env var gets unset when gets to wrapped ant script
Date Wed, 05 Mar 2003 18:20:37 GMT
Try the echoproperties task to find out what all the properties are set 
to. That should show you
any that are case sensitive.

Karr, David wrote:

>Actually, I was mistaken on one point here.  I'm finding that the
>embedded ant script doesn't even have a value for "${env.JAVA_HOME}".
>I'm using an "echo" task to try to print out a string containing envvar
>references, and I can't seem to find any that work.  I tried
>"${env.PATH}" also.
>
>This may not matter, but I noticed an odd statement in the documentation
>for the "property" task, wrt the "environment" attribute.  It says:
>
>--------------
>Note also that properties are case sensitive, even if the environment
>variables on your operating system are not, e.g. it will be ${env.Path}
>not ${env.PATH} on Windows 2000.
>--------------
>
>What does that mean?  Just for grins, I tried changing my test "echo"
>call to reference "${env.Path}" instead of "${env.PATH}", but it still
>just echoes "${env.Path}" (not the value of "$PATH").
>
>I'm not certain exactly what version of ant they have embedded, but the
>manifest of the "ant.jar" says "Created-By: Ant 1.4".
>
>  
>
>>-----Original Message-----
>>From: Karr, David
>>
>>I have a situation with an ant script that is called from a java class
>>(apparently), which is called from a DOS "cmd" script.  I can tell
>>exactly what the cmd script is doing, but it executes a jar file with
>>code that I cannot see, which eventually executes an ant script.  I
>>don't think it's "execing" ant, but probably calling the
>>"ant.Main.main()" method directly (because I put print statements in
>>    
>>
>all
>  
>
>>the "ant" scripts that I could find.
>>
>>In the batch file, just before "call"ing java, I print out the value
>>    
>>
>of
>  
>
>>a particular environment variable.  It's value is fine.  Inside the
>>    
>>
>ant
>  
>
>>script, however, when I reference "${env.<varname>}", it just prints
>>    
>>
>out
>  
>
>>that string, which tells me the variable is unset at that point.  At
>>    
>>
>the
>  
>
>>same point, I also print out the value of "${env.JAVA_HOME}", and that
>>value is fine.
>>
>>Does anyone have any clue what could be going wrong here?
>>
>>Not that it matters, but these scripts are part of the WebLogic 7.0SP2
>>distribution.
>>
>>Although I have JDK 1.4.1 installed on my system, the WebLogic
>>infrastructure forces its scripts to use its own embedded copy of JDK
>>1.3.1.
>>
>>I'm on Windows XPSP1.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>  
>

-- 
Erik Husby
Team Lead for Software Quality Automation
Whitehead Institute/MIT Center for Genome Research
320 Charles St
Cambridge, MA 02141-2023
mobile: 781.354.6669
office: 617.258.9227
mhusby@genome.wi.mit.edu




Mime
View raw message