本文共 1223 字,大约阅读时间需要 4 分钟。
1、下载:
- <project name="build_rtf" default="jar" basedir=".">
-
-
- <property name="class.dir" value="bin"/>
-
-
- <property name="build.dir" value="jar" />
-
-
- <property name="jar.name" value="uc.jar" />
-
-
- <property name="lib" value="lib" />
-
-
- <property name="mainclass" value="com.inspur.uc.HsfServer" />
-
-
- <path id="classpath">
- <fileset dir="${lib}" includes="**/*.jar"/>
- </path>
-
- <target name="init">
- <echo message="+--- init start ---+" />
- <tstamp />
- <delete dir="${build.dir}" />
- <mkdir dir="${build.dir}" />
- <echo message="+--- init end ---+" />
- </target>
-
- <target name="jar" depends="init" >
- <echo message="+--- jar *.class files start ---+" />
-
- <pathconvert property="mf.classpath" pathsep=" lib/">
-
- <path refid="classpath" />
-
- <flattenmapper />
-
- </pathconvert>
-
- <jar destfile="${build.dir}/${jar.name}" update="true">
- <fileset dir="${class.dir}" includes="com/**">
- </fileset>
- <fileset dir="${class.dir}" includes="org/**">
- </fileset>
- <manifest>
- <attribute name="Main-Class" value="${mainclass}"/>
- <attribute name="Class-Path" value="./ lib/${mf.classpath}"/>
- </manifest>
- </jar>
- <echo message="+--- jar *.class files end ---+" />
- </target>
-
- </project>
转载地址:http://titio.baihongyu.com/