在Eclipse下 Ant打包报错

時間會抹平那些皺褶遺 发布于 2015/08/11 11:08
阅读 1K+
收藏 0

这个是build.xml源文件

<?xml version="1.0" encoding="UTF-8"?>
<project name="CorisApp" basedir="." default="package-web">
  
<!-- import properties (app settings, classpath, jar file locations) -->
<import file="properties.xml" />


<target name="init" description="defines custom tasks">
<!-- Taskdefs -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${ant-contrib.jar}" />


<!-- Ensure that Ant 1.6.2+ is being used -->
<available classname="org.apache.tools.ant.DynamicAttribute" property="ant-1.6.2" />
<fail unless="ant-1.6.2" message="CORIS2 requires Ant 1.6.2 for faster unit testing" />


<!-- Check that junit.jar is in $ANT_HOME/lib or junit task fails -->
<available classname="junit.framework.TestCase" property="junit.present" />
<fail unless="junit.present" message="Please copy junit.jar into ${env.ANT_HOME}/lib" />


<taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask" classpathref="fw.test.classpath" />


<!-- Test for Tomcat 5.0.x -->
<available classname="org.apache.catalina.ant.SessionsTask" property="tomcat5">
<classpath>
<pathelement path="${tomcat.home}/server/lib/catalina-ant.jar" />
</classpath>
</available>


<!-- Test for Tomcat 5.5.x -->
<available file="${tomcat.home}/common/lib/jasper-compiler-jdt.jar" property="tomcat5.5" />


<taskdef resource="emma_ant.properties" classpathref="emma.lib" />


<taskdef name="hibernatedoclet" classname="xdoclet.modules.hibernate.HibernateDocletTask" classpathref="xdoclet.classpath" />


</target>


<!-- Check timestamp on files -->
<target name="prepare" depends="init" description="create target directories">
<tstamp />
<tstamp>
<format property="copyright.year" pattern="yyyy" />
</tstamp>
<echo message="Preparing target directory '${webapp.target}'" />
<mkdir dir="${webapp.target}" />
<mkdir dir="${webapp.target}/WEB-INF" />
<mkdir dir="${webapp.dist}" />


<!-- Make sure hibernatedoclet is necessary 
<uptodate property="hibernatedoclet.unnecessary">
<srcfiles dir="src/v2" includes="**/entity/*.java" />
<mapper type="glob" from="*.java" to="${build.dir}/v2/classes/*.class" />
</uptodate>
-->

<!-- 优化,按每个模块进行检查 -->
<uptodate property="hibernatedoclet.bm.unnecessary">
<srcfiles dir="src/v2" includes="**/bm/entity/*.java" />
<mapper type="glob" from="*.java" to="${build.dir}/v2/classes/*.class" />
</uptodate>
<uptodate property="hibernatedoclet.et.unnecessary">
<srcfiles dir="src/v2" includes="**/et/entity/*.java" />
<mapper type="glob" from="*.java" to="${build.dir}/v2/classes/*.class" />
</uptodate>
<uptodate property="hibernatedoclet.eximin.unnecessary">
<srcfiles dir="src/v2" includes="**/eximin/entity/*.java" />
<mapper type="glob" from="*.java" to="${build.dir}/v2/classes/*.class" />
</uptodate>
<uptodate property="hibernatedoclet.serverdata.unnecessary">
<srcfiles dir="src/v2" includes="**/serverdata/entity/*.java" />
<mapper type="glob" from="*.java" to="${build.dir}/v2/classes/*.class" />
</uptodate>
<uptodate property="hibernatedoclet.r24im.unnecessary">
<srcfiles dir="src/v2" includes="**/r24/im/entity/*.java" />
<mapper type="glob" from="*.java" to="${build.dir}/v2/classes/*.class" />
</uptodate>
<uptodate property="hibernatedoclet.r24ex.unnecessary">
<srcfiles dir="src/v2" includes="**/r24/ex/entity/*.java" />
<mapper type="glob" from="*.java" to="${build.dir}/v2/classes/*.class" />
</uptodate>
<uptodate property="hibernatedoclet.r24partner.unnecessary">
<srcfiles dir="src/v2" includes="**/r24/partner/entity/*.java" />
<mapper type="glob" from="*.java" to="${build.dir}/v2/classes/*.class" />
</uptodate>
<uptodate property="hibernatedoclet.lcl.unnecessary">
<srcfiles dir="src/lcl" includes="**/entity/*.java" />
<mapper type="glob" from="*.java" to="${build.dir}/lcl/classes/*.class" />
</uptodate>
<uptodate property="hibernatedoclet.declare.unnecessary">
<srcfiles dir="src/v2" includes="**/declare/entity/*.java" />
<mapper type="glob" from="*.java" to="${build.dir}/v2/classes/*.class" />
</uptodate>
<uptodate property="hibernatedoclet.mini.unnecessary">
<srcfiles dir="src/v2" includes="**/mini/entity/*.java" />
<mapper type="glob" from="*.java" to="${build.dir}/v2/classes/*.class" />
</uptodate>
<uptodate property="hibernatedoclet.ca.unnecessary">
<srcfiles dir="src/v2" includes="**/ca/entity/*.java" />
<mapper type="glob" from="*.java" to="${build.dir}/v2/classes/*.class" />
</uptodate>


<generate-database-properties />
</target>


<!-- List of variables in .properties files that will be replaced at
         build time -->
<filterset id="variables.to.replace">
<filter token="APPNAME" value="${app.name}" />
<filter token="ENCRYPT-ALGORITHM" value="${encrypt.algorithm}" />
<filter token="ERROR-MAILTO" value="${error.mailTo}" />
<filter token="ERROR-MAILHOST" value="${error.mailHost}" />
<filter token="ERROR-SERVER" value="${error.server}" />
<filter token="FORM-AUTH-ACTION" value="${form.auth.action}" />
<filter token="HTTP-PORT" value="${http.port}" />
<filter token="HTTPS-PORT" value="${https.port}" />
<filter token="TOMCAT-SERVER" value="${tomcat.server}" />
<filter token="SECURE-LOGIN" value="${secure.login}" />
<filter token="HIBERNATE-DIALECT" value="${hibernate.dialect}" />
</filterset>


<!-- List of variables to replace when configuring Tomcat -->
<filterset id="db.variables">
<filter token="DB-DRIVERNAME" value="${database.driver_class}" />
<filter token="DB-URL" value="${database.url}" />
<filter token="DB-USERNAME" value="${database.username}" />
<filter token="DB-PASSWORD" value="${database.password}" />
</filterset>


<!-- Copy any resource or configuration files -->
<target name="copy-resources" depends="prepare" description="Copy .properties and .xml files from source directory">
<mkdir dir="${build.dir}/web/classes" />
<!--
        <copy todir="${build.dir}/web/classes" includeEmptyDirs="no">
            <fileset dir="web/WEB-INF/classes">   
                <exclude name="ApplicationResources_zh_CN.properties"/>
                <include name="*.properties"/>
                <include name="*.xml"/>
                <include name="*.vm"/>   
            </fileset>
            <filterset refid="variables.to.replace"/>
        </copy>      
        <native2ascii src="web/WEB-INF/classes" dest="${build.dir}/web/classes" 
            includes="ApplicationResources_zh_CN.properties" encoding="UTF-8"/>
        -->


<generate-database-properties />
<copy todir="${build.dir}/web/classes" file="database.properties" />


</target>


<!-- =================================================================== -->
<!-- The "copy-web-files" target copies the static web resources portion -->
<!-- of your web application source into the build target area           -->
<!-- =================================================================== -->
<target name="copy-web-files" depends="prepare" description="Copy static files">
<echo message="Copying static files" />
<!-- Remove the copy block below if you're not displaying 
             version/copyright in the footer 
        <copy todir="${webapp.target}">
            <fileset dir="web" includes="common/footer.jsp"/>
            <filterset>
                <filter token="APPVERSION" value="${app.version}"/>
                <filter token="COPYRIGHT-YEAR" value="${copyright.year}"/>
            </filterset>
        </copy>
        -->
<copy todir="${webapp.target}" includeEmptyDirs="no">
<fileset dir="${basedir}/web">
<include name="**" />
<exclude name="**/classes/**" />
<exclude name="**/*-resources.xml" />
</fileset>
</copy>
<!-- Copy JSP Pages under WEB-INF/pages 
        <copy todir="${webapp.target}/WEB-INF">
            <fileset dir="${basedir}/web">
                <include name="pages/**/*.jsp"/>
                <include name="WEB-INF/*.xml"/>
                <include name="WEB-INF/*.properties"/>
            </fileset>
        </copy> -->
<!-- Copy *.txt files so they can be included in release notes -->
<copy todir="${webapp.target}">
<fileset dir="${basedir}">
<include name="*.txt" />
</fileset>
</copy>
</target>


<!-- =================================================================== -->
<!-- The "stage-web" is used to gather all static web recourses in the   -->
<!-- build directory.                                                    -->
<!-- =================================================================== -->
<target name="stage-web" depends="package-lcl,package-v2,copy-resources,copy-web-files" description="Calls other targets to gather static resources" />


<!-- =================================================================== -->
<!-- The "hibernatedoclet" target generates Hibernate mapping files      -->
<!-- based on XDoclet marked-up Plain Old Java Object (POJO)             -->
<!-- =================================================================== -->
<target name="hibernatedoclet-v2-bm" depends="prepare" unless="hibernatedoclet.bm.unnecessary">
<hibernatedoclet destdir="${build.dir}/v2/gen" mergedir="metadata/v2" excludedtags="@version ,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
<fileset dir="src/v2" includes="**/bm/entity/*.java" />
<hibernate validatexml="true" version="2.0" />
</hibernatedoclet>
</target>
<target name="hibernatedoclet-v2-et" depends="prepare" unless="hibernatedoclet.et.unnecessary">
<hibernatedoclet destdir="${build.dir}/v2/gen" mergedir="metadata/v2" excludedtags="@version ,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
<fileset dir="src/v2" includes="**/et/entity/*.java" />
<hibernate validatexml="true" version="2.0" />
</hibernatedoclet>
</target>
<target name="hibernatedoclet-v2-eximin" depends="prepare" unless="hibernatedoclet.eximin.unnecessary">
<hibernatedoclet destdir="${build.dir}/v2/gen" mergedir="metadata/v2" excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
<fileset dir="src/v2" includes="**/eximin/entity/*.java" />
<hibernate validatexml="true" version="2.0" />
</hibernatedoclet>
</target>
<target name="hibernatedoclet-v2-serverdata" depends="prepare" unless="hibernatedoclet.serverdata.unnecessary">
<hibernatedoclet destdir="${build.dir}/v2/gen" mergedir="metadata/v2" excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
<fileset dir="src/v2" includes="**/serverdata/entity/*.java" />
<hibernate validatexml="true" version="2.0" />
</hibernatedoclet>
</target>
    <target name="hibernatedoclet-r24-im" depends="prepare" unless="hibernatedoclet.r24im.unnecessary">
<hibernatedoclet destdir="${build.dir}/v2/gen" mergedir="metadata/v2" excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
<fileset dir="src/v2" includes="**/r24/im/entity/*.java" />
<hibernate validatexml="true" version="2.0" />
</hibernatedoclet>
</target>
<target name="hibernatedoclet-r24-ex" depends="prepare" unless="hibernatedoclet.r24ex.unnecessary">
<hibernatedoclet destdir="${build.dir}/v2/gen" mergedir="metadata/v2" excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
<fileset dir="src/v2" includes="**/r24/ex/entity/*.java" />
<hibernate validatexml="true" version="2.0" />
</hibernatedoclet>
</target>
<target name="hibernatedoclet-v2-declare" depends="prepare" unless="hibernatedoclet.declare.unnecessary">
       <hibernatedoclet destdir="${build.dir}/v2/gen" mergedir="metadata/v2" excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
           <fileset dir="src/v2" includes="**/declare/entity/*.java" />
               <hibernate validatexml="true" version="2.0" />
       </hibernatedoclet>
</target>
<target name="hibernatedoclet-r24-partner" depends="prepare" unless="hibernatedoclet.r24partner.unnecessary">
       <hibernatedoclet destdir="${build.dir}/v2/gen" mergedir="metadata/v2" excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
           <fileset dir="src/v2" includes="**/r24/partner/entity/*.java" />
               <hibernate validatexml="true" version="2.0" />
       </hibernatedoclet>
</target>

<target name="hibernatedoclet-v2-mini" depends="prepare" unless="hibernatedoclet.mini.unnecessary">
       <hibernatedoclet destdir="${build.dir}/v2/gen" mergedir="metadata/v2" excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
           <fileset dir="src/v2" includes="**/mini/entity/*.java" />
               <hibernate validatexml="true" version="2.0" />
       </hibernatedoclet>
</target>

<target name="hibernatedoclet-v2-archive" depends="prepare" unless="hibernatedoclet.archive.unnecessary">
       <hibernatedoclet destdir="${build.dir}/v2/gen" mergedir="metadata/v2" excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
           <fileset dir="src/v2" includes="**/archive/entity/*.java" />
               <hibernate validatexml="true" version="2.0" />
       </hibernatedoclet>
       <hibernatedoclet destdir="${build.dir}/v2/gen" mergedir="metadata/v2" excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
           <fileset dir="src/v2" includes="**/archive/targetEntity/*.java" />
               <hibernate validatexml="true" version="2.0" />
       </hibernatedoclet>
</target>

<target name="hibernatedoclet-v2-ca" depends="prepare" unless="hibernatedoclet.ca.unnecessary">
       <hibernatedoclet destdir="${build.dir}/v2/gen" mergedir="metadata/v2" excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
           <fileset dir="src/v2" includes="**/ca/entity/*.java" />
               <hibernate validatexml="true" version="2.0" />
       </hibernatedoclet>
</target>

<target name="hibernatedoclet-v2" 
depends="prepare,hibernatedoclet-v2-bm,hibernatedoclet-v2-et,hibernatedoclet-v2-eximin,hibernatedoclet-v2-serverdata,hibernatedoclet-v2-r24,hibernatedoclet-r24-partner,hibernatedoclet-v2-declare,hibernatedoclet-v2-mini,hibernatedoclet-v2-archive,hibernatedoclet-v2-ca" 
description="Generate Hibernate mapping files">
<!-- generate hibernate files -->
</target>


<target name="hibernatedoclet-lcl-base" depends="prepare" unless="hibernatedoclet.lcl.unnecessary">
<hibernatedoclet destdir="${build.dir}/lcl/gen" mergedir="metadata/lcl" excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
<fileset dir="src/lcl" includes="**/entity/*.java" />
<hibernate validatexml="true" version="2.0" />
</hibernatedoclet>
</target>


<target name="hibernatedoclet-lcl" 
depends="prepare,hibernatedoclet-lcl-base" 
description="Generate Hibernate mapping files">
<!-- generate hibernate files -->
</target>
<target name="hibernatedoclet-v2-r24" 
depends="prepare,hibernatedoclet-r24-ex,hibernatedoclet-r24-im" 
description="Generate Hibernate mapping files">
<!-- generate R24 hibernate files -->
</target>

<target name="compile-fw.tomcat" depends="prepare" unless="with.weblogic">
<compile module="fw" />
<mkdir dir="${test.dir}/fw/classes" />
<javac srcdir="test/fw" destdir="${test.dir}/fw/classes" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" classpathref="fw.test.classpath">
<classpath>
<path refid="fw.test.classpath" />
<path location="${build.dir}/fw/classes" />
</classpath>
</javac>
</target>


<target name="compile-fw.weblogic" depends="prepare" if="with.weblogic">
<mkdir dir="${build.dir}/fw/src" />
<copy todir="${build.dir}/fw/src">
<fileset dir="${src}/fw" />
</copy>
<replace dir="${build.dir}/fw/src" value="javax.transaction.UserTransaction">
<include name="**/*.java" />
<replacetoken>java:comp/UserTransaction</replacetoken>
</replace>
<replace dir="${build.dir}/fw/src" value="${edi.upload.dir}">
           <include name="**/*.java" />
           <replacetoken>C:\\tmp</replacetoken>
</replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.shdg.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EDI_SHDG_HOME_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.receive.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EDI_RECEIVE_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.shdgTrans.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EDI_SHDG_TRANS_HOME_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.docuif.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EDI_DOC_UIF_HOME_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.lclbkguif.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EDI_LCL_BKG_UIF_HOME_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.lcluif.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EDI_OUTBOX_LCL_UIF_HOME_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.bayplan15.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EDI_BAY_PLAN_15_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.bayplan12.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EDI_BAY_PLAN_12_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.itschedule.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EDI_DOMVESSEL_HOME_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.bayplan.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EDI_BAYPLAN_HOME_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.eamd.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EAMD_OUT_BOX_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.eamd.tmp.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EAMD_OUT_BOX_TEMP_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.eamd.seq.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\EAMD\\SEQUENCE_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.transbill.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\TRANSBILL_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.transbill.tmp.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\TRANSBILL\\TEMP_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.ngbtransbill.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\NGB_TRANSBILL_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.ngbtransbill.tmp.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\NGB_TRANSBILL\\TEMP_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.eclp.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\ECLP_COSTRP_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.eclp.tmp.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\ECLP_COSTRP_TEMP_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.r24cntr.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\MANIFEST_PACKING_SHIP_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.r24cntr.tmp.upload.dir}">
           <include name="Constants.java" />
           <replacetoken>C:\\MANIFEST_PACKING_SHIP_TEMP_VAR</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.lclr24.upload.dir}">
                      <include name="Constants.java" />
                      <replacetoken>C:\\EDI_LCL_R24_HOME_VAR</replacetoken>
                  </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${coris.app.job.dir}">
                      <include name="Constants.java" />
                      <replacetoken>D:\\CORIS_JOB_VAR</replacetoken>
                  </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.eclp.ngb.dir}">
                      <include name="Constants.java" />
                      <replacetoken>C:\\ECLP_COSTRP_NB_VAR</replacetoken>
                  </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.eclp.ngb.tmp.dir}">
                      <include name="Constants.java" />
                      <replacetoken>C:\\ECLP_COSTRP_NB_TEMP_VAR</replacetoken>
                  </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.lcl.pcust.dir}">
                      <include name="Constants.java" />
                      <replacetoken>C:\\LCLEXCUSTBKG</replacetoken>
                  </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${env}">
                      <include name="Constants.java" />
                      <replacetoken>PP_ENV</replacetoken>
                  </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${project.type}">
                      <include name="Constants.java" />
                      <replacetoken>CORISApp</replacetoken>
                  </replace>
      <replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.db.ip}">
           <include name="Constants.java" />
           <replacetoken>172.22.224.142:4100</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.db.user}">
           <include name="Constants.java" />
           <replacetoken>coris_user</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.db.pwd}">
      <include name="Constants.java" />
       <replacetoken>corisRead$1</replacetoken>
                                   </replace>

<replace dir="${build.dir}/fw/src/fwserver/utility" value="${ieir.db.ip}">
           <include name="Constants.java" />
           <replacetoken>172.22.224.152:1521</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${ieir.db.user}">
           <include name="Constants.java" />
           <replacetoken>ieir_coris</replacetoken>
       </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${ieir.db.pwd}">
      <include name="Constants.java" />
       <replacetoken>ieir_coris_ps</replacetoken>
                                   </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${ebusiness.server}">
      <include name="Constants.java" />
       <replacetoken>172.22.224.162:9080</replacetoken>
                                   </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.crm.upload.dir}">
      <include name="Constants.java" />
       <replacetoken>C:\\CRM</replacetoken>
                                   </replace>
<replace dir="${build.dir}/fw/src/fwserver/utility" value="${edi.crm.prefix.dir}">
      <include name="Constants.java" />
       <replacetoken>http://172.32.246.38:8080/coris/</replacetoken>
                                   </replace>

   <replace dir="${build.dir}/fw/src" value="${webservice.bl.host}">
       <include name="**/*.java" />
       <replacetoken>172.22.13.43:4244</replacetoken>
   </replace>
        <replace dir="${build.dir}/fw/src" value="${coris.version}">
            <include name="**/*.java" />
            <replacetoken>@CORIS_VERSION@</replacetoken>
        </replace>
<!-- 修改关闭掉输出报文内容 -->
        <replace dir="${build.dir}/fw/src" value="IS_PRINT_XML_MESSAGE = false">
            <include name="**/*.java" />
            <replacetoken>IS_PRINT_XML_MESSAGE = true</replacetoken>
        </replace>
<mkdir dir="${build.dir}/fw/classes" />
<javac srcdir="${build.dir}/fw/src" destdir="${build.dir}/fw/classes" 
            debug="${compile.debug}" deprecation="${compile.deprecation}" 
            optimize="${compile.optimize}" 
            classpathref="fw.compile.classpath">
</javac>
<mkdir dir="${test.dir}/fw/classes" />
<javac srcdir="test/fw" destdir="${test.dir}/fw/classes" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" classpathref="fw.test.classpath">
<classpath>
<path refid="fw.test.classpath" />
<path location="${build.dir}/fw/classes" />
</classpath>
</javac>
</target>


<target name="compile-fw" depends="compile-fw.tomcat,compile-fw.weblogic">


</target>


<target name="package-fw" depends="compile-fw" description="Package FW JAR">
<!-- Copy XML files from source -->
<mkdir dir="${build.dir}/fw/gen" />
<jar destfile="${dist.dir}/${app.name}-fw.jar">
<manifest>
<attribute name="Class-Path" value="${app.name}-fw.jar" />
</manifest>
<fileset dir="${build.dir}/fw/classes" />
</jar>
</target>




<target name="compile-v1" depends="package-fw" description="Compile dao module">
<compile module="v1" />
</target>




<target name="package-v1" depends="prepare,compile-v1" description="Package V1 JAR">
<!-- Copy XML files from source -->
<mkdir dir="${build.dir}/v1/gen" />
<copy todir="${build.dir}/v1/gen">
<fileset dir="src/v1" includes="**/*.xml" excludes="**/*-${dao.type}.xml" />
<filterset refid="variables.to.replace" />
</copy>
<jar destfile="${dist.dir}/${app.name}-v1.jar">
<manifest>
<attribute name="Class-Path" value="${app.name}-v1.jar" />
</manifest>
<fileset dir="${build.dir}/v1/classes" />
<fileset dir="${build.dir}/v1/gen" includes="**/*.xml" excludes="**/applicationContext-*.xml" />
</jar>
</target>


<target name="compile-v2" depends="package-v1,hibernatedoclet-v2" description="Compile dao module">
<compile module="v2" />
<compiletest module="v2" testtype="dao" />
<compiletest module="v2" testtype="sd" />
<if>
<isset property="coverage" />
<then>
<mkdir dir="${out.instr.dir}" />
<mkdir dir="${coverage.dir}" />
<path id="emma.main.path">
<path location="${build.dir}/v2/classes" />
</path>
<emma enabled="${emma.enabled}">
<instr instrpathref="emma.main.path" destdir="${out.instr.dir}" metadatafile="${coverage.dir}/metadata.emma" merge="true">
</instr>
</emma>
</then>
<else>
<echo message="not use coverage" />
</else>
</if>
</target>


<target name="package-v2" depends="prepare,compile-v2" description="Package DAO JAR">
<!-- Copy XML files from source -->
<mkdir dir="${build.dir}/v2/gen" />
<copy todir="${build.dir}/v2/gen">
<fileset dir="src/v2" includes="**/*.xml" excludes="**/*-${dao.type}.xml" />
<!--
<filterset refid="variables.to.replace" />
-->
</copy>
<jar destfile="${dist.dir}/${app.name}-v2.jar">
<manifest>
<attribute name="Class-Path" value="${app.name}-dao.jar" />
</manifest>
<fileset dir="${build.dir}/v2/classes" />
<fileset dir="${build.dir}/v2/gen" includes="**/*.xml" />
</jar>
</target>


<target name="test-v2-dao" depends="copy-resources,package-v2,db-load,check-debug" description="Test dao module">
<test-module module="v2" testtype="dao" additional.src.dirs="${build.dir}/dao/gen" />
</target>


<target name="test-v2-sd" depends="copy-resources,package-v2,db-load,check-debug" description="Test dao module">
<test-module module="v2" testtype="sd" additional.src.dirs="${build.dir}/dao/gen" />
</target>




<target name="compile-lcl" depends="package-v2,hibernatedoclet-lcl" description="Compile dao module">
<compile module="lcl" />
<compiletest module="lcl" testtype="dao" />
<compiletest module="lcl" testtype="sd" />
<if>
<isset property="coverage" />
<then>
<mkdir dir="${out.instr.dir}" />
<mkdir dir="${coverage.dir}" />
<path id="emma.main.path">
<path location="${build.dir}/lcl/classes" />
</path>
<emma enabled="${emma.enabled}">
<instr instrpathref="emma.main.path" destdir="${out.instr.dir}" metadatafile="${coverage.dir}/metadata.emma" merge="true">
</instr>
</emma>
</then>
<else>
<echo message="not use coverage" />
</else>
</if>
</target>


<target name="package-lcl" depends="prepare,compile-lcl" description="Package LCL DAO JAR">
<!-- Copy XML files from source -->
<mkdir dir="${build.dir}/lcl/gen" />
<copy todir="${build.dir}/lcl/gen">
<fileset dir="src/lcl" includes="**/*.xml" excludes="**/*-${dao.type}.xml" />
<!--
<filterset refid="variables.to.replace" />
-->
</copy>
<jar destfile="${dist.dir}/${app.name}-lcl.jar">
<manifest>
<attribute name="Class-Path" value="${app.name}-lcl.jar" />
</manifest>
<fileset dir="${build.dir}/lcl/classes" />
<fileset dir="${build.dir}/lcl/gen" includes="**/*.xml" />
</jar>
</target>


<target name="test-lcl-dao" depends="copy-resources,package-lcl,db-load,check-debug" description="Test dao module">
<test-module module="lcl" testtype="dao" additional.src.dirs="${build.dir}/dao/gen" />
</target>


<target name="test-lcl-sd" depends="copy-resources,package-lcl,db-load,check-debug" description="Test lcl dao module">
<test-module module="lcl" testtype="sd" additional.src.dirs="${build.dir}/dao/gen" />
</target>


<target name="test-dao" depends="test-v2-dao" description="Alias V2 DAO Test" />


<target name="test-sd" depends="test-v2-sd" description="Alias V2 SD Test" />




<!-- =================================================================== -->
<!--            Run SD WebTests using Cargo                           -->
<!-- =================================================================== -->
<target name="test-v2-cargo" if="tomcat.home" depends="war,check-debug" description="Runs Canoo WebTests using Cargo">


<taskdef resource="cargo.tasks">
<classpath>
<fileset dir="${cargo.dir}" includes="*.jar" />
</classpath>
</taskdef>


<echo>running canoo tests at:
              http://${tomcat.server}:${http.port}/${webapp.name}</echo>


<if>
<isset property="tomcat5" />
<then>
<property name="cargoId" value="tomcat5x" />
</then>
<else>
<property name="cargoId" value="tomcat4x" />
</else>
</if>


<echo message="Starting ${cargoId}..." />
<cargo containerId="${cargoId}" id="${cargoId}" home="${tomcat.home}" output="${test.dir}/cargo.log" action="start">
<configuration dir="${test.dir}/${cargoId}">
<property name="cargo.logging" value="high" />
<property name="cargo.servlet.port" value="${http.port}" />
<!--<property name="cargo.jvmargs" value="${run.appfuse.test.debugargline}"/>-->
<deployable type="war" file="${webapp.dist}/${webapp.war}" />
</configuration>
</cargo>


<antcall target="test-v2-sd" />


<cargo refid="${cargoId}" action="stop" />
</target>


<!-- Simple alias to compile-web -->
<target name="compile" depends="package-lcl" description="alias for compile-web" />


<target name="stage2weblogic" if="package.for.weblogic">


</target>




<!-- Simple alias to package-web -->
<target name="war" depends="package-web" description="alias for package-web" />


<target name="package-web" depends="package-lcl,stage-web" description="Package WAR">
<mkdir dir="${build.dir}/web/classes" />
<propertyfile comment="Build Information" file="${build.dir}/web/classes/build.properties">
<entry key="build.date" type="date" pattern="EEEE MMM dd, yyyy" value="now" />
<entry key="build.time" type="date" pattern="hh🇲🇲ss a zz" value="now" />
<entry key="build.username" value="${user.name}" />
<entry key="build.computer" value="${env.COMPUTERNAME}" />
<entry key="build.dao.type" value="${dao.type}" />
<entry key="app.version" value="${app.version}" />
</propertyfile>
<!-- If Tomcat 5, uncomment the <dispatcher> elements in filter-mappings -->
<if>
<or>
<isset property="tomcat5" />
<isset property="tomcat5.5" />
</or>
<then>
<replaceregexp flags="g" file="${webapp.target}/WEB-INF/web.xml" match='&lt;!--dispatcher&gt;' replace='&lt;dispatcher&gt;' />
<replaceregexp flags="g" file="${webapp.target}/WEB-INF/web.xml" match='&lt;/dispatcher--&gt;' replace='&lt;/dispatcher&gt;' />
</then>
</if>
<echo>Preparing tomcat-context.xml for inclusion in war</echo>
<!-- Copy tomcat-context.xml file to context.xml -->
<if>
<and>
<isset property="tomcat5" />
<not>
<isset property="tomcat5.5" />
</not>
</and>
<then>
<copy tofile="${webapp.dist}/context.xml" file="metadata/conf/tomcat-context.xml" overwrite="true">
<filterset refid="db.variables" />
</copy>
</then>
<elseif>
<isset property="tomcat5.5" />
<then>
<copy tofile="${webapp.dist}/context.xml" file="metadata/conf/tomcat-context-5.5.xml" overwrite="true">
<filterset refid="db.variables" />
</copy>
</then>
</elseif>
</if>
<!-- Copy .properties files in src tree to build/web/classes -->
<copy todir="${build.dir}/web/classes">
<fileset dir="src/fw">
<include name="**/*.properties" />
<include name="**/*.xml" />
<include name="**/*.jpg" />
<include name="**/*.ttf" />
</fileset>
</copy>
<replaceregexp flags="g" file="${build.dir}/web/classes/hibernate.cfg.xml" match="net.sf.hibernate.transaction.JDBCTransactionFactory" replace="net.sf.hibernate.transaction.JTATransactionFactory" />
        <!-- Copy hibernate.cfg.xml as OLAP configure file -->
        <copy tofile="${build.dir}/web/classes/hibernate_olap.cfg.xml" 
                file="${build.dir}/web/classes/hibernate.cfg.xml"/>
        <replace dir="${build.dir}/web/classes" value="java:comp/env/jdbc/corisOlapDB">
            <include name="hibernate_olap.cfg.xml" />
            <replacetoken>java:comp/env/jdbc/corisDB</replacetoken>
        </replace>
<!-- Copy hibernate.cfg.xml as OLAPHIS configure file -->
       <copy tofile="${build.dir}/web/classes/hibernate_olap_his.cfg.xml" 
               file="${build.dir}/web/classes/hibernate.cfg.xml"/>
       <replace dir="${build.dir}/web/classes" value="java:comp/env/jdbc/corisOlapHisDB">
           <include name="hibernate_olap_his.cfg.xml" />
           <replacetoken>java:comp/env/jdbc/corisDB</replacetoken>
       </replace>
        <!-- Copy hibernate.cfg.xml as JOB configure file -->
        <copy tofile="${build.dir}/web/classes/hibernate_job.cfg.xml" 
                file="${build.dir}/web/classes/hibernate.cfg.xml"/>
        <replace dir="${build.dir}/web/classes" value="java:comp/env/jdbc/corisJOB">
            <include name="hibernate_job.cfg.xml" />
            <replacetoken>java:comp/env/jdbc/corisDB</replacetoken>
        </replace>
        <!-- Copy hibernate.cfg.xml as IM configure file -->
        <copy tofile="${build.dir}/web/classes/hibernate_im.cfg.xml" 
                file="${build.dir}/web/classes/hibernate.cfg.xml"/>
        <replace dir="${build.dir}/web/classes" value="java:comp/env/jdbc/corisIMDB">
            <include name="hibernate_im.cfg.xml" />
            <replacetoken>java:comp/env/jdbc/corisDB</replacetoken>
        </replace>
        <!-- Copy hibernate.cfg.xml as EX configure file -->
        <copy tofile="${build.dir}/web/classes/hibernate_ex.cfg.xml" 
                file="${build.dir}/web/classes/hibernate.cfg.xml"/>
        <replace dir="${build.dir}/web/classes" value="java:comp/env/jdbc/corisEXDB">
            <include name="hibernate_ex.cfg.xml" />
            <replacetoken>java:comp/env/jdbc/corisDB</replacetoken>
        </replace>
<!-- Copy hibernate.cfg.xml as ODS configure file -->
<copy tofile="${build.dir}/web/classes/hibernate_ods.cfg.xml" 
               file="${build.dir}/web/classes/hibernate.cfg.xml"/>
<replace dir="${build.dir}/web/classes" value="java:comp/env/jdbc/corisODS">
 <include name="hibernate_ods.cfg.xml" />
<replacetoken>java:comp/env/jdbc/corisDB</replacetoken>
</replace>   
<!-- Copy hibernate.cfg.xml as SHAYS configure file -->
<copy tofile="${build.dir}/web/classes/hibernate_shays.cfg.xml" 
               file="${build.dir}/web/classes/hibernate.cfg.xml"/>
<replace dir="${build.dir}/web/classes" value="java:comp/env/jdbc/corisSHAYS">
 <include name="hibernate_shays.cfg.xml" />
<replacetoken>java:comp/env/jdbc/corisDB</replacetoken>
</replace>  
<!-- Copy hibernate.cfg.xml as SHAWG configure file -->
<copy tofile="${build.dir}/web/classes/hibernate_shawg.cfg.xml" 
               file="${build.dir}/web/classes/hibernate.cfg.xml"/>
<replace dir="${build.dir}/web/classes" value="java:comp/env/jdbc/corisSHAWG">
 <include name="hibernate_shawg.cfg.xml" />
<replacetoken>java:comp/env/jdbc/corisDB</replacetoken>
</replace>  
   <!-- Copy hibernate.cfg.xml as EDIToR24 configure file -->
   <copy tofile="${build.dir}/web/classes/hibernate_editor24.cfg.xml" 
               file="${build.dir}/web/classes/hibernate.cfg.xml"/>
   <replace dir="${build.dir}/web/classes" value="java:comp/env/jdbc/corisEDIToR24">
         <include name="hibernate_editor24.cfg.xml" />
         <replacetoken>java:comp/env/jdbc/corisDB</replacetoken>
   </replace>
<if>
<and>
<isset property="with.weblogic" />
</and>
<then>
<replace dir="${build.dir}/web/classes" value="coris2DB">
<include name="hibernate.cfg.xml" />
<replacetoken>java:comp/env/jdbc/corisDB</replacetoken>
</replace>
                <replace dir="${build.dir}/web/classes" value="coris2OlapDB">
                    <include name="hibernate_olap.cfg.xml" />
                    <replacetoken>java:comp/env/jdbc/corisOlapDB</replacetoken>
                </replace>
<replace dir="${build.dir}/web/classes" value="coris2OlapHisDB">
   <include name="hibernate_olap_his.cfg.xml" />
   <replacetoken>java:comp/env/jdbc/corisOlapHisDB</replacetoken>
</replace>
                <replace dir="${build.dir}/web/classes" value="coris2JOB">
                    <include name="hibernate_job.cfg.xml" />
                    <replacetoken>java:comp/env/jdbc/corisJOB</replacetoken>
                </replace>
<replace dir="${build.dir}/web/classes" value="corisODS">
<include name="hibernate_ods.cfg.xml" />
<replacetoken>java:comp/env/jdbc/corisODS</replacetoken>
</replace>
<replace dir="${build.dir}/web/classes" value="corisSHAYS">
<include name="hibernate_shays.cfg.xml" />
<replacetoken>java:comp/env/jdbc/corisSHAYS</replacetoken>
</replace>
<replace dir="${build.dir}/web/classes" value="corisSHAWG">
<include name="hibernate_shawg.cfg.xml" />
<replacetoken>java:comp/env/jdbc/corisSHAWG</replacetoken>
</replace>
                <replace dir="${build.dir}/web/classes" value="coris2IMDB">
                    <include name="hibernate_im.cfg.xml" />
                    <replacetoken>java:comp/env/jdbc/corisIMDB</replacetoken>
                </replace>
                <replace dir="${build.dir}/web/classes" value="coris2EXDB">
                    <include name="hibernate_ex.cfg.xml" />
                    <replacetoken>java:comp/env/jdbc/corisEXDB</replacetoken>
                </replace>
                
                <!-- archive data recall data source -->
                <replace dir="${build.dir}/web/classes" value="corisArchiveDB">
                    <include name="hibernate_archive.cfg.xml" />
                    <replacetoken>java:comp/env/jdbc/corisArchiveDB</replacetoken>
                </replace>
                <replace dir="${build.dir}/web/classes" value="coris2DB">
                    <include name="hibernate_target.cfg.xml" />
                    <replacetoken>java:comp/env/jdbc/corisDB</replacetoken>
                </replace>
                   
<replace dir="${build.dir}/web/classes" value="${ldap.host}">
<include name="coris.ldap.properties" />
<replacetoken>172.32.235.49</replacetoken>
</replace>
   <replace dir="${build.dir}/web/classes" value="${webservice.host}">
       <include name="coris.interface.properties" />
       <replacetoken>172.22.13.43:4243</replacetoken>
   </replace>
<replace dir="${build.dir}/web/classes" value="${env}">
       <include name="mail.properties" />
       <replacetoken>PP_ENV</replacetoken>
        </replace>
                <replace dir="${build.dir}/web/classes" value="corisEDIToR24">
<include name="hibernate_editor24.cfg.xml" />
<replacetoken>java:comp/env/jdbc/corisEDIToR24</replacetoken>
   </replace>
</then>
</if>


        <if>
            <and>
                <isset property="with.weblogic" />
                <isset property="replace.weblogic.appname" />
            </and>
            <then>
                <replace dir="${webapp.target}" value="${replace.weblogic.appname}">
                    <include name="WEB-INF/weblogic.xml" />
                    <replacetoken>coris2</replacetoken>
                </replace>
            </then>
        </if>
            


<copy todir="${build.dir}/web/classes">
<fileset dir="src/v1">
<include name="**/*.properties" />
<include name="**/*.xml" />
</fileset>
</copy>
<copy todir="${build.dir}/web/classes">
<fileset dir="src/v2">
<include name="**/*.properties" />
<include name="**/*.xml" />
<include name="**/*.config"/>
                <include name="**/*.vm"/>
</fileset>
</copy>
<copy todir="${build.dir}/web/classes">
<fileset dir="src/lcl">
<include name="**/*.properties" />
<include name="**/*.xml" />
<include name="**/*.config"/>
                <include name="**/*.vm"/>
</fileset>
</copy>



<replace dir="${build.dir}/web/classes/com/cosco/coris/edi/sh/dg" value="${edi.shvsl.upload.dir}">
           <include name="DgEdiFileInfo.properties" />
           <replacetoken>/home/weblogic/data/coris/edi/SHDG/OUTBOX/</replacetoken>
       </replace>
<replace dir="${build.dir}/web/classes/com/cosco/coris/edi/sh/dgcargo" value="${edi.msa.upload.dir}">
           <include name="DgEdiCargoMsa.properties" />
           <replacetoken>/home/weblogic/data/coris/edi/SHDG/MSA/OUTBOX/</replacetoken>
       </replace>


<if>
<isset property="coverage" />
<then>
<copy todir="${build.dir}/web/classes">
<fileset dir="${out.instr.dir}" />
</copy>
</then>
<else>
<copy todir="${build.dir}/web/classes">
<fileset dir="${build.dir}/v2/classes" />
</copy>
<copy todir="${build.dir}/web/classes">
<fileset dir="${build.dir}/lcl/classes" />
</copy>
</else>
</if>


<if>
<isset property="use.job" />
<then>
<delete file="${webapp.target}/WEB-INF/web.xml"/>
<copy tofile="${webapp.target}/WEB-INF/web.xml" 
   file="metadata/web.xml">
</copy>
</then>
</if>
<war destfile="${webapp.dist}/${webapp.war}" webxml="${webapp.target}/WEB-INF/web.xml" compress="true">
<fileset dir="${webapp.target}" excludes="**/web.xml,**/*-resources.xml" />
<metainf dir="${webapp.dist}" includes="context.xml" />


<classes dir="${build.dir}/web/classes">
<exclude name="**/database.properties" />
</classes>
<classes dir="${build.dir}/v2/gen" />
<classes dir="${build.dir}/lcl/gen" />


<lib file="${dist.dir}/${app.name}-fw.jar" />
<lib file="${dist.dir}/${app.name}-v1.jar" />
<!--
            <lib file="${dist.dir}/${app.name}-v2.jar"/>
            -->
<webinf dir="web/WEB-INF" includes="*-resources.xml" />
<lib file="${log4j.jar}" />
<lib file="${hibernate.jar}" />
<lib file="${httpclient.jar}" />
<lib file="${coris-support.dir}/lib/activation.jar" />
<lib file="${coris-support.dir}/lib/quartz.jar" />
<lib file="${coris-support.dir}/lib/axis.jar" />
<lib file="${coris-support.dir}/lib/aspectjrt.jar" />
<lib file="${coris-support.dir}/lib/codec1.2.jar" />
<lib file="${coris-support.dir}/lib/jaxrpc.jar" />
<lib file="${coris-support.dir}/lib/jdom.jar" />
<lib file="${coris-support.dir}/lib/jxl.jar" />
<lib file="${coris-support.dir}/lib/jzlib-1.0.7.jar" />
<lib file="${coris-support.dir}/lib/ldapfilt.jar" />
<lib file="${coris-support.dir}/lib/ldapjdk.jar" />
<lib file="${coris-support.dir}/lib/ldapsp.jar" />
<lib file="${coris-support.dir}/lib/saaj.jar" />
<!-- 将velocity-1.3替换成velocity-1.6-dep.jar added by weidl 2009-2-17 -->
<lib file="${coris-support.dir}/lib/velocity-1.6-dep.jar" />
<lib file="${coris-support.dir}/lib/wsdl4j-1.5.1.jar" />
<lib dir="${hibernate.dir}/lib" includes="*.jar" excludes="jta.jar" />
<lib dir="${commons.dir}" includes="*.jar" />
<lib dir="${poi.dir}" includes="*.jar" />
<lib dir="${jmail.dir}" includes="*.jar" />
<lib dir="${jstl.dir}" includes="*.jar" />
<lib dir="${logkit.dir}" includes="*.jar" />
<lib dir="${xmlbeans.dir}" includes="*.jar" />
<lib file="${ojdbc.jar}" />
<lib file="${coscon_xml.jar}" />
<lib file="${itextpdf.jar}" />
</war>
</target>


<macrodef name="compile">
<attribute name="module" />
<attribute name="additional.src.dirs" default="" />
<element name="options" optional="yes" />


<sequential>
<echo>Compiling @{module} Source...</echo>
<mkdir dir="${build.dir}/@{module}/classes" />


<javac srcdir="${src}/@{module};@{additional.src.dirs}" destdir="${build.dir}/@{module}/classes" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" classpathref="@{module}.compile.classpath">
<options />
</javac>
</sequential>
</macrodef>


<macrodef name="compiletest">
<attribute name="module" />
<attribute name="testtype" />
<attribute name="additional.src.dirs" default="" />
<element name="options" optional="yes" />


<sequential>
<echo>Compiling @{module} @{testtype} Test...</echo>
<mkdir dir="${test.dir}/@{module}/@{testtype}/classes" />
<javac srcdir="test/@{module}/@{testtype}" destdir="${test.dir}/@{module}/@{testtype}/classes" debug="true">
<classpath>
<path refid="@{module}.@{testtype}.test.classpath" />
<path location="${build.dir}/@{module}/classes" />
<path location="${build.dir}/@{module}/@{testtype}/classes" />
</classpath>
<options />
</javac>
</sequential>
</macrodef>


<macrodef name="test-module">
<attribute name="module" />
<attribute name="testtype" />
<attribute name="additional.src.dirs" default="" />
<element name="options" optional="yes" />


<sequential>
<echo level="info">Testing @{module} @{testtype}...</echo>
<mkdir dir="${test.dir}/data" />
<propertycopy name="testcase" from="@{module}-testcase" silent="true" />
<!-- Replace tokens in test properties files -->
<copy todir="${test.dir}/@{module}/@{testtype}/classes">
<fileset dir="test/@{module}/@{testtype}" excludes="**/*.java" />
<!--   这段filter会造成excel文件格式出错,而且test中现在没有用到什么要filter的内容,先去掉
                <filterset refid="variables.to.replace"/>
                -->
</copy>


<junit printsummary="no" forkmode="once" errorProperty="test.failed" failureProperty="test.failed" fork="${junit.fork}">
<classpath>
<pathelement location="${out.instr.dir}" />
<pathelement location="${test.dir}/@{module}/@{testtype}/classes" />
<pathelement path="@{additional.src.dirs}" />
<path refid="@{module}.@{testtype}.test.classpath" />


<pathelement location="${test.dir}/fw/classes" />
<pathelement location="${build.dir}/@{module}/@{testtype}/classes" />
<pathelement path="${java.class.path}" />
<pathelement path="${webapp.target}" />
<pathelement path="${build.dir}/dao/gen" />
<!-- For .properties and .xml files -->
<pathelement path="${build.dir}/web/classes" />
<pathelement path="src/@{module}" />
<pathelement path="src/v1" />
<pathelement path="src/fw" />
</classpath>
<jvmarg line="${run.coris2.test.debugargline}" />
<jvmarg value="-Demma.coverage.out.file=${coverage.dir}/metadata.emma" />
<jvmarg value="-Demma.coverage.out.merge=true" />
<formatter type="xml" />
<formatter type="brief" usefile="false" />
<batchtest todir="${test.dir}/data" if="testcase">
<fileset dir="${test.dir}/@{module}/@{testtype}/classes">
<include name="**/*${testcase}*" />
<exclude name="**/*TestCase.class" />
</fileset>
</batchtest>
<batchtest todir="${test.dir}/data" unless="testcase">
<fileset dir="${test.dir}/@{module}/@{testtype}/classes">
<include name="**/*Test.class*" />
</fileset>
</batchtest>
</junit>


<if>
<and>
<isset property="notexit.on.fail" />
</and>
<then>
</then>
<else>
<fail if="test.failed">
                      Unit tests failed. For error messages, check the log files in
                      ${test.dir}/data or run "ant test-reports"
                      to generate reports at ${test.dir}/reports.</fail>
</else>
</if>


</sequential>
</macrodef>


<target name="test-reports" description="Generate test reports">
<mkdir dir="${test.dir}/reports" />
<taskdef name="java2html" classname="com.java2html.Java2HTMLTask" classpath="${j2h.jar}" />
<java2html destination="${test.dir}/reports">
<fileset dir="test">
<patternset refid="java.files.pattern" />
</fileset>
</java2html>
<junitreport todir="${test.dir}">
<fileset dir="${test.dir}/data">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" styledir="metadata/junitstyle" todir="${test.dir}/reports" />
</junitreport>
<echo level="info">
        Test reports generated at ${test.dir}/reports
        </echo>
</target>


<!-- =================================================================== -->
<!--            Run all tests (tomcat not running)                       -->
<!-- =================================================================== -->
<target name="test-all" depends="test-v2-dao,test-v2-cargo" description="runs all tests for dao, service, web and jsp">
<antcall target="db-load" />
</target>


<!-- =================================================================== -->
<!--  Run all tests (tomcat IS running). The deploy-test-war task        -->
<!--  should be run before this one.                                     -->
<!-- =================================================================== -->
<target name="test-all-running" description="runs all tests for DAOs, Services, Controllers and JSPs">
<antcall target="test-v2-dao" />
<antcall target="test-v2-sd" />
<antcall target="db-load" />
</target>


<!-- =================================================================== -->
<!--            Simple task to ping tomcat and make sure it's running    -->
<!-- =================================================================== -->
<target name="ping-tomcat" description="pings tomcat to make sure it's running">
<echo level="info">Verifying that tomcat is running...</echo>
<get src="http://${tomcat.server}:${http.port}/${app.name}" dest="../ping-${tomcat.server}.html" />
</target>


<!-- =================================================================== -->
<!--            Export the data                                          -->
<!-- =================================================================== -->
<target name="db-export" depends="prepare" description="Exports the current data in the database">
<dbunit driver="${database.driver_class}" classpathref="fw.test.classpath" url="${database.url}" userid="${database.username}" password="${database.password}">
<export dest="db-export.xml" format="xml">
<query name="${exp.table}" sql="select top 10 * from ${exp.db}..${exp.table}" />
</export>
</dbunit>
</target>


<target name="db-load" depends="prepare" description="Loads the database with sample data">
<!--
        <property name="operation" value="REFRESH"/>
        <property name="file" value="metadata/sql/sactionprofile.xml"/>
        <dbunit driver="${database.driver_class}" 
            supportBatchStatement="false"
            url="${database.url};DatabaseName=dbcrsp1"
            userid="${database.username}"
            password="${database.password}">
            <operation type="${operation}" src="${file}" format="xml"/>
        </dbunit>
        -->
</target>


<!-- =================================================================== -->
<!-- The "db-prepare" target generates the database schema and creates   -->
<!-- tables based on the mapping files                                   -->
<!-- =================================================================== -->
<target name="db-prepare" depends="clean,package-lcl" description="creates database tables">


<!-- CORIS2不使用hbm生成数据库 -->
<!-- 
        <taskdef name="schemaexport"
            classname="org.hibernate.tool.hbm2ddl.SchemaExportTask">
            <classpath>
                <path refid="xdoclet.classpath"/>
                <path refid="hibernate.classpath"/>
            </classpath>
        </taskdef>


        <generate-database-properties/>
        <schemaexport quiet="no" text="no" drop="no" delimiter=";" 
            properties="database.properties" output="create-tables.sql">
            <fileset dir="${build.dir}/dao/gen" includes="**/*.hbm.xml"/>
        </schemaexport>
        -->
</target>


<target name="db-drop" depends="hibernatedoclet-v2" description="drops database tables">


<!--
        <taskdef name="schemaexport"
            classname="org.hibernate.tool.hbm2ddl.SchemaExportTask">
            <classpath>
                <path refid="xdoclet.classpath"/>
                <path refid="hibernate.classpath"/>
            </classpath>
        </taskdef>


        <generate-database-properties/>
        <schemaexport quiet="no" text="no" drop="yes" delimiter=";"
            properties="database.properties" output="drop-tables.sql">
            <fileset dir="${build.dir}/dao/gen" includes="**/*.hbm.xml"/>
        </schemaexport>
        -->
</target>


<!-- =================================================================== -->
<!--            Setup Database                                           -->
<!-- =================================================================== -->
<target name="setup-db" depends="db-prepare,db-load" description="creates database and populates by calling other tasks" />


<!-- Remove classes directory for clean build -->
<target name="clean" description="Removes build artifacts">
<echo level="info">Cleaning build and distribution directories</echo>
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete file="database.properties" />
<delete file="create-tables.sql" />
</target>


<!-- =================================================================== -->
<!-- Create JavaDoc Documentation                                        -->
<!-- =================================================================== -->
<target name="javadoc" depends="java2html" description="Generate JavaDoc API docs">
<javadoc destdir="${build.dir}/docs/api" packagenames="com.*" author="true" version="true" windowtitle="${app.name} api" doctitle="&lt;h1&gt;${app.name} javadocs for
                version ${app.version}&lt;/h1&gt;" bottom="Copyright &#169; 2002-${copyright.year}" stylesheetfile="${build.dir}/docs/api/stylesheet.css">


<fileset dir="${src}/v2">
<patternset refid="java.files.pattern" />
</fileset>


<classpath refid="v2.sd.test.classpath" />
<classpath>
<pathelement location="${jmock.jar}" />
<pathelement location="${build.dir}/web/gen" />
</classpath>


<!-- XDoclet Tags -->
<tag name="hibernate.class" scope="all" description="Class:" />
<tag name="hibernate.id" scope="all" description="Id:" />
<tag name="hibernate.property" scope="all" description="Property:" />
<tag name="jsp.tag" scope="all" description="JSP Tag:" />
<tag name="jsp.attribute" scope="all" description="JSP Attribute:" />
<tag name="web.listener" scope="all" description="Listener:" />
<tag name="web.filter" scope="all" description="Filter:" />
<tag name="web.filter-prepare-param" scope="all" description="prepare-Param:" />
<tag name="web.filter-mapping" scope="all" description="Mapping:" />
<tag name="web.servlet" scope="all" description="Servlet:" />
<tag name="web.servlet-prepare-param" scope="all" description="prepare-Param:" />
<tag name="web.servlet-mapping" scope="all" description="Mapping:" />


</javadoc>
</target>


<target name="coverage.report" depends="init">
<mkdir dir="${build.dir}/coverage/html" />
<!-- if enabled, generate coverage report(s): -->
<emma enabled="${emma.enabled}">
<report sourcepath="${src}/v2" sort="+block,+name,+method,+class" metrics="method:70,block:80,line:80,class:100" encoding="UTF-8">
<fileset dir="${build.dir}/coverage">
<include name="*.emma" />
</fileset>


<!-- <xml outfile="${build.dir}/docs/coverage.xml" depth="package" /> -->
<html outfile="${build.dir}/coverage/html/coverage.html" depth="method" columns="name,class,method,block,line" />
</report>
</emma>
</target>


<!-- =================================================================== -->
<!-- Create HTML versions of the Java code in this project               -->
<!-- =================================================================== -->
<target name="java2html" depends="hibernatedoclet-v2" description="creates HTML pages of code for online viewing">
<taskdef name="java2html" classname="com.java2html.Java2HTMLTask" classpath="${j2h.jar}" />


<java2html destination="${build.dir}/docs/api">
<fileset dir="${src}">
<patternset refid="java.files.pattern" />
</fileset>
<fileset dir="test">
<patternset refid="java.files.pattern" />
</fileset>
</java2html>
</target>


<!-- =================================================================== -->
<!-- The "deploy-web" target deploys the web application in the in the   -->
<!-- non-war format.                                                     -->
<!-- =================================================================== -->
<target name="deploy-web" depends="stage-web" if="tomcat.home" description="deploy only web classes to servlet container's deploy directory">


<echo message="Deploying web application to ${tomcat.home}/webapps" />
<copy todir="${tomcat.home}/webapps/${app.name}">
<fileset dir="${webapp.target}" excludes="**/web-test.xml,**/web.xml,**/*-resources.xml" />
</copy>
<copy todir="${tomcat.home}/webapps/${app.name}/WEB-INF/classes">
<fileset dir="${build.dir}/v2/classes" />
</copy>
<copy todir="${tomcat.home}/webapps/${app.name}/WEB-INF/classes">
<fileset dir="${build.dir}/v2/gen" />
</copy>


</target>


<!-- =================================================================== -->
<!--            Refresh - Stops Tomcat, and refreshes everything         -->
<!-- =================================================================== -->
<target name="refresh" depends="undeploy,clean,deploy" description="Undeploys, cleans, then re-deploys" />


<!-- =================================================================== -->
<!-- The "deploy" target deploys the web application by packaging it as  -->
<!-- a WAR and then unpackaging it into Tomcat's webapps directory       -->
<!-- =================================================================== -->
<target name="deploy" depends="package-web" if="tomcat.home" description="unwar into the servlet container's deployment directory">


<unwar src="${webapp.dist}/${webapp.war}" dest="${tomcat.home}/webapps/${app.name}" />


</target>


<!-- =================================================================== -->
<!-- The "undeploy" target deletes the web application archive and the   -->
<!-- web application directory in the compatible servlet container.      -->
<!-- =================================================================== -->
<target name="undeploy" if="tomcat.home" description="undeploy war file to servlet container's deployment dir">
<echo message="Undeploying webapp from Tomcat" />
<delete file="${tomcat.home}/webapps/${webapp.war}" />
<delete dir="${tomcat.home}/webapps/${app.name}" />
</target>


<!-- =================================================================== -->
<!-- The "deploy-war" deploys the web application in the in a war format -->
<!-- =================================================================== -->
<target name="deploy-war" depends="package-web" if="tomcat.home" description="Deploy '${app.name}.war' to local Tomcat">
<copy file="${webapp.dist}/${webapp.war}" todir="${tomcat.home}/webapps" />
</target>


<!-- Utilities -->
<patternset id="java.files.pattern" includes="**/*.java" />


<target name="checkstyle" depends="prepare" description="Check code style for compliance with coding standards">
<property name="checkstyle.data.dir" location="${build.dir}/docs/checkstyle" />
<property name="checkstyle.data.file" location="${checkstyle.data.dir}/checkstyle.xml" />
<property name="checkstyle.report.file" location="${checkstyle.data.dir}/checkstyle.html" />
<property name="checkstyle.xsl.file" location="${checkstyle.dir}/contrib/checkstyle-noframes.xsl" />
<mkdir dir="${checkstyle.data.dir}" />
<taskdef resource="checkstyletask.properties" classpath="${checkstyle.jar}" />
<checkstyle config="${checkstyle.dir}/sun_checks.xml" failOnViolation="false" failureProperty="checkstyle.failure">
<fileset dir="src/v2">
<patternset refid="java.files.pattern" />
</fileset>
<!-- uncomment to print to console as well -->
<!--formatter type="plain"/-->
<formatter type="xml" toFile="${checkstyle.data.file}" />
</checkstyle>
<xslt in="${checkstyle.data.file}" out="${checkstyle.report.file}" style="${checkstyle.xsl.file}" />
</target>


<target name="pmd" if="pmd.jar" depends="prepare" description="Locates unused imports, unused variables, etc.">
<mkdir dir="${build.dir}/docs/pmd" />
<property name="pmd.data.file" value="${build.dir}/docs/pmd/report.pmd.xml" />
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask">
<classpath location="${pmd.jar}" />
<classpath location="${pmd.dir}/lib/jaxen-core-1.0-fcs.jar" />
<classpath location="${pmd.dir}/lib/saxpath-1.0-fcs.jar" />
</taskdef>


<pmd rulesetfiles="rulesets/unusedcode.xml,rulesets/imports.xml" failonerror="no" shortFilenames="true">
<formatter type="xml" toFile="${pmd.data.file}" />
<fileset dir="src/v2">
<patternset refid="java.files.pattern" />
</fileset>
</pmd>
</target>


<target name="todo" description="creates report of todos in code">


<taskdef name="todo" classname="xdoclet.modules.doc.DocumentDocletTask" classpathref="xdoclet.classpath" />


<mkdir dir="${build.dir}/docs/todo" />
<todo destdir="${build.dir}/docs/todo">
<fileset dir="src/v2">
<patternset refid="java.files.pattern" />
</fileset>
</todo>
</target>


<target name="docs" depends="javadoc, todo, checkstyle, pmd" description="runs javadoc, todo, checkstyle and pmd tasks">
<echo level="info">API and Reports generated successfully...</echo>
</target>


<!-- =================================================================== -->
<!--            Setup Tomcat                                             -->
<!-- =================================================================== -->
<target name="setup-tomcat" depends="init" if="tomcat.home" description="copies jdbc driver and context.xml to tomcat">
<if>
<and>
<isset property="tomcat5" />
<not>
<isset property="tomcat5.5" />
</not>
</and>
<then>
<echo message="Detected Tomcat 5..." />
<echo level="info">Copying ${app.name}.xml...</echo>
<copy tofile="${tomcat.home}/conf/Catalina/localhost/${app.name}.xml" file="metadata/conf/tomcat-context.xml" overwrite="true">
<filterset refid="db.variables" />
</copy>
</then>
<elseif>
<isset property="tomcat5.5" />
<then>
<echo message="Detected Tomcat 5.5..." />
<echo level="info">Copying ${app.name}.xml...</echo>
<copy tofile="${tomcat.home}/conf/Catalina/localhost/${app.name}.xml" file="metadata/conf/tomcat-context-5.5.xml" overwrite="true">
<filterset refid="db.variables" />
</copy>
</then>
</elseif>
<else>
<echo message="Detected Tomcat 4..." />
<echo level="info">Copying ${app.name}.xml...</echo>
<copy tofile="${tomcat.home}/webapps/${app.name}.xml" file="metadata/conf/tomcat-context.xml" overwrite="true">
<filterset refid="db.variables" />
</copy>
</else>
</if>


<echo level="info">Copying ${database.type} JDBC Driver...</echo>
<copy todir="${tomcat.home}/common/lib" file="${database.jar}">
</copy>
<echo level="info">Copying JTA support jars...</echo>
<copy todir="${tomcat.home}/common/lib">
<fileset dir="${jotm.dir}" />
</copy>
<echo level="info">Copying EMMA support jars...</echo>
<copy todir="${tomcat.home}/common/lib">
<fileset dir="${emma.dir}" includes="*.jar" />
</copy>
</target>


<!-- =================================================================== -->
<!--            Internal targets to enable running in debug mode         -->
<!-- =================================================================== -->
<target name="check-debug" depends="with-debug,no-debug" />


<target name="with-debug" if="coris2-debug">
<property name="run.coris2.test.debugargline" value="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_shmem,address=coris2-debug,server=y,suspend=y" />
<echo>Running in debug mode with shared memory address 'coris2-debug'</echo>
</target>


<target name="no-debug" unless="coris2-debug">
<property name="run.coris2.test.debugargline" value="" />
</target>


<!-- =================================================================== -->
<!--            Start Tomcat                                             -->
<!-- =================================================================== -->
<target name="start.tomcat" description="starts tomcat in the current console window" depends="init,check-debug">
<java classname="org.apache.catalina.startup.Bootstrap" fork="yes" spawn="${tomcat.spawn}">
            <arg value="-Xms64m -Xmx640m" />
<jvmarg value="-Dcatalina.home=${tomcat.home}" />
<jvmarg value="-Demma.coverage.out.file=${coverage.dir}/metadata.emma" />
<jvmarg value="-Demma.coverage.out.merge=true" />
<jvmarg line="${run.coris2.test.debugargline}" />
<arg value="start" />
<classpath>
<pathelement path="${java.home}/../lib/tools.jar" />
<fileset dir="${tomcat.home}">
<include name="bin/bootstrap.jar" />
</fileset>
</classpath>
</java>
<if>
<equals arg1="${tomcat.spawn}" arg2="true" />
<then>
<sleep seconds="15" />
</then>
</if>
</target>
<target name="stop.tomcat" description="stop tomcat in the current console window" depends="init,check-debug">
<java classname="org.apache.catalina.startup.Bootstrap" fork="yes" spawn="${tomcat.spawn}">
<jvmarg value="-Dcatalina.home=${tomcat.home}" />
<jvmarg value="-Demma.coverage.out.file=${coverage.dir}/metadata.emma" />
<jvmarg value="-Demma.coverage.out.merge=true" />
<jvmarg line="${run.coris2.test.debugargline}" />
<arg value="stop" />
<classpath>
<pathelement path="${java.home}/../lib/tools.jar" />
<fileset dir="${tomcat.home}">
<include name="bin/bootstrap.jar" />
</fileset>
</classpath>
</java>
</target>


<!-- ============================================================== -->
<!-- Tomcat tasks - remove these if you don't have Tomcat installed -->
<!-- ============================================================== -->
<taskdef file="${ant-contrib.dir}/tomcatTasks.properties">
<classpath>
<pathelement path="${tomcat.home}/server/lib/catalina-ant.jar" />
</classpath>
</taskdef>
<target name="install" description="Install application in Tomcat" depends="package-web">
<deploy url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${app.name}" war="file:${webapp.dist}/${webapp.war}" />
</target>


<target name="remove" description="Remove application in Tomcat">
<undeploy url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${app.name}" />
</target>


<target name="reload" description="Reload application in Tomcat">
<reload url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${app.name}" />
</target>


<target name="start" description="Start Tomcat application">
<start url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${app.name}" />
</target>


<target name="stop" description="Stop Tomcat application">
<stop url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${app.name}" />
</target>


<target name="list" description="List Tomcat applications">
<list url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}" />
</target>


<!-- =================================================================== -->
<!--            Creates release (source) distribution                    -->
<!-- =================================================================== -->
<target name="dist" depends="clean" description="create zip and tar.gz of entire directory for distribution">
<property name="archive.prefix" value="${app.name}" />
<property name="archive.name" value="${archive.prefix}-${app.version}-src" />
<property name="archive.target" value="../${archive.name}" />
<zip zipfile="${archive.target}.zip">
<zipfileset prefix="${app.name}" dir="${basedir}">
<patternset id="srcfiles">
<include name="**" />
<exclude name="*.log" />
<exclude name="junit*.properties" />
<exclude name="**/*~" />
<exclude name="**/*.bak" />
<exclude name="*/**.java.txt" />
<exclude name="${dist.dir}" />
<exclude name="${build.dir}" />
<exclude name="bin/**" />
<exclude name=".#**" />
<exclude name="anthill.version" />
<exclude name="www/**" />
<exclude name="*.sh" />
<exclude name="*.sql" />
<exclude name="test-all-*" />
<exclude name="extras/myjavapack" />
</patternset>
</zipfileset>
</zip>
<tar tarfile="${archive.target}.tar">
<tarfileset dir="${basedir}" mode="${tar.mode}" prefix="${app.name}" username="${tar.user}" group="${tar.group}">
<patternset refid="srcfiles" />
</tarfileset>
</tar>
<gzip zipfile="${archive.target}.tar.gz" src="${archive.target}.tar" />
<delete file="${archive.target}.tar" />
</target>


<!-- =================================================================== -->
<!--            Creates release (binary) distribution                    -->
<!-- =================================================================== -->
<target name="bin" depends="clean,package-web" description="creates zip file with war, jdbc drivers, and XML file">


<!-- Copy tomcat-context.xml file to app.name.xml so it's friendlier -->
<copy tofile="${webapp.dist}/${app.name}.xml" file="metadata/conf/tomcat-context.xml">
<filterset refid="db.variables" />
</copy>


<!-- Remove version number from WAR file -->
<move file="${webapp.dist}/${webapp.war}" tofile="${webapp.dist}/${app.name}.war" />


<!-- Copy JDBC Driver -->
<copy todir="${webapp.dist}" file="${database.jar}" />


<!-- Create the zip and tar.gz files -->
<property name="archive.name" value="${app.name}-${app.version}-bin" />
<property name="archive.target" value="${dist.dir}/${archive.name}" />
<zip zipfile="${archive.target}.zip">
<zipfileset prefix="${app.name}-${app.version}" dir="${webapp.dist}">
<patternset id="binfiles">
<include name="**" />
</patternset>
</zipfileset>
</zip>
<tar tarfile="${archive.target}.tar">
<tarfileset dir="${webapp.dist}" mode="${tar.mode}" prefix="${app.name}-${app.version}" username="${tar.user}" group="${tar.group}">
<patternset refid="binfiles" />
</tarfileset>
</tar>
<gzip zipfile="${archive.target}.tgz" src="${archive.target}.tar" />
<delete file="${archive.target}.tar" />
</target>


<!-- =================================================================== -->
<!--            Fix CRLF for Unix Machines                               -->
<!-- =================================================================== -->
<target name="fixcrlf" depends="init">
<condition property="notWindows">
<not>
<os family="windows" />
</not>
</condition>
<if>
<isset property="notWindows" />
<then>
<echo>Running fixcrlf....</echo>
<fixcrlf eol="lf" srcdir="${basedir}" includes="**/*.txt,
                              **/*.properties,
                              **/*.sql,
                              **/*.java,
                              **/*.jsp,
                              **/*.xdt,
                              **/*.xml,
                              **/*.page,
                              **/*.html,
                              **/*.js,
                              **/*.css, 
                              **/*.reference,
                              **/*.conf" />
</then>
<else>
<echo>You shouldn't need to run this task on Windows</echo>
</else>
</if>
</target>


<!-- =================================================================== -->
<!--            Convenience target to setup everything                   -->
<!-- =================================================================== -->
<target name="setup" depends="setup-db,setup-tomcat,deploy" description="Sets up database, tomcat and deploys expanded war" />


<!-- - - - - - - - - - - - - - - - - - 
          target: wsdl2java                      
         - - - - - - - - - - - - - - - - - -->
    <target name="wsdl2java" depends="init">
    <taskdef resource="axis-tasks.properties" classpathref="axis.classpath" />
    <mkdir dir="${build.dir}/ws"/>
    <axis-wsdl2java
     output="${build.dir}/ws"
     testcase="true"
     verbose="true"
     url="metadata/wsdl/blClient-new.wsdl" >
    </axis-wsdl2java>
    </target>
</project>

Ant Build时报如下的错误,build.xml文件是存在的,如何解决?


加载中
0
epiclight
epiclight
是不缺少了org.apache.catlina.ant.ReloadTask所有的jar包或未引用到哦
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部