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?

Reply via email to