打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
ant脚本打包

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by fhj (zte) -->
<project basedir="." default="buildshop" name="Mboss">
    <!-- wssmall build -->
    <property name="project.dir" value="E:\hbwt\CtWeb_he"/>
    <property name="war.dir" value="E:\hbwt\war"/>
   
    <!-- 这里是jdklib lib的目录, 换成本机的目录 -->
    <property name="jdklib" value="C:\Program Files\Java\jdk1.6.0_26\lib"/>
   <property name="subject" value="mmarket deploy" />

   
    <path id="project.class.path">
        <fileset dir="${project.dir}/WebRoot/WEB-INF/lib">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="${project.dir}/WebRoot/WEB-INF/classes">
            <include name="**/*.*"/>
        </fileset>
         <fileset dir="${jdklib}">
  <include name="*.jar"/>
 </fileset>
    </path>
   
    <target name="init">
        <delete failonerror="false" includeEmptyDirs="true">
            <fileset dir="${project.dir}/WebRoot/WEB-INF/classes"/>
 </delete>
    </target>
    <target name="buildshop" depends="init">
        <mkdir dir="${project.dir}/WebRoot/WEB-INF/classes"/>
      
        <javac srcdir="${project.dir}/src" destdir="${project.dir}/WebRoot/WEB-INF/classes" memoryInitialSize="128m" memoryMaximumSize="512m" deprecation="true" encoding="GBK" fork="true" failonerror="true" debug="true" includeantruntime="on">
            <classpath refid="project.class.path"/>
        </javac>
        <!--copy config file to classes-->
        <copy todir="${project.dir}/WebRoot/WEB-INF/classes">
            <fileset dir="${project.dir}/src">
                <include name="**/*.*"/>
                <exclude name="**/*.java"/>
            </fileset>
        </copy>

        <delete file="${project.dir}/WebRoot/WEB-INF/lib/j2ee.jar"/>

        <war compress="false" destfile="${war.dir}/CtWeb.war" webxml="${project.dir}/WebRoot/WEB-INF/web.xml">
            <zipfileset dir="${project.dir}/WebRoot"/>
            <include name="**/*.*"/>  
        </war>

    </target>
    <!-- all target -->
    <target name="all" depends="buildshop">
    </target>
</project>

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
博客园 - 喻祥,性情中人 - 试了一次ant
Ant多项功能配置
ant脚本文件build.xml示例- 上善若水 - 新浪BLOG
ant这东西一定得懂,因为不想依懒于IDE
ant教程详解(转载)(二) - 我的文章 - PERL的自由天堂
一个完整的Jenkins下的ant build.xml文件
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服