用ant打包可运行的jar文件 (将第三方jar包放进你自己的jar包)

http://blog.csdn.net/caiqcong/article/details/7618582

 

<span style="font-family:SimSun;font-size:12px;"><?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar" name="Create Runnable Jar for Project SeleniumAutomation-3.1">
    <!--this file was created by Eclipse Runnable JAR Export Wizard-->
    <!--ANT 1.7 is required                                        -->
    <target name="create_run_jar">
        <jar destfile="C:/Users/topcat/Desktop/111.jar" filesetmanifest="mergewithoutmain">
            <manifest>
                <attribute name="Main-Class" value="com.safx.processor.Starter"/>
                <attribute name="Class-Path" value="."/>
            </manifest>
            <fileset dir="D:/SeleniumAutomation/SAFX-3.1/bin"/>
            <zipfileset excludes="META-INF/*.SF" src="D:/SeleniumAutomation/SAFX-3.1/lib/jaxen-1.1-beta-6.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="D:/SeleniumAutomation/SAFX-3.1/lib/log4j-1.2.16.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="D:/SeleniumAutomation/SAFX-3.1/lib/mail.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="D:/SeleniumAutomation/SAFX-3.1/lib/testng-6.0.1.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="D:/SeleniumAutomation/SAFX-3.1/lib/dom4j-1.6.1.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="D:/SeleniumAutomation/SAFX-3.1/lib/guava-r09.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="D:/SeleniumAutomation/SAFX-3.1/lib/jxl.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="D:/SeleniumAutomation/SAFX-3.1/lib/selenium-java-2.21.0.jar"/>
        </jar>
    </target>
</project>
</span>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值