ANT build

  • 48
  • 0
  • 2015-12-29

ANT build

<?xml version="1.0"?>

<project name="WAS 7.0" default="hotdeploy" basedir=".">


    <target name="init">
        <!-- was.base WAS實際的路徑 -->
        <property name="was.base" value="C:\Program Files (x86)\IBM\SDP\runtimes\base_v7" />
        <property name="sys_cd" value="yim" />
        <property name="sys_version" value="web-1.0-SNAPSHOT" />
                <!-- ##################### -->
        
         <property name="project.base" value="${was.base}\profiles\AppSrv06\installedApps\rickeysu-PCNode03Cell\${sys_cd}-ear.ear" />  
         <!--property name="project.base" value="${was.base}\profiles\AppSrv01\installedApps\Windwing-NBNode01Cell\${sys_cd}-ear.ear" /-->  
   <!--    <property name="project.base" value="${was.base}\profiles\AppSrv01\installedApps\YiPin-PCNode01Cell\${sys_cd}-ear.ear" /> -->

        <property name="projectwar.base" value="${project.base}\${sys_cd}-${sys_version}.war" />
        <property name="{dirs.base}" value="." />
        <property name="classdir" value="${dirs.base}/target/classes" />
        <property name="src" value="${dirs.base}/src/main/java" />
        <property name="webclasses.base" value="./src/main/webapp" />

        <property name="earDir" value="${dirs.base}/build/ear" />
        <property name="warDir" value="${dirs.base}/build/war" />
    </target>

    <target name="cleanTmp" depends="init">
        <delete dir="${was.base}\profiles\AppSrv06\temp" />
        <delete dir="${was.base}\profiles\AppSrv06\tranlog" />
        <delete dir="${was.base}\profiles\AppSrv06\wstemp" />
        <delete dir="${was.base}\profiles\AppSrv06\logs" />
    </target>

    <target name="hotdeploy" depends="init">
        <copy todir="${projectwar.base}\WEB-INF\classes">
            <fileset dir="${webclasses.base}/WEB-INF/classes" includes="**/*.*" />
        </copy>
        <copy todir="${projectwar.base}\WEB-INF\config">
            <fileset dir="${webclasses.base}/WEB-INF/config" includes="**/*.*" />
        </copy>
        <copy todir="${projectwar.base}\WEB-INF\jsp">
            <fileset dir="${webclasses.base}/WEB-INF/jsp" includes="**/*.*" />
        </copy>
        <copy todir="${projectwar.base}\js">
            <fileset dir="${webclasses.base}/js" includes="**/*.*" />
        </copy>
    </target>

</project>