<?xml version="1.0" encoding="UTF-8"?><project name="cmsWebApp" basedir="." default="error">
<property name="system.name" value="PerformaInvestments"/>
<property name="src.dir" value="src"/>
<property name="extensions.src.dir" value="webroot/extensions"/>
<property name="config.dir" value="config"/>
<property name="lib.dir" value="libraries"/>
<property name="libnodeploy.dir" value="lib-no-deploy"/>
<property name="nodelete.appwar" value="${nodelete}"/>
<path id="cmsWebApp.lib">
<pathelement location="${build.target.dir}/overlay/CougarCMS8.2/bin/cmsWebApp"/>
<fileset dir="${cmsWebApp.lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
<exclude name="**/.new*"/>
</fileset>
</path>
<target name="copylib">
<jsync todir="${cmsWebApp.lib.dir}" flatten="true">
<fileset dir="${build.target.dir}/overlay/CougarCMS8.2/lib/cmsWebApp">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
<exclude name="**/.new*"/>
</fileset>
<fileset dir="../../CougarCMS8.2/cmsWebApp/webroot/extensions">
<include name="*/lib/*.jar"/>
<include name="*/lib/*.zip"/>
<exclude name="*/lib/.new*"/>
<include name="*/lib-no-deploy/*.jar"/>
<include name="*/lib-no-deploy/*.zip"/>
</fileset>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
<exclude name="**/.new*"/>
</fileset>
<fileset dir="${extensions.src.dir}">
<include name="*/lib/*.jar"/>
<include name="*/lib/*.zip"/>
<include name="*/lib-no-deploy/*.jar"/>
<include name="*/lib-no-deploy/*.zip"/>
<exclude name="*/lib/.new*"/>
</fileset>
<fileset dir="../../CougarCMS8.2/cmsWebApp/lib-no-deploy">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<fileset dir="${libnodeploy.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</jsync>
</target>
<target name="execute-overlays">
<echo level="info" message="Overlays exist"/>
<mkdir dir="${cmsWebApp.war.dir}"/>
<property name="overwrite.appwar" value="true"/>
<echo level="info" message="Executing overlay CougarCMS8.2 cmsWebApp"/>
<ant dir="../../CougarCMS8.2" target="cmsWebApp" inheritAll="false">
<property name="build.target.dir" value="${build.target.dir}/overlay/CougarCMS8.2"/>
<property name="cmsWebApp.war.dir" value="${cmsWebApp.war.dir}"/>
<property name="cmsWebApp.app.dir" value="${cmsWebApp.war.dir}"/>
<property name="tctransform.version" value="${tctransform.version}"/>
<property name="nodelete.appwar" value="true"/>
<property name="overwrite.appwar" value="true"/>
</ant>
<copy todir="${build.target.dir}/config" overwrite="true" filtering="true">
<fileset dir="${build.target.dir}/overlay/CougarCMS8.2/config">
<include name="**/*.xml"/>
<include name="**/*.properties"/>
</fileset>
</copy>
<jsync todir="${build.target.dir}/config" overwrite="true" filtering="false">
<fileset dir="${build.target.dir}/overlay/CougarCMS8.2/config">
<exclude name="**/*.xml"/>
<exclude name="**/*.properties"/>
</fileset>
</jsync>
<echo level="info" message="Finished overlay CougarCMS8.2 cmsWebApp"/>
</target>
<target name="compiletest">
<mkdir dir="${cmsWebApp.bin.dir}"/>
<setproperty name="cmsWebApp.out.of.date" value="true" when="nodelete"/>
<recursivediff srcDir="${src.dir}" srcExtension="java" destDir="${cmsWebApp.bin.dir}" destExtension="class" differentProperty="cmsWebApp.out.of.date"/>
<recursivediff srcDir="${extensions.src.dir}" srcExtension="java" destDir="${cmsWebApp.bin.dir}" destExtension="class" differentProperty="cmsWebApp.out.of.date"/>
</target>
<target name="compile" depends="compiletest" if="cmsWebApp.out.of.date">
<delete dir="${cmsWebApp.bin.dir}" unless="nodelete"/>
<mkdir dir="${cmsWebApp.bin.dir}"/>
<echo level="info" message="Building project classes"/>
<javac debug="on" destdir="${cmsWebApp.bin.dir}" executable="${build.compiler.javac}" compiler="extJavac">
<src>
<pathelement path="${src.dir}"/>
<dirset dir="${extensions.src.dir}">
<include name="*/src"/>
</dirset>
</src>
<classpath>
<path refid="cmsWebApp.lib"/>
<path path="${cmsWebApp.bin.dir}"/>
</classpath>
</javac>
<mkdir dir="../config/classlists"/>
<diffclasses taskname="${system.name}_cmsWebApp_Classes" classesDir="${cmsWebApp.bin.dir}" classList="../config/classlists/${system.name}_cmsWebApp_Classes.xml"/>
<jsync todir="${cmsWebApp.bin.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*.class"/>
<exclude name="**/*.java"/>
<exclude name="**/*.scc"/>
</fileset>
<fileset dir="${extensions.src.dir}">
<exclude name="**/*.class"/>
<exclude name="**/*.java"/>
<exclude name="**/*.scc"/>
</fileset>
</jsync>
</target>
<target name="autogen">
<property name="infra.src" value="../../Infrastructure8.2/src"/>
<available file="../../CougarCMS8.2/src" property="infra.src" value="../../CougarCMS8.2/src"/>
<style processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison" basedir="${infra.src}" destdir="../../../Build/xsl8.2" extension=".xsl" style="../../Support/xslt/1iT-transform.xsl" includes="**/*.xsl" excludes="**/1iT-transform.xsl,**/identity-transform.xsl"/>
<copy file="../../Support/xslt/1iT-transform.xsl" todir="../../../Build/xsl8.2/oneit"/>
<copy file="../../Support/xslt/identity-transform.xsl" todir="../../../Build/xsl8.2/oneit"/>
<bogen toDir="${src.dir}" sqlDir="sql/" xslDir="../../../Build/xsl8.2" hashRecordFile="../config/classlists/bogen_cmsWebApp_src.xml">
<fileset dir="${src.dir}" includes="**/*.xml">
<and>
<contains text="&lt;BUSINESSCLASS"/>
<not>
<contains text="DO NOT REGENERATE"/>
</not>
</and>
</fileset>
</bogen>
<dbconst toDir="${src.dir}" sqlDir="sql/" xslDir="../../../Build/xsl8.2" hashRecordFile="../config/classlists/dbconst_cmsWebApp_src.xml">
<fileset dir="${src.dir}" includes="**/*.xml">
<and>
<contains text="&lt;DB_ENUM"/>
<not>
<contains text="DO NOT REGENERATE"/>
</not>
</and>
</fileset>
</dbconst>
<const toDir="${src.dir}" xslDir="../../../Build/xsl8.2" hashRecordFile="../config/classlists/const_cmsWebApp_src.xml">
<fileset dir="${src.dir}" includes="**/*.xml">
<and>
<contains text="&lt;CONSTANT"/>
<not>
<contains text="DO NOT REGENERATE"/>
</not>
</and>
</fileset>
</const>
<bogen toDir="${extensions.src.dir}" sqlDir="sql/" xslDir="../../../Build/xsl8.2" hashRecordFile="../config/classlists/bogen_cmsWebApp_ext.xml">
<fileset dir="${extensions.src.dir}" includes="**/*.xml">
<and>
<contains text="&lt;BUSINESSCLASS"/>
<not>
<contains text="DO NOT REGENERATE"/>
</not>
</and>
</fileset>
</bogen>
<dbconst toDir="${extensions.src.dir}" sqlDir="sql/" xslDir="../../../Build/xsl8.2" hashRecordFile="../config/classlists/dbconst_cmsWebApp_ext.xml">
<fileset dir="${extensions.src.dir}" includes="**/*.xml">
<and>
<contains text="&lt;DB_ENUM"/>
<not>
<contains text="DO NOT REGENERATE"/>
</not>
</and>
</fileset>
</dbconst>
<const toDir="${extensions.src.dir}" xslDir="../../../Build/xsl8.2" hashRecordFile="../config/classlists/const_cmsWebApp_ext.xml">
<fileset dir="${extensions.src.dir}" includes="**/*.xml">
<and>
<contains text="&lt;CONSTANT"/>
<not>
<contains text="DO NOT REGENERATE"/>
</not>
</and>
</fileset>
</const>
</target>
<target name="error">
<echo level="error" message="No default target, compile from top level build"/>
</target>
<target name="config.fixcrlf" if="fix.crlf">
<echo level="verbose" message="########## FIXING CRLF ISSUES ########## ${cmsWebApp.war.dir}"/>
<fixcrlf srcdir="${cmsWebApp.war.dir}" eol="lf" eof="remove" includes="**/*.xml,**/*.txt,**/*.jsp,**/*.jspf,**/*.inc,**/*.htm,**/*.html,**/*.sql,**/*.css,**/*.js,**/*.dtd,**/*.mod,**/*.xsl"/>
</target>
<target name="build" depends="execute-overlays,copylib,compile">
<delete dir="${cmsWebApp.war.dir}" unless="nodelete.appwar"/>
<mkdir dir="${cmsWebApp.war.dir}"/>
<mkdir dir="${cmsWebApp.configxsl.dir}"/>
<property name="overwrite.appwar" value="false"/>
<jsync todir="${cmsWebApp.war.dir}">
<fileset dir="webroot"/>
</jsync>
<jsync todir="${cmsWebApp.war.dir}/WEB-INF">
<fileset dir="config" excludes="*.xml,*.tld"/>
</jsync>
<sleep seconds="1"/>
<echo level="info" message="Styling from config to ${cmsWebApp.configxsl.dir} and copying to ${cmsWebApp.war.dir}/WEB-INF"/>
<style processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison" basedir="config" includes="*.xml" excludes="web.xml" destdir="${cmsWebApp.configxsl.dir}" extension=".xml" style="../../../Support/xslt/identity-transform.xsl">
<xmlcatalog>
<dtd publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" location="../../Support/xslt/javax/servlet/resources/web-app_2_3.dtd"/>
<dtd publicId="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" location="../../Support/xslt/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd"/>
</xmlcatalog>
</style>
<echo level="info" message="Styling from web.xml to ${cmsWebApp.configxsl.dir} and copying to ${cmsWebApp.war.dir}/WEB-INF using Support/cmsWebApp/config/xslt/webxml_${tctransform.version}.xsl"/>
<style processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison" basedir="config" includes="web.xml" destdir="${cmsWebApp.configxsl.dir}" extension=".xml" style="../../../Support/xslt/webxml_${tctransform.version}.xsl" force="true">
<xmlcatalog>
<dtd publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" location="../../Support/xslt/javax/servlet/resources/web-app_2_3.dtd"/>
<dtd publicId="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" location="../../Support/xslt/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd"/>
</xmlcatalog>
</style>
<echo level="info" message="Styling from tlds to ${cmsWebApp.configxsl.dir} and copying to ${cmsWebApp.war.dir}/WEB-INF using ../../../CougarCMS8.2/cmsWebApp/config/xslt/taglib_${tctransform.version}.xsl"/>
<style processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison" basedir="config" includes="*.tld" destdir="${cmsWebApp.configxsl.dir}" extension=".tld" style="../../../Support/xslt/taglib_${tctransform.version}.xsl" force="true">
<xmlcatalog>
<dtd publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" location="../../Support/xslt/javax/servlet/resources/web-app_2_3.dtd"/>
<dtd publicId="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" location="../../Support/xslt/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd"/>
</xmlcatalog>
</style>
<jsync todir="${cmsWebApp.war.dir}/WEB-INF">
<fileset dir="${cmsWebApp.configxsl.dir}"/>
</jsync>
<jsync todir="${cmsWebApp.war.dir}/WEB-INF/lib" flatten="true">
<fileset dir="${cmsWebApp.lib.dir}">
<exclude name="**/.new*"/>
</fileset>
</jsync>
<jsync todir="${cmsWebApp.war.dir}/WEB-INF/lib" flatten="true">
<fileset dir="${extensions.src.dir}">
<include name="*/lib/*"/>
<exclude name="**/.new*"/>
</fileset>
</jsync>
<jsync todir="${cmsWebApp.war.dir}/WEB-INF/classes">
<fileset dir="${cmsWebApp.bin.dir}"/>
</jsync>
<jsync todir="${cmsWebApp.war.dir}/WEB-INF/sql">
<fileset dir="sql">
<include name="**/*.sql"/>
<include name="**/*.xml"/>
<include name="**/*.txt"/>
</fileset>
</jsync>
<antcall target="config.fixcrlf"/>
</target>
<target name="deploy">
<filter token="cmsWebApp.deploy.dir" value="${cmsWebApp.deploy.dir}"/>
<filter token="config.deploy.dir" value="${config.deploy.dir}"/>
<filter token="cmsWebApp.deploy.dir" value="${cmsWebApp.deploy.dir}"/>
<filter token="key.file" value="${key.file}"/>
<delete dir="${cmsWebApp.target.dir}" unless="nodelete"/>
<mkdir dir="${cmsWebApp.target.dir}"/>
<jsync todir="${cmsWebApp.target.dir}">
<fileset dir="${cmsWebApp.war.dir}">
<exclude name="**/*.xml"/>
<exclude name="**/*.properties"/>
<exclude name="**/*.scc"/>
</fileset>
</jsync>
<copy todir="${cmsWebApp.target.dir}" filtering="true" overwrite="true">
<fileset dir="${cmsWebApp.war.dir}">
<include name="**/*.xml"/>
<include name="**/*.properties"/>
</fileset>
</copy>
</target>
<target name="deployJSP">
<jsync todir="${cmsWebApp.target.dir}">
<fileset dir="${cmsWebApp.war.dir}">
<exclude name="WEB-INF/**"/>
</fileset>
</jsync>
</target>
</project>
