<target name="compile">
<!--compile source-->
<javac encoding="utf-8" target="1.6" debug="true" extdirs="" destdir="bin">
<classpath>
<fileset dir="lib" includes="*.jar" />
</classpath>
<src path="src" />
</javac>
<!--export jar-->
<pathconvert property="mf.classpath" pathsep=" ">
<path>
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
<mapper>
<chainedmapper>
<flattenmapper />
<globmapper from="*" to="lib/*" />
</chainedmapper>
</mapper>
</pathconvert>
<jar jarfile="route-server.jar " basedir="bin">
<fileset dir="lib">
<include name="*.jar" />
</fileset>
<manifest>
<attribute name="Main-Class" value="ServiceRouteServer" />
<attribute name="Class-Path" value=". ${mf.classpath}" />
</manifest>
</jar>
</target>
ant 可执行jar
最新推荐文章于 2024-05-22 10:12:22 发布