ant学习记录

来源:互联网 发布:ubuntu win10快速切换 编辑:程序博客网 时间:2024/04/29 17:07
<project basedir="." default="Task" name="Nmon">   <path id="Nmon.classpath">       <pathelement location="bin"/>       <pathelement location=",,,.jar"/>各种需要的jar包   </path>   <target name="del">       <taskdef name="watchTest" classname="包名.类名">           <classpath refid="Nmon.classpath"/>       </taskdef>   </target>   <pre name="code" class="html"><target name="Task">       <watchTest srcFile="C:/test" desFile="D:/li/test.txt"/>   </target>

</project>

再写一类继承Task,并且覆盖起execute方法就可以执行自定义的任务

0 0
原创粉丝点击