ANT合并多个第三方包

<project name="cmgr.ivysettings" default="compile" xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- 变量设置 -->
    <property name="lib.dir" value="lib" /><!-- 合并前jar清单 -->
    <property name="build.dir" value="repository" /><!-- 合并后jar清单 -->
    <property name="lib.version" value="1.0" /><!-- 合并后jar版本 -->
   
   
<target name="compile" depends="lsql" description="--> compile and run the project">
    </target>
   
<target name="lsql" description="--> compile and run the project">
<delete file="${build.dir}/lsql-${lib.version}.jar" />
<jar destfile="${build.dir}/lsql-${lib.version}.jar">
<manifest>
<attribute name="Class-Path" value="." />
</manifest>

<zipfileset excludes="META-INF/*.SF" src="./lib/ant-1.9.4.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/cglib-nodep-3.1.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/commons-beanutils-1.9.2.jar" /> 
        <zipfileset excludes="META-INF/*.SF" src="./lib/commons-codec-1.9.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/commons-collections-3.2.1.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/commons-digester-1.8.1.jar" /> 
        <zipfileset excludes="META-INF/*.SF" src="./lib/commons-fileupload-1.3.1.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/commons-httpclient-3.1.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/commons-io-2.2.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/commons-lang-2.6.jar" />
       
        <zipfileset excludes="META-INF/*.SF" src="./lib/commons-logging-1.2.jar" /> 
        <zipfileset excludes="META-INF/*.SF" src="./lib/fastjson-1.2.4.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/httpclient-4.4.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/jxl.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/log4j-1.2.17.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/mysql-connector-java-5.1.23.jar" /> 
        <zipfileset excludes="META-INF/*.SF" src="./lib/slf4j-api-1.7.5.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/slf4j-log4j12-1.7.2.jar" /> 
        <zipfileset excludes="META-INF/*.SF" src="./lib/spring-beans-3.0.5.RELEASE.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/spring-context-3.0.5.RELEASE.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/spring-core-3.0.5.RELEASE.jar" />
        <zipfileset excludes="META-INF/*.SF" src="./lib/swingx-all-1.6.5-1.jar" />



</jar>
</target>
</project>

你可能感兴趣的:(ant)