ANT 执行SHELL脚本  


solaris环境 


[1]vi test.sh 


echo My name is $1 


echo My age is $2 


[2] chmod a+x test.sh 


[3] vi build.xml 


<?xml version="1.0" ?> 


<project name="shell" default="test_shell" basedir="."> 


    <target name="test_shell"> 


        <echo>deploy clean axis service</echo> 


        <exec executable="${basedir}/test.sh" failοnerrοr="true"> 


            <arg value="test1" /> 


            <arg value="test2" /> 


        </exec> 


    </target> 


</project>