On Tue, 26 Feb 2002, Matthew Helliwell <[EMAIL PROTECTED]>
wrote:

> I've wanted to use it when using a target to specify a prod/uat/dev
> build. I wanted to be able to type 'ant PROD'. It then picks up the
> appropriate properties file based on the target (eg
> 'PROD.properties').

If you load these properties inside the target, the name already is
predetermined, if you do so in a common target the others depend upon,
you could do something like

<target name="PROD">
  <antcall target="real-target">
    <param name="target.name" value="PROD" />
  </antcall>
</target>

and similar for uat or dev.

> I ended up using an explicit property, eg 'ant -Dtarget.name=PROD'

This is the way I would go, yes.  But then again, I prefer things to
be explicit 8-)

Stefan

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

Reply via email to