ant - Depending on user input , targets in the build should execute -


i want execute targets in build.xml (written using ant scripts) 1 one. these execution of targets should depend on user's input. is, user asked "if target has executed (y/n)?" if users inputs "n" target should not executed. if gives input "y" target should executed.

here answer expanded ant documentation.

<project >     <target name="ask" >         <input              message="all data going deleted db continue (y/n)?"                   validargs="y,n"                   addproperty="do.delete"               />                   <condition property="do.abort">                         <equals arg1="n" arg2="${do.delete}"/>           </condition>         <fail if="do.abort">build aborted user.</fail>         <echo message="dropping database"/>     </target> </project> 

please see what best resources learn ant?. has sample build.xml useful targets...


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -