Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 83225 invoked from network); 5 Mar 2003 18:20:34 -0000 Received: from genome.wi.mit.edu (HELO harpo.wi.mit.edu) (18.4.1.113) by daedalus.apache.org with SMTP; 5 Mar 2003 18:20:34 -0000 Received: from genome.wi.mit.edu (pc14012.wi.mit.edu [18.157.14.12]) by harpo.wi.mit.edu (8.12.8/8.12.8) with ESMTP id h25IKbcj011372 for ; Wed, 5 Mar 2003 13:20:37 -0500 (EST) Message-ID: <3E663FF5.1010500@genome.wi.mit.edu> Date: Wed, 05 Mar 2003 13:20:37 -0500 From: "M. Erik Husby" Organization: Whitehead Institute Center for Genome Research User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: Figure out why spec. env var gets unset when gets to wrapped ant script References: <0C260F619E428642BFA6380177C3ADF3026433@exmsea005.us.wamu.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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.}", 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