Hi Alex,

On 2/28/06, schmaxelander <[EMAIL PROTECTED]> 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 "generic.build"?

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

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 :-))
- cdrom.build
- intranet.build
- internet.build

which take care of the above-mentioned specifics.  if possible, I'd
like to have one generic.build file where I just supply the platform
target, like this
ant -f generic.build {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",
etc.

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


> Regards,
> Alex Hybel
>
> --- In [EMAIL PROTECTED], "Jakob Fix" <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I was wondering whether the target given on the command line like this
> >
> > ant -f generic.build 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.


--
cheers,
Jakob.

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

Reply via email to