<project name="MGA" default="main" basedir=".">
<!-- Tell ant to use my environment variables -->
<property environment="env"/>
<property name="ONLINE_HOME" value="${basedir}/online"/>
<property name="build.dir" value="${ONLINE_HOME}/build/classes" />
<property name="src.dir" value="${ONLINE_HOME}/javasource"/>
<property name="data.dir" value="${ONLINE_HOME}/WebRoot/data"/>
<property name="serverConfig.dir" value="${ONLINE_HOME}/ServerConfig"/>
<property name="app.file" value="MGA_IWIN"/>
<property name="war.file.name" value="${app.file}.war"/>
<property name="app_dev.file" value="MGA_IWIN_DEV"/>
<property name="app_sit.file" value="MGA_IWIN_SIT"/>
<property name="app_sit2.file" value="MGA_IWIN_SIT_2"/>
<property name="app_uat.file" value="MGA_IWIN_UAT"/>
<property name="app_uat2.file" value="MGA_IWIN_UAT_2"/>
<property name="app_ps.file" value="MGA_IWIN"/>
<property name="app_prod.file" value="MGA_IWIN"/>
<property name="build_dev.dir" value="${ONLINE_HOME}/build/DEV"/>
<property name="build_sit.dir" value="${ONLINE_HOME}/build/SIT"/>
<property name="build_sit2.dir" value="${ONLINE_HOME}/build/SIT_2"/>
<property name="build_uat.dir" value="${ONLINE_HOME}/build/UAT"/>
<property name="build_uat2.dir" value="${ONLINE_HOME}/build/UAT_2"/>
<property name="build_ps.dir" value="${ONLINE_HOME}/build/PS"/>
<property name="build_prod.dir" value="${ONLINE_HOME}/build/PROD"/>
<!-- set the classpath -->
<path id="project.class.path">
<pathelement path= "${java.class.path} "/>
<fileset dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${ONLINE_HOME}/WebRoot/data/">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${src.dir}"/>
</path>
<!-- delete the build folder -->
<target name="clean">
<delete dir="${build.dir}" includeEmptyDirs="true" />
</target>
<!-- create a the build folder -->
<target name="prep">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build_dev.dir}"/>
<mkdir dir="${build_sit.dir}"/>
<mkdir dir="${build_sit2.dir}"/>
<mkdir dir="${build_uat.dir}"/>
<mkdir dir="${build_uat2.dir}"/>
<mkdir dir="${build_ps.dir}"/>
<mkdir dir="${build_prod.dir}"/>
</target>
<!-- compile the source files using SHIFT_JIS encoding -->
<target name="compile">
<javac srcdir="${src.dir}" encoding="shift_JIS"
destdir="${build.dir}"
debug="on"
deprecation="on"
fork="true"
memorymaximumsize="1024m">
<include name="**/*.java"/>
<classpath refid="project.class.path"/>
</javac>
</target>
<!-- prepare properties file -->
<target name="preparePropertyfiles">
<native2ascii encoding="SJIS"
src="${data.dir}"
dest="${build.dir}/jp/co/manulife/mga"
includes="**/*_ja.properties"
excludes="**/*_en.properties" />
<copy file="${build.dir}/jp/co/manulife/mga/MGAApplicationResources_ja.properties"
tofile="${build.dir}/jp/co/manulife/mga/MGAApplicationResources.properties" />
<delete file="${build.dir}/jp/co/manulife/mga/MGAApplicationResources_ja.properties" />
</target>
<!-- JDBC Replace starts -->
<target name="jdbc_Replace_dev" >
<echo message="jdbc_Replace_dev">
</echo>
<copy file="${serverConfig.dir}/JDBC/jdbc_dev.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/jdbc.properties" overwrite="true"/>
</target>
<target name="jdbc_Replace_sit" >
<echo message="jdbc_Replace_sit">
</echo>
<copy file="${serverConfig.dir}/JDBC/jdbc_sit.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/jdbc.properties" overwrite="true"/>
</target>
<target name="jdbc_Replace_uat" >
<echo message="jdbc_Replace_uat">
</echo>
<copy file="${serverConfig.dir}/JDBC/jdbc_uat.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/jdbc.properties" overwrite="true" />
</target>
<target name="jdbc_Replace_ps" >
<echo message="jdbc_Replace_ps">
</echo>
<copy file="${serverConfig.dir}/JDBC/jdbc_ps.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/jdbc.properties" overwrite="true"/>
</target>
<target name="jdbc_Replace_prod" >
<copy file="${serverConfig.dir}/JDBC/jdbc_prod.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/jdbc.properties" overwrite="true"/>
</target>
<!-- JDBC Replace Ends -->
<!-- NOTIFICATION Replace starts -->
<target name="notification_Replace_dev" >
<echo message="notification_Replace_dev">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_dev.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<target name="notification_Replace_sit" >
<echo message="notification_Replace_sit">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_sit.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<target name="notification_Replace_sit2" >
<echo message="notification_Replace_sit2">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_sit2.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<target name="notification_Replace_uat" >
<echo message="notification_Replace_uat">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_uat.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<target name="notification_Replace_uat2" >
<echo message="notification_Replace_uat2">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_uat2.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<target name="notification_Replace_ps" >
<echo message="notification_Replace_ps">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_ps.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<target name="notification_Replace_prod" >
<echo message="notification_Replace_ps">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_prod.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<!-- NOTIFICATION Replace ends -->
<!-- LOG4j Replace starts -->
<target name="log_dev" >
<echo message="log_dev">
</echo>
<copy file="${serverConfig.dir}/LOG/log4j_dev.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<target name="log_sit" >
<echo message="log_sit">
</echo>
<copy file="${serverConfig.dir}/LOG/log4j_sit.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<target name="log_sit2" >
<echo message="log_sit2">
</echo>
<copy file="${serverConfig.dir}/LOG/log4j_sit2.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<target name="log_uat" >
<echo message="log_uat">
</echo>
<copy file="${serverConfig.dir}/LOG/log4j_uat.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<target name="log_uat2" >
<echo message="log_uat2">
</echo>
<copy file="${serverConfig.dir}/LOG/log4j_uat2.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<target name="log_ps" >
<echo message="log_ps">
</echo>
<copy file="${serverConfig.dir}/LOG/log4j_ps.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<target name="log_prod" >
<copy file="${serverConfig.dir}/LOG/log4j_prod.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<!-- LOG4j Replace ends -->
<!-- WSDL Replace starts -->
<target name="WSDL_dev" >
<echo message="WSDL_dev">
</echo>
<copy file="${serverConfig.dir}/WSDL/AGWCSVService_AgentWeb_dev.wsdl"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/wsdl/AGWCSVService_AgentWeb.wsdl" overwrite="true"/>
</target>
<target name="WSDL_sit" >
<echo message="WSDL_sit">
</echo>
<copy file="${serverConfig.dir}/WSDL/AGWCSVService_AgentWeb_sit.wsdl"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/wsdl/AGWCSVService_AgentWeb.wsdl" overwrite="true"/>
</target>
<target name="WSDL_uat" >
<echo message="WSDL_uat">
</echo>
<copy file="${serverConfig.dir}/WSDL/AGWCSVService_AgentWeb_uat.wsdl"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/wsdl/AGWCSVService_AgentWeb.wsdl" overwrite="true"/>
</target>
<target name="WSDL_ps" >
<echo message="WSDL_ps">
</echo>
<copy file="${serverConfig.dir}/WSDL/AGWCSVService_AgentWeb_ps.wsdl"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/wsdl/AGWCSVService_AgentWeb.wsdl" overwrite="true"/>
</target>
<target name="WSDL_prod" >
<copy file="${serverConfig.dir}/WSDL/AGWCSVService_AgentWeb_prod.wsdl"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/wsdl/AGWCSVService_AgentWeb.wsdl" overwrite="true"/>
</target>
<!-- WSDL Replace ends -->
<!-- MGAProp Replace starts -->
<target name="mgaprop_dev" >
<echo message="mgaprop_dev">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_dev.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<target name="mgaprop_sit" >
<echo message="mgaprop_sit">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_sit.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<target name="mgaprop_sit2" >
<echo message="mgaprop_sit2">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_sit.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<target name="mgaprop_uat" >
<echo message="mgaprop_uat">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_uat.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<target name="mgaprop_uat2" >
<echo message="mgaprop_uat2">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_uat.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<target name="mgaprop_ps" >
<echo message="mgaprop_ps">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_ps.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<target name="mgaprop_prod" >
<echo message="mgaprop_prod">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_prod.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<!-- MGAProp Replace ends -->
<target name="war_dev">
<echo message="war dev file">
</echo>
<war warfile="${build_dev.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<target name="war_sit">
<echo message="war sit file">
</echo>
<war warfile="${build_sit.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<target name="war_sit2">
<echo message="war sit-2 file">
</echo>
<war warfile="${build_sit.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<target name="war_uat">
<echo message="war uat file">
</echo>
<war warfile="${build_uat.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<target name="war_uat2">
<echo message="war uat file">
</echo>
<war warfile="${build_uat.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<target name="war_ps">
<echo message="war ps file">
</echo>
<war warfile="${build_ps.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<target name="war_prod">
<echo message="war prod file">
</echo>
<war warfile="${build_prod.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<!-- create an ear file -->
<!-- create an ear file -->
<target name="assemble-app_dev" depends="jdbc_Replace_dev,notification_Replace_dev, mgaprop_dev, log_dev,WSDL_dev, war_dev">
<jar jarfile="${build_dev.dir}/${app_dev.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_dev.dir}"
includes="**.war"/>
</jar>
</target>
<target name="assemble-app_sit" depends="jdbc_Replace_sit,notification_Replace_sit,mgaprop_sit, log_sit,WSDL_sit, war_sit">
<jar jarfile="${build_sit.dir}/${app_sit.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_sit.dir}"
includes="**.war"/>
</jar>
</target>
<target name="assemble-app_sit_2" depends="jdbc_Replace_sit,notification_Replace_sit2,mgaprop_sit2, log_sit2,WSDL_sit, war_sit2">
<jar jarfile="${build_sit2.dir}/${app_sit2.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_sit.dir}"
includes="**.war"/>
</jar>
</target>
<target name="assemble-app_uat" depends="jdbc_Replace_uat,notification_Replace_uat,mgaprop_uat,log_uat,WSDL_uat, war_uat">
<jar jarfile="${build_uat.dir}/${app_uat.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_uat.dir}"
includes="**.war"/>
</jar>
</target>
<target name="assemble-app_uat_2" depends="jdbc_Replace_uat,notification_Replace_uat2,mgaprop_uat2, log_uat2,WSDL_uat, war_uat2">
<jar jarfile="${build_uat2.dir}/${app_uat2.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_uat.dir}"
includes="**.war"/>
</jar>
</target>
<target name="assemble-app_ps" depends="jdbc_Replace_ps,notification_Replace_ps,mgaprop_ps, log_ps,WSDL_ps, war_ps">
<jar jarfile="${build_ps.dir}/${app.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_ps.dir}"
includes="**.war"/>
</jar>
</target>
<target name="assemble-app_prod" depends="jdbc_Replace_prod,notification_Replace_prod,mgaprop_prod,log_prod,WSDL_prod, war_prod">
<jar jarfile="${build_prod.dir}/${app.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_prod.dir}"
includes="**.war"/>
</jar>
</target>
<!-- Delete the build dir -->
<target name="delete">
<delete dir="${build.dir}"/>
<delete dir="${build_dev.dir}" includes="*.war"/>
<delete dir="${build_sit.dir}" includes="*.war"/>
<delete dir="${build_sit2.dir}" includes="*.war"/>
<delete dir="${build_uat.dir}" includes="*.war"/>
<delete dir="${build_uat2.dir}" includes="*.war"/>
<delete dir="${build_ps.dir}" includes="*.war"/>
<delete dir="${build_prod.dir}" includes="*.war"/>
</target>
<!-- Main Target -->
<target name="main" depends="clean, prep, compile,preparePropertyfiles,assemble-app_dev, assemble-app_sit, assemble-app_sit_2, assemble-app_uat,assemble-app_uat_2,assemble-app_ps,assemble-app_prod,delete"/>
<!-- DEV -->
<target name="DEV" depends="clean, prep, compile,preparePropertyfiles,assemble-app_dev, delete"/>
<!-- SIT -->
<target name="SIT" depends="clean, prep, compile,preparePropertyfiles,assemble-app_sit, delete"/>
<!-- SIT 2 -->
<target name="SIT2" depends="clean, prep, compile,preparePropertyfiles,assemble-app_sit_2, delete"/>
<!-- UAT -->
<target name="UAT" depends="clean, prep, compile,preparePropertyfiles,assemble-app_uat,delete"/>
<!-- UAT 2 -->
<target name="UAT2" depends="clean, prep, compile,preparePropertyfiles,assemble-app_uat_2,delete"/>
<!-- PS -->
<target name="PS" depends="clean, prep, compile,preparePropertyfiles,assemble-app_ps,delete"/>
<!-- PROD -->
<target name="PROD" depends="clean, prep, compile,preparePropertyfiles,assemble-app_prod,delete"/>
</project>
<!-- Tell ant to use my environment variables -->
<property environment="env"/>
<property name="ONLINE_HOME" value="${basedir}/online"/>
<property name="build.dir" value="${ONLINE_HOME}/build/classes" />
<property name="src.dir" value="${ONLINE_HOME}/javasource"/>
<property name="data.dir" value="${ONLINE_HOME}/WebRoot/data"/>
<property name="serverConfig.dir" value="${ONLINE_HOME}/ServerConfig"/>
<property name="app.file" value="MGA_IWIN"/>
<property name="war.file.name" value="${app.file}.war"/>
<property name="app_dev.file" value="MGA_IWIN_DEV"/>
<property name="app_sit.file" value="MGA_IWIN_SIT"/>
<property name="app_sit2.file" value="MGA_IWIN_SIT_2"/>
<property name="app_uat.file" value="MGA_IWIN_UAT"/>
<property name="app_uat2.file" value="MGA_IWIN_UAT_2"/>
<property name="app_ps.file" value="MGA_IWIN"/>
<property name="app_prod.file" value="MGA_IWIN"/>
<property name="build_dev.dir" value="${ONLINE_HOME}/build/DEV"/>
<property name="build_sit.dir" value="${ONLINE_HOME}/build/SIT"/>
<property name="build_sit2.dir" value="${ONLINE_HOME}/build/SIT_2"/>
<property name="build_uat.dir" value="${ONLINE_HOME}/build/UAT"/>
<property name="build_uat2.dir" value="${ONLINE_HOME}/build/UAT_2"/>
<property name="build_ps.dir" value="${ONLINE_HOME}/build/PS"/>
<property name="build_prod.dir" value="${ONLINE_HOME}/build/PROD"/>
<!-- set the classpath -->
<path id="project.class.path">
<pathelement path= "${java.class.path} "/>
<fileset dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${ONLINE_HOME}/WebRoot/data/">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${src.dir}"/>
</path>
<!-- delete the build folder -->
<target name="clean">
<delete dir="${build.dir}" includeEmptyDirs="true" />
</target>
<!-- create a the build folder -->
<target name="prep">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build_dev.dir}"/>
<mkdir dir="${build_sit.dir}"/>
<mkdir dir="${build_sit2.dir}"/>
<mkdir dir="${build_uat.dir}"/>
<mkdir dir="${build_uat2.dir}"/>
<mkdir dir="${build_ps.dir}"/>
<mkdir dir="${build_prod.dir}"/>
</target>
<!-- compile the source files using SHIFT_JIS encoding -->
<target name="compile">
<javac srcdir="${src.dir}" encoding="shift_JIS"
destdir="${build.dir}"
debug="on"
deprecation="on"
fork="true"
memorymaximumsize="1024m">
<include name="**/*.java"/>
<classpath refid="project.class.path"/>
</javac>
</target>
<!-- prepare properties file -->
<target name="preparePropertyfiles">
<native2ascii encoding="SJIS"
src="${data.dir}"
dest="${build.dir}/jp/co/manulife/mga"
includes="**/*_ja.properties"
excludes="**/*_en.properties" />
<copy file="${build.dir}/jp/co/manulife/mga/MGAApplicationResources_ja.properties"
tofile="${build.dir}/jp/co/manulife/mga/MGAApplicationResources.properties" />
<delete file="${build.dir}/jp/co/manulife/mga/MGAApplicationResources_ja.properties" />
</target>
<!-- JDBC Replace starts -->
<target name="jdbc_Replace_dev" >
<echo message="jdbc_Replace_dev">
</echo>
<copy file="${serverConfig.dir}/JDBC/jdbc_dev.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/jdbc.properties" overwrite="true"/>
</target>
<target name="jdbc_Replace_sit" >
<echo message="jdbc_Replace_sit">
</echo>
<copy file="${serverConfig.dir}/JDBC/jdbc_sit.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/jdbc.properties" overwrite="true"/>
</target>
<target name="jdbc_Replace_uat" >
<echo message="jdbc_Replace_uat">
</echo>
<copy file="${serverConfig.dir}/JDBC/jdbc_uat.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/jdbc.properties" overwrite="true" />
</target>
<target name="jdbc_Replace_ps" >
<echo message="jdbc_Replace_ps">
</echo>
<copy file="${serverConfig.dir}/JDBC/jdbc_ps.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/jdbc.properties" overwrite="true"/>
</target>
<target name="jdbc_Replace_prod" >
<copy file="${serverConfig.dir}/JDBC/jdbc_prod.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/jdbc.properties" overwrite="true"/>
</target>
<!-- JDBC Replace Ends -->
<!-- NOTIFICATION Replace starts -->
<target name="notification_Replace_dev" >
<echo message="notification_Replace_dev">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_dev.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<target name="notification_Replace_sit" >
<echo message="notification_Replace_sit">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_sit.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<target name="notification_Replace_sit2" >
<echo message="notification_Replace_sit2">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_sit2.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<target name="notification_Replace_uat" >
<echo message="notification_Replace_uat">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_uat.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<target name="notification_Replace_uat2" >
<echo message="notification_Replace_uat2">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_uat2.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<target name="notification_Replace_ps" >
<echo message="notification_Replace_ps">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_ps.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<target name="notification_Replace_prod" >
<echo message="notification_Replace_ps">
</echo>
<copy file="${serverConfig.dir}/NOTIFICATION/NOTIFICATION_prod.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/NOTIFICATION.xml" overwrite="true"/>
</target>
<!-- NOTIFICATION Replace ends -->
<!-- LOG4j Replace starts -->
<target name="log_dev" >
<echo message="log_dev">
</echo>
<copy file="${serverConfig.dir}/LOG/log4j_dev.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<target name="log_sit" >
<echo message="log_sit">
</echo>
<copy file="${serverConfig.dir}/LOG/log4j_sit.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<target name="log_sit2" >
<echo message="log_sit2">
</echo>
<copy file="${serverConfig.dir}/LOG/log4j_sit2.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<target name="log_uat" >
<echo message="log_uat">
</echo>
<copy file="${serverConfig.dir}/LOG/log4j_uat.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<target name="log_uat2" >
<echo message="log_uat2">
</echo>
<copy file="${serverConfig.dir}/LOG/log4j_uat2.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<target name="log_ps" >
<echo message="log_ps">
</echo>
<copy file="${serverConfig.dir}/LOG/log4j_ps.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<target name="log_prod" >
<copy file="${serverConfig.dir}/LOG/log4j_prod.xml"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/log4j.xml" overwrite="true"/>
</target>
<!-- LOG4j Replace ends -->
<!-- WSDL Replace starts -->
<target name="WSDL_dev" >
<echo message="WSDL_dev">
</echo>
<copy file="${serverConfig.dir}/WSDL/AGWCSVService_AgentWeb_dev.wsdl"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/wsdl/AGWCSVService_AgentWeb.wsdl" overwrite="true"/>
</target>
<target name="WSDL_sit" >
<echo message="WSDL_sit">
</echo>
<copy file="${serverConfig.dir}/WSDL/AGWCSVService_AgentWeb_sit.wsdl"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/wsdl/AGWCSVService_AgentWeb.wsdl" overwrite="true"/>
</target>
<target name="WSDL_uat" >
<echo message="WSDL_uat">
</echo>
<copy file="${serverConfig.dir}/WSDL/AGWCSVService_AgentWeb_uat.wsdl"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/wsdl/AGWCSVService_AgentWeb.wsdl" overwrite="true"/>
</target>
<target name="WSDL_ps" >
<echo message="WSDL_ps">
</echo>
<copy file="${serverConfig.dir}/WSDL/AGWCSVService_AgentWeb_ps.wsdl"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/wsdl/AGWCSVService_AgentWeb.wsdl" overwrite="true"/>
</target>
<target name="WSDL_prod" >
<copy file="${serverConfig.dir}/WSDL/AGWCSVService_AgentWeb_prod.wsdl"
tofile="${ONLINE_HOME}/WebRoot/WEB-INF/wsdl/AGWCSVService_AgentWeb.wsdl" overwrite="true"/>
</target>
<!-- WSDL Replace ends -->
<!-- MGAProp Replace starts -->
<target name="mgaprop_dev" >
<echo message="mgaprop_dev">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_dev.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<target name="mgaprop_sit" >
<echo message="mgaprop_sit">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_sit.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<target name="mgaprop_sit2" >
<echo message="mgaprop_sit2">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_sit.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<target name="mgaprop_uat" >
<echo message="mgaprop_uat">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_uat.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<target name="mgaprop_uat2" >
<echo message="mgaprop_uat2">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_uat.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<target name="mgaprop_ps" >
<echo message="mgaprop_ps">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_ps.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<target name="mgaprop_prod" >
<echo message="mgaprop_prod">
</echo>
<copy file="${serverConfig.dir}/MGAProperties/MGAProperties_prod.properties"
tofile="${ONLINE_HOME}/WebRoot/properties/MGAProperties.properties" overwrite="true"/>
</target>
<!-- MGAProp Replace ends -->
<target name="war_dev">
<echo message="war dev file">
</echo>
<war warfile="${build_dev.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<target name="war_sit">
<echo message="war sit file">
</echo>
<war warfile="${build_sit.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<target name="war_sit2">
<echo message="war sit-2 file">
</echo>
<war warfile="${build_sit.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<target name="war_uat">
<echo message="war uat file">
</echo>
<war warfile="${build_uat.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<target name="war_uat2">
<echo message="war uat file">
</echo>
<war warfile="${build_uat.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<target name="war_ps">
<echo message="war ps file">
</echo>
<war warfile="${build_ps.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<target name="war_prod">
<echo message="war prod file">
</echo>
<war warfile="${build_prod.dir}/${war.file.name}" webxml="${ONLINE_HOME}/WebRoot/WEB-INF/web.xml">
<fileset dir="${ONLINE_HOME}/WebRoot/" includes="**/*.*" excludes="*.war, **/*.nbattrs, web.xml, **/data/*.jar, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="${ONLINE_HOME}/WebRoot/WEB-INF" includes="tld/*.*,**/*" excludes="web.xml, **/*.jar, **/*.class"/>
<lib dir="${ONLINE_HOME}/WebRoot/WEB-INF/lib/" includes="*.jar"/>
<classes dir="${build.dir}"/>
<fileset dir="${ONLINE_HOME}/WebRoot" includes="*.jsp"/>
<classes dir="${src.dir}">
<include name="**/*.properties"/>
</classes>
<classes dir="${ONLINE_HOME}/WebRoot/conf">
<include name="**/*.*"/>
</classes>
</war>
</target>
<!-- create an ear file -->
<!-- create an ear file -->
<target name="assemble-app_dev" depends="jdbc_Replace_dev,notification_Replace_dev, mgaprop_dev, log_dev,WSDL_dev, war_dev">
<jar jarfile="${build_dev.dir}/${app_dev.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_dev.dir}"
includes="**.war"/>
</jar>
</target>
<target name="assemble-app_sit" depends="jdbc_Replace_sit,notification_Replace_sit,mgaprop_sit, log_sit,WSDL_sit, war_sit">
<jar jarfile="${build_sit.dir}/${app_sit.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_sit.dir}"
includes="**.war"/>
</jar>
</target>
<target name="assemble-app_sit_2" depends="jdbc_Replace_sit,notification_Replace_sit2,mgaprop_sit2, log_sit2,WSDL_sit, war_sit2">
<jar jarfile="${build_sit2.dir}/${app_sit2.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_sit.dir}"
includes="**.war"/>
</jar>
</target>
<target name="assemble-app_uat" depends="jdbc_Replace_uat,notification_Replace_uat,mgaprop_uat,log_uat,WSDL_uat, war_uat">
<jar jarfile="${build_uat.dir}/${app_uat.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_uat.dir}"
includes="**.war"/>
</jar>
</target>
<target name="assemble-app_uat_2" depends="jdbc_Replace_uat,notification_Replace_uat2,mgaprop_uat2, log_uat2,WSDL_uat, war_uat2">
<jar jarfile="${build_uat2.dir}/${app_uat2.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_uat.dir}"
includes="**.war"/>
</jar>
</target>
<target name="assemble-app_ps" depends="jdbc_Replace_ps,notification_Replace_ps,mgaprop_ps, log_ps,WSDL_ps, war_ps">
<jar jarfile="${build_ps.dir}/${app.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_ps.dir}"
includes="**.war"/>
</jar>
</target>
<target name="assemble-app_prod" depends="jdbc_Replace_prod,notification_Replace_prod,mgaprop_prod,log_prod,WSDL_prod, war_prod">
<jar jarfile="${build_prod.dir}/${app.file}.ear" manifest="${ONLINE_HOME}/META-INF/MANIFEST.MF">
<metainf dir="${ONLINE_HOME}/META-INF">
<include name="application.xml"/>
</metainf>
<fileset dir="${build_prod.dir}"
includes="**.war"/>
</jar>
</target>
<!-- Delete the build dir -->
<target name="delete">
<delete dir="${build.dir}"/>
<delete dir="${build_dev.dir}" includes="*.war"/>
<delete dir="${build_sit.dir}" includes="*.war"/>
<delete dir="${build_sit2.dir}" includes="*.war"/>
<delete dir="${build_uat.dir}" includes="*.war"/>
<delete dir="${build_uat2.dir}" includes="*.war"/>
<delete dir="${build_ps.dir}" includes="*.war"/>
<delete dir="${build_prod.dir}" includes="*.war"/>
</target>
<!-- Main Target -->
<target name="main" depends="clean, prep, compile,preparePropertyfiles,assemble-app_dev, assemble-app_sit, assemble-app_sit_2, assemble-app_uat,assemble-app_uat_2,assemble-app_ps,assemble-app_prod,delete"/>
<!-- DEV -->
<target name="DEV" depends="clean, prep, compile,preparePropertyfiles,assemble-app_dev, delete"/>
<!-- SIT -->
<target name="SIT" depends="clean, prep, compile,preparePropertyfiles,assemble-app_sit, delete"/>
<!-- SIT 2 -->
<target name="SIT2" depends="clean, prep, compile,preparePropertyfiles,assemble-app_sit_2, delete"/>
<!-- UAT -->
<target name="UAT" depends="clean, prep, compile,preparePropertyfiles,assemble-app_uat,delete"/>
<!-- UAT 2 -->
<target name="UAT2" depends="clean, prep, compile,preparePropertyfiles,assemble-app_uat_2,delete"/>
<!-- PS -->
<target name="PS" depends="clean, prep, compile,preparePropertyfiles,assemble-app_ps,delete"/>
<!-- PROD -->
<target name="PROD" depends="clean, prep, compile,preparePropertyfiles,assemble-app_prod,delete"/>
</project>
No comments:
Post a Comment