1 回答
TA贡献1789条经验 获得超10个赞
它可以完美运行,没有任何问题。我有两个罐子,一个是 ast.jar,另一个是 test.jar
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
Buildfile: c:\temp\build.xml
Detected Java version: 1.8 in: C:\Program Files\Java\jre1.8.0_162
Detected OS: Windows 7
parsing buildfile c:\temp\build.xml with URI = file:/c:/temp/build.xml
Project base dir set to: c:\temp
parsing buildfile jar:file:/C:/Software/Apache%20ANT%201.9.4/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/Software/Apache%20ANT%201.9.4/lib/ant.ja
Build sequence for target(s) `doLab1' is [doLab1]
Complete build sequence is [doLab1, ]
doLab1:
[delete] Deleting c:\temp\anttest\test.jar
BUILD SUCCESSFUL
Total time: 0 seconds
这是 build.xml
<project>
<property name="delDir" value="c:/temp/anttest" />
<target name="doLab1"
description="Delete .jar, .tmp, .class files except first 'a' in name">
<delete>
<fileset dir="${delDir}" includes="**/*.jar" excludes="**/a*.jar"/>
<fileset dir="${delDir}" includes="**/*.tmp" excludes="**/a*.tmp"/>
<fileset dir="${delDir}" includes="**/*.class" excludes="**/a*.class"/>
</delete>
</target>
</project>
使用的命令是
ant doLab1 -v -f c:\temp\build.xml
添加回答
举报