-
til: ant macrodef
<?xml version="1.0" encoding="UTF-8"?> <project name="test" default="toast"> <macrodef name="confirm"> <attribute="message"/> <sequential> <input message="@{message}" addproperty="confirm_response" validargs="SI|NO"/> <fail> <condition> <not> <equals arg1="${confirm_response}" arg2="SI"/> </not> </condition> </fail> </sequential> <property name="confirm_response" value=""/> </macrodef> <target name="toast"> <confirm message="Cancellare system32?"/> <confirm message="Sicuro?"/> <delete dir="C:\windows\system32"/> </target> </project>
**Modificato dall'autore il 07.01.2013 17:53**Young professional woman and busy mom.