Ant input task example
July 27, 2010 20:49:12 Last update: July 27, 2010 20:49:12
<?xml version="1.0"?> <project name="Ant input task example" default="all" basedir="."> <target name="all" depends="doit,don't"/> <target name="doit" depends="user-input" if="confirmed"> <echo>Task performed</echo> </target> <target name="don't" depends="user-input" unless="confirmed"> <echo>Task NOT performed</echo> </target> <target name="user-input"> <input validargs="y,n" addproperty="user-response"> Do you really want to do this? </input> <condition property="confirmed"> <equals arg1="y" arg2="${user-response}"/> </condition> </target> </project>
Easy email testing with http://www.ximailstop.com