ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin HaleBoyes <>
Subject Re: load a property file based on operating system
Date Fri, 22 Nov 2002 15:45:57 GMT
> From: Magesh Umasankar <>
> The <condition> element must be specified as a
> nested element of <target>

I've now actually implemented your suggestion but I've hit a snag.

The property file contains a property called 'catalina.home' which
points to my installation directory of Tomcat4.  This path name
is typically different for our Linux users (me) and the Windows
users (everyone else).  This property is used for a few of the
targets but mostly for the 'compile' target.  I've made the 'compile'
target depend on the 'init-properties' target which loads the
proper properties file.

In the 'compile' task, I call the <javac> task with a nested

    <classpath refid="compile.classpath"/>

In the build file I have

    <path id="compile.classpath">
        <fileset dir="${catalina.home}/common/lib">
            <include name="*.jar"/>

It appears that the 'catalina.home' property is not being expanded
as I get 

    [javac] Compiling 46 source files to

       /home/hb/cml/${catalina.home}/common/lib not found.

Line 416 is the <javac> task.
So, it appears that the 'catalina.home' property isn't being set
early enough to be seen by the <path> element.

Does anyone have any suggestions as to how to proceed?

Do you Yahoo!?
Yahoo! Mail Plus  Powerful. Affordable. Sign up now.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message