码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2015-07-28 22:39:22      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:

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>

 

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

标签:

原文地址:http://www.cnblogs.com/stono/p/4684265.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!