细心!用心!耐心!

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

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

<!--build.xml-->

<?xml version="1.0" encoding="GB2312"?>
<!-- =================================================================== -->
<!-- $Id: build.xml,v 1.1.1.1 2007/01/08 07:34:02 doss_zp Exp $    -->
<!-- =================================================================== -->

<project name="${project.name}"  default="compile-java" 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}"/>
 <!--<property name="tomcat.home" value="${env.TOMCAT_HOME}"/>-->

 
  <path id="base.classpath">
  <!--<fileset dir="${env.TOMCAT_HOME}/common/lib">
   <include name="**/*.jar"/>
  </fileset>-->
  <fileset dir="${lib.dir}">
   <include name="**/*.jar"/>
  </fileset>
  <pathelement location="${classes.dir}"/>
 </path>
 <!-- target: clean -->
  <target name="clean">
   <delete dir="${build.dir}"/>
   <delete dir="${classes.dir}"/>
   <delete dir="${webinf.dir}/lib"/>
  </target>
 
 <!-- target: init  -->
  <target name="init">
   <mkdir dir="${build.dir}"/>
   <mkdir dir="${classes.dir}"/>
   <mkdir dir="${webinf.dir}/lib"/>
  </target>

 <!-- target: native2ascii  -->
 <target name="native2ascii">    
  <native2ascii src="${config.dir}" dest="${config.dir}"
        includes="**/ApplicationResources.properties" encoding="${encoding}" ext="_zh.properties"/>
 </target>
 
 <target name="resources">
    <native2ascii src="${config.dir}" dest="${config.dir}"
        includes="**/ApplicationResources.properties" encoding="${encoding}" ext="_zh.properties"/>
         <delete dir="${classes.dir}"/>
         <mkdir  dir="${classes.dir}"/>
        
       <copy todir="${classes.dir}" includeEmptyDirs="no">
           <fileset dir="${src.dir}">
             <patternset>
               <include name="**/*.properties"/>
               <include name="**/*.hbm"/>
               <include name="**/*.xml"/>
             </patternset>
           </fileset>
       </copy>
   <copy todir="${webinf.dir}/lib" includeEmptyDirs="no">
           <fileset dir="${lib.dir}">
               <include name="*.jar"/>
              <exclude name="**/jsp-api.jar"/>
              <exclude name="**/servlet-api.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}" > 
    <classpath>
     <path refid="base.classpath" />
    </classpath>
   </javac>
   <copy todir="${classes.dir}/com/stt/doss/server/interfaceSys/dao/mapping" includeEmptyDirs="no">
           <fileset dir="${src.dir}/com/stt/doss/server/interfaceSys/dao/mapping">
             <patternset> 
               <include name="**/*.xml"/>
             </patternset>
           </fileset>
        </copy>
   <copy todir="${webinf.dir}/classes/config" includeEmptyDirs="no">
           <fileset dir="${config.dir}">
             <patternset>
               <include name="**/*.properties"/>
               <include name="**/*.xml"/>
               <include name="**/*.ini"/> 
             </patternset>
           </fileset>
        </copy>
  </target>

    <!-- target: war-->
    <target name="war" depends="compile-java">
        <makewar project.module="doss_interface"/>
    </target> 
   
        <!-- macrodef: makewar  -->
    <macrodef name="makewar">
        <attribute name="project.module"/>
        <sequential>
            <delete dir="${dist.dir}"/>
            <mkdir dir="${dist.dir}"/>
            <war basedir="${basedir}/web" destfile="${dist.dir}/@{project.module}.war"
      webxml="${webinf.dir}/web.xml">
                <exclude name="**/*.vss"/>
            </war>
        </sequential>
    </macrodef>
    <!-- deploy_webservice  -->
<path id="axis.classpath">
  <fileset dir="${lib.dir}">
    <include name="**/*.jar" />
  </fileset>
</path>
<taskdef resource="axis-tasks.properties"  classpathref="axis.classpath" />
 <target name="deploy_webservice">  
     <axis-admin
     port="8080"
     hostname="localhost"
     failonerror="true"
     servletpath="interface/services/AdminService"
     debug="true"
     xmlfile="${webinf.dir}/deploy.wsdd"
     />   
 </target>
 
<target name="get_webservice">   
  <axis-wsdl2java
  output="${webinf.dir}"
  testcase="true"
  verbose="true"
  url="${webinf.dir}/NECServiceImpl.wsdl" >
    <mapping
      namespace="http://axis.apache.org/ns/interop"
      package="interop" />
  </axis-wsdl2java>
</target>  
 </project>


<!--build.properties-->

project.name=doss_interface
webinf.dir=${basedir}/web/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
docs.dir=${basedir}/docs
docs.api.dir=${docs.dir}/api
build.debug=on
encoding=GB2312

posted on 2007-03-16 14:52 张金鹏 阅读(391) 评论(0)  编辑  收藏 所属分类: ANT的使用

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


网站导航: