Yes, I was in the same shell. The shell output in my post was a copy paste from my actual shell with no commands left out. I only inserted some annotations in between them. :-)
On Thu, Jan 15, 2009 at 5:41 PM, Scot P. Floess <[email protected]> wrote: > > So, silly question... > > Below...are you in the same shell? Meaning...is it possible you have say 2 > xterms open...running your build.xml where CATALINA_HOME is not set? > > for example, in the same xterm do: > > echo $CATALINA_HOME > ant > > If not, I can't see why its not output... > > > On Thu, 15 Jan 2009, Kent Larsson wrote: > > Hi, I have a build.xml for my Ant build script and a build.properties file >> for easier configuration. >> >> $ ls build.* >> -rw-r--r-- 1 tnek tnek 29 2009-01-15 17:01 build.properties >> -rw-r--r-- 1 tnek tnek 270 2009-01-15 17:05 build.xml >> >> They are short and easy to understand: >> >> $ cat build.properties >> # Some comment >> hello=jejejej >> $ cat build.xml >> <?xml version="1.0"?> >> <project xmlns:ivy="antlib:org.apache.ivy.ant" name="testproject"> >> <property environment="env"/> >> <property file="build.properties"/> >> <echo message="hello = ${hello} and env.CATALINA_HOME = >> ${env.CATALINA_HOME} and path = ${env.PATH}"/> >> </project> >> >> The environment variable CATALINA_HOME is defined: >> >> $ echo $CATALINA_HOME >> /var/lib/tomcat5.5 >> >> Still only the environment variable PATH is echoed as it's supposed to: >> >> $ ant -v >> Apache Ant version 1.7.0 compiled on August 29 2007 >> Buildfile: build.xml >> Detected Java version: 1.6 in: /usr/lib/jvm/java-6-sun-1.6.0.07/jre >> Detected OS: Linux >> parsing buildfile /home/tnek/testproject/build.xml with URI = >> file:/home/tnek/testproject/build.xml >> Project base dir set to: /home/tnek/testproject >> [antlib:org.apache.tools.ant] Could not load definitions from resource >> org/apache/tools/ant/antlib.xml. It could not be found. >> [property] Loading Environment env. >> [property] Loading /home/tnek/testproject/build.properties >> Property "env.CATALINA_HOME" has not been set >> [echo] hello = jejejej and env.CATALINA_HOME = ${env.CATALINA_HOME} >> and path = >> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games >> >> BUILD SUCCESSFUL >> Total time: 0 seconds >> >> Why isn't CATALINA_HOME echoed and how can I fix it? >> >> > Scot P. Floess > 27 Lake Royale > Louisburg, NC 27549 > > 252-478-8087 (Home) > 919-754-4592 (Work) > > Chief Architect JPlate http://sourceforge.net/projects/jplate > Chief Architect JavaPIM http://sourceforge.net/projects/javapim > > Architect Keros http://sourceforge.net/projects/keros > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [email protected]<https://mail.google.com/mail?view=cm&tf=0&[email protected]> > For additional commands, e-mail: > [email protected]<https://mail.google.com/mail?view=cm&tf=0&[email protected]> > >
