ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Meals <>
Subject Re: command line arguments
Date Sat, 09 Feb 2008 19:02:33 GMT
Dominique --

Actually, I would have appreciated some sort of way to get at the
command line arguments to the right on the target, although could never
resolve a way to do it.  Alas, it doesn't matter to me now, as I'm
changing jobs and won't have involvement with this particular project
any further.

The issue I was facing was I wanted to build modules using the Eclipse
.classpath and .project files.  The ant4eclipse project does just that,
and when coupled with ant-contrib, made quite a usable solution.  My
only problem was building "clean" targets or having the Ant script tag
all of the CVS files.  This part works:

ant ModuleName1

And have "ModuleName1"'s dependencies all get built in the correct order
so no module would get built twice.  This part is working fine.  However,

ant ModuleName1 clean

Should delete all compiled files and generated configurations for not
only ModuleName1, but all of its dependencies as well.  Or maybe have
the dependency deletion happen only on a flag.

I'm not at all sure if there's an "Ant" way to do this, and like I said,
it won't make much of a difference to me now anyway, but it might be
food for thought to others on this list.

Tim Meals

Dominique Devienne wrote:
> On Feb 8, 2008 3:53 PM, Mansour <> wrote:
>> Is there a way to pass command line arguments to ant build file without
>> using the jvm paramets (ie. without -Dsome.option=some.value).
>> I need something like:
>> ant target option.
>> Thank you.
> I hacked something like this using the well known Unix pattern of
> having anything following -- to be stuffed into Ant properties called
> 0, 1 2 3 and #, that you access as ${0}, ... Of course ${#} was the
> number of arguments, and I also had a ${*} containing all the
> arguments except ${0} (to use Ant as a launcher, ${0} being the
> program, and ${*} its arguments). I think it's just changes in
>, I could share it, although based on an old --DD
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message