ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Lochart" <>
Subject Re: How to execute task depending on input from command line
Date Mon, 24 Nov 2003 22:15:48 GMT
This is a very simplistic example but you can do something like the

( on command line call ant like this )
ant some-target

(this will execute the   execute-dev  target)

<target name="some-target" >
   <antcall target="execute--${}"/>

I do much more elaborate substitutions using ant-contribs <propertycopy>

hope this helps in some way


Now I've gained some understanding
Of the only world that we see.
Things that I once dreamed of
Have become reality.

These walls that still surround me
Still contain the same old me,
Just one more who's searching for
A world that ought to be.
----- Original Message ----- 
From: "Jhon" <>
To: <>
Sent: Monday, November 24, 2003 5:01 PM
Subject: How to execute task depending on input from command line

> Hi,
> I want to execute certain task depending upon which option has selected by
user during execution of build.xml.
> for eg. if user inputs "dev", then I want to do dev deployment by calling
corresponding task.
> if user inputs "stage", then I want to do stage deployment by calling
corr. task.
> I know I can use <input> task to get user input. But not able to
understand how can I check the condition if user input is equal  to "dev" or
> Can any body tell me how can I call targets depending on specific
conditions ?
> thanks,
> j
> ---------------------------------
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now

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

View raw message