细心!用心!耐心!

吾非文人,乃市井一俗人也,读百卷书,跨江河千里,故申城一游; 一两滴辛酸,三四年学业,五六点粗墨,七八笔买卖,九十道人情。

BlogJava 联系 聚合 管理
  1 Posts :: 196 Stories :: 10 Comments :: 0 Trackbacks

<!--最外层build.xml-->

<?xml version="1.0" encoding="UTF-8"?>
<!-- =================================================================== -->
<!-- $Id: build.xml,v 1.13.2.3.4.6 2002/08/30 12:00:00 inder Exp $    -->
<!-- =================================================================== -->

<project name="abnorinfo"  basedir=".">

    <tstamp>
        <format property="build.time" pattern="yyyy-MM-dd.HH.mm.ss"/>
    </tstamp>

    <property file="build.properties"/>
    <property environment="env"/>
    <property name="ant.home" value="${env.ANT_HOME}"/>
  


    <path id="base.classpath">
      
        <fileset dir="${lib.dir}">
            <include name="classes12.jar"/>
            <include name="commons-logging-1.0.3.jar"/>
            <include name="jdom.jar"/>
            <include name="jsp-api.jar"/>
            <include name="jxl.jar"/>          
            <include name="log4j-1.2.8.jar"/>
            <include name="servlet-api.jar"/>
            <include name="spring.jar"/>
            <include name="collection_main.jar"/>
        </fileset>      
        <pathelement location="${main.dir}/classes"/>
    </path>
  
     <!-- target: clean -->
    <target name="clean">
        <delete dir="${main.dir}/classes"/>
        <delete>
           <fileset dir="${lib.dir}" includes="collection_main.jar"/>
        </delete>     
    </target>
   
   
    <!-- target: init  -->
    <target name="init">
        <mkdir dir="${main.dir}/classes"/>
    </target>
     
    <target name="copylibs" depends="jar">
        <copy todir="${abnorinfo.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${busidetail.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${busitotal.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${clientinfo.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${clientorder.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${clientp2p.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${clientwap.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${dd.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${imeifunc.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${imeimobile.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${misc.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${saledaily.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${salehis.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${saleresp.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${saleresphis.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${saletrack.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${saletrackhis.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${saleuser.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${serviceorder.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${servicep2p.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${smscont.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${spmiscclass.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${subclient.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${subunsub.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
        <copy todir="${urlwap.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
       
    </target>
    <!-- target: compile-java -->
    <target name="compile-java" depends="clean,init" >
        <javac srcdir="${main.dir}/src" destdir="${main.dir}/classes" debug="${build.debug}" encoding="${encoding}"
    includes="com/stt/doss/datacollect/main/**">
            <classpath>
                <path refid="base.classpath" />
            </classpath>
        </javac>
    </target>

    <!-- target: jar-->
    <target name="jar" depends="compile-java">
       <jar destfile="${lib.dir}/collection_main.jar" basedir="${main.dir}/classes"/>
    </target>

    <target name="all" depends="copylibs">
       <ant taskname="abnorinfo-war" dir="abnorinfo" antfile="build.xml" target="war" />
       <ant taskname="busidetail-war" dir="busidetail" antfile="build.xml" target="war" />
       <ant taskname="busitotal-war" dir="busitotal" antfile="build.xml" target="war" />
       <ant taskname="clientinfo-war" dir="clientinfo" antfile="build.xml" target="war" />
       <ant taskname="clientorder-war" dir="clientorder" antfile="build.xml" target="war" />
       <ant taskname="clientp2p-war" dir="clientp2p" antfile="build.xml" target="war" />
       <ant taskname="clientwap-war" dir="clientwap" antfile="build.xml" target="war" />
       <ant taskname="dd-war" dir="dd" antfile="build.xml" target="war" />
       <ant taskname="imeifunc-war" dir="imeifunc" antfile="build.xml" target="war" />
       <ant taskname="imeimobile-war" dir="imeimobile" antfile="build.xml" target="war" />
       <ant taskname="misc-war" dir="misc" antfile="build.xml" target="war" />
       <ant taskname="saledaily-war" dir="saledaily" antfile="build.xml" target="war" />
       <ant taskname="salehis-war" dir="salehis" antfile="build.xml" target="war" />
       <ant taskname="saleresp-war" dir="saleresp" antfile="build.xml" target="war" />
       <ant taskname="saleresphis-war" dir="saleresphis" antfile="build.xml" target="war" />
       <ant taskname="saletrack-war" dir="saletrack" antfile="build.xml" target="war" />
       <ant taskname="saletrackhis-war" dir="saletrackhis" antfile="build.xml" target="war" />
       <ant taskname="saleuser-war" dir="saleuser" antfile="build.xml" target="war" />
        <ant taskname="serviceorder-war" dir="serviceorder" antfile="build.xml" target="war" />
       <ant taskname="servicep2p-war" dir="servicep2p" antfile="build.xml" target="war" />
       <ant taskname="smscont-war" dir="smscont" antfile="build.xml" target="war" />
       <ant taskname="spmiscclass-war" dir="spmiscclass" antfile="build.xml" target="war" />
       <ant taskname="subclient-war" dir="subclient" antfile="build.xml" target="war" />
       <ant taskname="subunsub-war" dir="subunsub" antfile="build.xml" target="war" />
       <ant taskname="urlwap-war" dir="urlwap" antfile="build.xml" target="war" />
    </target>
  
</project>


<!--最外层build.properties-->
project.name=dosscollect
project.module.dosscollect=dosscollect
main.module.collect=collection_main

main.dir=main
lib.dir=lib
build.debug=on
encoding=GB2312

abnorinfo.dir=abnorinfo
busidetail.dir=busidetail
busitotal.dir=busitotal
clientinfo.dir=clientinfo
clientorder.dir=clientorder
clientp2p.dir=clientp2p
clientwap.dir=clientwap
dd.dir=dd
imeifunc.dir=imeifunc
imeimobile.dir=imeimobile
misc.dir=misc
saledaily.dir=saledaily
salehis.dir=salehis
saleresp.dir=saleresp
saleresphis.dir=saleresphis
saletrack.dir=saletrack
saletrackhis.dir=saletrackhis
saleuser.dir=saleuser
serviceorder.dir=serviceorder
servicep2p.dir=servicep2p
smscont.dir=smscont
spmiscclass.dir=spmiscclass
subclient.dir=subclient
subunsub.dir=subunsub
urlwap.dir=urlwap


<!--最外层build.bat-->
ant all



<!--内层build.xml-->
<?xml version="1.0" encoding="UTF-8"?>
<!-- =================================================================== -->
<!-- $Id: build.xml,v 1.13.2.3.4.6 2002/08/30 12:00:00 inder Exp $    -->
<!-- =================================================================== -->

<project name="abnorinfo"  basedir=".">

    <tstamp>
        <format property="build.time" pattern="yyyy-MM-dd.HH.mm.ss"/>
    </tstamp>

    <property file="build.properties"/>
    <property environment="env"/>
    <property name="ant.home" value="${env.ANT_HOME}"/>
   
    <path id="base.classpath">
      
        <fileset dir="${lib.dir}">
            <include name="classes12.jar"/>
            <include name="commons-logging-1.0.3.jar"/>
            <include name="jdom.jar"/>
            <include name="jsp-api.jar"/>
            <include name="jxl.jar"/>          
            <include name="log4j-1.2.8.jar"/>
            <include name="servlet-api.jar"/>
            <include name="spring.jar"/>
            <include name="collection_main.jar"/>
        </fileset>      
        <pathelement location="${classes.dir}"/>
    </path>
    <!-- target: clean -->
    <target name="clean">
        <delete dir="${classes.dir}"/>
        <delete dir="${webinf.dir}/lib"/>
        <delete dir="${dist.dir}"/>
    </target>

    <!-- target: init  -->
    <target name="init">
        <mkdir dir="${classes.dir}"/>
        <mkdir dir="${webinf.dir}/lib"/>
        <mkdir dir="${lib.dir}"/>
    </target>
     
    <target name="resources">
        <copy todir="${classes.dir}" includeEmptyDirs="no">
            <fileset dir="${src.dir}">
                <patternset>
                    <include name="META-INF/**" />
                </patternset>
            </fileset>
            <fileset dir="${config.dir}">
                <patternset>
                    <include name="doss_spring.xml" />
                    <include name="log4j.properties" />
                </patternset>
            </fileset>           
        </copy>
        <copy todir="${webinf.dir}/lib" includeEmptyDirs="no">
            <fileset dir="${lib.dir}">
                <include name="classes12.jar"/>
                <include name="commons-logging-1.0.3.jar"/>
                <include name="jdom.jar"/>
                <include name="jsp-api.jar"/>
                <include name="jxl.jar"/>          
                <include name="log4j-1.2.8.jar"/>
                <include name="servlet-api.jar"/>
                <include name="spring.jar"/>
                <include name="collection_main.jar"/>
            </fileset>                    
        </copy>
       
    </target>
    <!-- target: compile-java -->
    <target name="compile-java" depends="clean,init,resources" >
        <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="${build.debug}" encoding="${encoding}"
    includes="com/stt/doss/datacollect/sub/das/abnorinfo/**">

            <classpath>
                <path refid="base.classpath" />
            </classpath>
        </javac>
    </target>

    <!-- target: war-->
    <target name="war" depends="compile-java">
        <makewar project.module="${project.module.abnorinfo}"/>
    </target>

      <!-- macrodef: makewar  -->
    <macrodef name="makewar">
        <attribute name="project.module"/>
        <sequential>
            <delete dir="${dist.dir}"/>
            <mkdir dir="${dist.dir}"/>
            <war basedir="${basedir}" destfile="${dist.dir}/@{project.module}.war"
      webxml="${webinf.dir}/web.xml">
                <exclude name="**/*.vss"/>
            </war>
        </sequential>
    </macrodef>
 
</project>



<!--内层build.properties-->

project.name=abnorinfo
project.module.abnorinfo=abnorinfo
webinf.dir=${basedir}/WEB-INF
dist.dir=${basedir}/dist
build.dir=${basedir}/build
classes.dir=${webinf.dir}/classes
src.dir=src
lib.dir=lib
config.dir=${basedir}/config
build.debug=on
encoding=GB2312

 

详细参见:I:\开源东东\全成项目\全成项目\DOSS采集\版本一old\test

posted on 2007-03-16 15:05 张金鹏 阅读(390) 评论(1)  编辑  收藏 所属分类: ANT的使用

Feedback

# re: doss采集(多个war包,老版本)---ant脚本 2011-03-08 16:14 oj
dfg sd  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: