ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Fix" <>
Subject Re: command line target available from inside build script?
Date Tue, 28 Feb 2006 15:40:10 GMT
Hi Alex,

On 2/28/06, schmaxelander <> wrote:
> Hi Jakob,
> what exactly is your question?
> If the target is available from commandline, its available from within
> the script, too. What is you error message? Did you really name your
> script file ""?

I'm not having problems, really :-).

I was just curious whether I could use the name of the target as given
on the command line in the script as a means of influencing the script

OK, an example.  I have one source, and three different build targets
"cdrom", "intranet", "internet".  The differences between the targets
are relatively minimal, for example: "disable any logs" for the cdrom
target (the application runs from cdrom), or "display general
conditions" unless the target is intranet, etc.

Currently I have three build files (yes, they are called like this :-))

which take care of the above-mentioned specifics.  if possible, I'd
like to have one file where I just supply the platform
target, like this
ant -f {cdrom|intranet|internet}

inside the script a property will get assigned the target's value, and
I can then use this property to decide whether or not I want to
execute the "enable-log-mechanism" and "disable-general-conditions",

mmh, if there are better ways I'm open for them.  thanks for your reply.

> Regards,
> Alex Hybel
> --- In, "Jakob Fix" <jakob.fix@...> wrote:
> >
> > Hi,
> >
> > I was wondering whether the target given on the command line like this
> >
> > ant -f server
> >
> > (i.e. "server" in this example) is available from within the ant
> > script, like ${target}.  apparently, it's not ${target} because
> > otherwise I wouldn't have asked, I tried that, and yes, the
> > documentation keeps shtum as well.
> >
> > thanks in advance.
> >
> >
> > --
> > cheers,
> > Jakob.


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

View raw message