当前位置:编程学习 > JAVA >>

ant complie jar

1. <?xml version="1.0" encoding="GB2312"?>
2. <project default="jar" basedir=".">
3.     <property name="complie" value="complie"></property>
4.     <property name="dist" value="dist"></property>
5.     <target name="mk">
6.         <mkdir dir="${complie}"/>
7.         <mkdir dir="${dist}"/>
8.     </target>
9. 
10. 
11.     <target name="myComplie" depends="mk">
12.         <javac srcdir="src" destdir="${complie}" debug="true"></javac>
13.     </target>
14.     <target name="jar" depends="myComplie">
15.         <jar destfile="${dist}/user.jar" basedir="${complie}">
16.             <manifest>
17.                 <attribute name="Built-By" value="${user.name}"/>
18.                 <attribute name="Main-Class" value="cn.lxl.innerclass.test3"/>
19.             </manifest>
20.         </jar>
21.     </target>
22. </project>
 
本文出自 “Jxiaolei” 博客

补充:软件开发 , Java ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,