Diane Holt wrote:
> 
> --- Erik Hatcher <[EMAIL PROTECTED]> wrote:
> > Ignore the shell/bat script troll....
> >
> > Ok, from an environment variable:
> >
> >     <property environment="env"/>
> >     <path id="classpath">
> >       <pathelement location="${env.HELPER_JAR}"/>
> >     </path>
> >
> > Better?  No <condition>, no shell script (well, ok, ant.bat/.sh) , nice
> > and simple.
> 
> But you don't really want to rely on environment variables that are just
> (supposedly) set, do you?  IMO, that's even scarier than hard-coding full
> paths in the build-file (which I'm also not altogether for, but it's
> better than going with env vars -- unless they're set in a file somewhere
> that's source-controlled).

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).

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.

Thanks,

Mike

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to