ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <flo...@mindspring.com>
Subject Re: How to use ANT as a command shell
Date Tue, 06 Dec 2005 15:29:06 GMT
Michael:

If you are using ant 1.6.0 or later, your default target can be defined as:

<project name="some name" default = "some default task>

Above, the default attribute defines the "default" task to run when you execute ant against
the build.xml (or whatever your ant build script's name is).

What is it you want to pass from the command line?  You can do -D's to your ant scripts I
suppose like:

ant -Dfoo=bar <build script>.xml

What exactly are you attempting to do?


-----Original Message-----
From: Michael Giroux <mlgiroux@gmail.com>
Sent: Dec 6, 2005 10:17 AM
To: Ant Users List <user@ant.apache.org>
Subject: How to use ANT as a command shell

I'm attempting to develop platform neutral launch scripts using ANT.  The
product currently has bin/nt and bin/unix folders with shell scripts
specific to each platform.  I would like to replace this with a single bin
folder containing ant scripts.

The main issue is that ANT treats command line args as target names.

Is there any way to cause ANT to
1) always invoke the default target
2) make the command line args available as a set of properties or some form
of enumeration

Michael Giroux


Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

(252) 478-8087 (Home)

Chief Architect JPlate       http://sourceforge.net/projects/jplate
Chief Architect JavaPIM    http://sourceforge.net/projects/javapim

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message