Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Help with running different target based on user input?

Help with running different target based on user input?

2007-02-23       - By Priest, James (NIH/NIEHS) [C]
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Glad you revised your entry - I was going to email you back that it
didn't work :)

Your second version was the ticket!!  I had something similar at one
point but I had my depends and if logic a bit mixed up...  This works
great! I need to go back and read the conditions docs again now that I
have a working example to compare.

Thanks so much for the help!

Jim

> -----Original Message-----
> From: RADEMAKERS Tanguy [mailto:Tanguy.RADEMAKERS@(protected)]
> Sent: Friday, February 23, 2007 8:41 AM
> To: Ant Users List
> Subject: RE: Help with running different target based on user input?
>
> after a more careful reading of your mail ;P
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="" default="script3" basedir=".">
>
>     <target name="ask_script3">
>
>         <input  message="Populate people tables with test
> data? (run script3)"
>                 validargs="y,n"
>                 defaultvalue="n"
>                 addproperty="script3.run"/>
>
>         <condition property="script3.run.required">
>             <equals arg1="y" arg2="${script3.run}"/>
>         </condition>
>     </target>
>
>     <target name="script3" depends="ask_script3"
> if="script3.run.required">
>         <echo message="running script 3..."/>
>     </target>
>
> </project>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.