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

ant学习之jar命令

时间:2014-10-29 14:34:32      阅读:232      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   io   color   ar   java   sp   div   

<?xml version="1.0" ?>
<project name="antCopy" default="jar" basedir="../">
    <target name="clean">
        <delete dir="${basedir}/build" />
    </target>
    <target name="compile" depends="clean">
        <mkdir dir="${basedir}/build/classes" />
        <javac srcdir="${basedir}/AntMain" destdir="${basedir}/build/classes" includeantruntime="false" />
    </target>
    <target name="run" depends="compile">
        <java classname="com.xisong.ant.HelloAnt">
            <classpath>
                <pathelement path="${basedir}/build/classes" />
            </classpath>
        </java>
    </target>
    <target name="jar" depends="run">
        <jar destfile="dist/helloAnt.jar" basedir="${basedir}/build/classes">
            <manifest>
                <attribute name="Main-class" value="com.xisong.ant.HelloAnt" />
            </manifest>
        </jar>
    </target >
</project>

 

<target name="build_pushserver_server_jar" depends="init">    
      <jar destfile="${deploy}/build/pushServer.jar"
           basedir="${classes.dir}"
           includes="**/channelsoft/**">       
            <manifest>
                  <attribute name="Main-Class" value="com.channelsoft.pushserver.PushServer"/>
                  <attribute name="Class-Path" value="lib/commons-beanutils-1.6.jar lib/commons-collections.jar lib/commons-lang-2.0.jar lib/commons-logging-1.1.1.jar lib/ezmorph-1.0.4.jar lib/json-lib-2.2.1-jdk15.jar lib/log4j-1.2.15.jar lib/netty-3.1.5.GA.jar lib/protobuf-java-2.3.0.jar lib/spring.jar lib/quartz-all-1.6.4.jar"/>
                  <attribute name="Signature-Version" value="$Id: build.xml,v 1.0 2010/2/09 15:03:26 Fuwenbin Exp $"/>
            </manifest>                 
       </jar>       
    </target>

 

ant学习之jar命令

标签:des   style   blog   io   color   ar   java   sp   div   

原文地址:http://www.cnblogs.com/jfzh/p/4059379.html

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