<? Xml version = "1.0" encoding = "GB2312"?>
<Project default = "jar" basedir = ".">
<Property name = "complie" value = "complie"> </property>
<Property name = "dist" value = "dist"> </property>
<Property name = "xiaolei" value = "xiaolei"> </property>
<Target name = "mk">
<Mkdir dir = "$ {complie}"/>
<Mkdir dir = "$ {dist}"/>
<Mkdir dir = "$ {xiaolei}"/>
</Target>
<Target name = "myComplie" depends = "mk">
<Javac srcdir = "src" destdir = "$ {complie}" debug = "true"> </javac>
</Target>
<Target name = "jar" depends = "myComplie">
<! -- Get the current time -->
<Tstamp/>
<! -- Reference time -->
<Jar destfile = "$ {dist}/user-$ {TSTAMP}. jar" basedir = "$ {complie}">
<Manifest>
<Attribute name = "Built-By" value = "$ {user. name}"/>
<Attribute name = "Main-Class" value = "cn. lxl. innerclass. test3"/>
</Manifest>
</Jar>
</Target>
<Target name = "del">
<! -- Delete a single file -->
<Delete file = "$ {dist}/user. jar"> </delete>
</Target>
<Target name = "copy" depends = "mk">
<! -- Copy the file to another directory and specify the file name -->
<Copy file = "src/cn/lxl/innerclass/Test3.java" tofile = "$ {xiaolei}/Test3.java"> </copy>
<! -- Modify the file name in the source path -->
<Move file = "src/cn/lxl/innerclass/Test3.java" tofile = "src/cn/lxl/innerclass/Test13.java"> </move>
<! -- Move the file to another directory -->
<Copy file = "src/cn/lxl/innerclass/Test13.java" todir = "$ {xiaolei}"> </copy>
</Target>
</Project>
This article is from the "Jxiaolei" blog