ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject Re: test environment variable and if statement
Date Tue, 05 Feb 2002 04:19:55 GMT
----- Original Message -----
From: "Michael J McGonagle" <>

> This thread is very timely for me, I have been thinking about this, not
> so much about using environment variables. I have a GUI for a command
> line to a program that has numerous options. I would like to be able to
> store the options that the user selects in the GUI in a properties file,
> and then call a custom task that reads the properties file and performs
> the task based on those properties. I am hoping to be able to store
> these "property sets" and use them for templates to using this program.
> (I am also kind of enamered with BeanShell, so I was thinking of have
> some of the 'values' in the properties be BeanShell scripts which
> resolve to what ever the parameter required  for the program).

I'm not completely grasping all of your goals, but you could hack an Ant
build file to run a target based on a property setting:

ant -Dtarget=<some target>

<antcall target="${target}"/>

> Ok, now tell me if this is doable with Ant? I seem to remember reading
> (skimming) that property files can be loaded and used by tasks as their
> parameters.

You can now, with the nightly builds, load a property file just like -D
options (with -D specified options taking precedence always):

    ant -propertyfile <some property file>

Does that help?


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

View raw message