<?xml version="1.0" encoding="UTF-8"?><project name="PerformaInvestments" basedir="." default="all">
<taskdef resource="oneit/ant.properties">
<classpath>
<pathelement location="../Support/AntTasks.jar"/>
</classpath>
</taskdef>
<property name="custom.property.file" value="workspace"/>
<property file="${custom.property.file}.override.properties"/>
<property file="override.properties"/>
<property file="../global.override.properties"/>
<property file="${custom.property.file}.properties"/>
<property file="${key.file}"/>
<property value="/Projects" name="project.src.dir"/>
<property value="/ant" name="ant.src.dir"/>
<property name="tctransform.version" value="41"/>
<property name="build.target.dir" value="C:/build/PerformaInvestments"/>
<property name="app.target.dir" value="${app.deploy.dir}"/>
<property name="webapp.target.dir" value="${webapp.deploy.dir}"/>
<property name="config.target.dir" value="${config.deploy.dir}"/>
<property name="CRLF.action" value="add"/>
<property name="build.source.dir" value="."/>
<property name="tmp.dir" value="${target.dir}/tmp"/>
<property name="infrastructure.bin.dir" value="${build.target.dir}/bin/infrastructure"/>
<property name="infrastructure.lib.dir" value="${build.target.dir}/lib/infrastructure"/>
<property name="cmsWebApp.bin.dir" value="${build.target.dir}/bin/cmsWebApp"/>
<property name="cmsWebApp.lib.dir" value="${build.target.dir}/lib/cmsWebApp"/>
<property name="cmsWebApp.war.dir" value="${build.target.dir}/cmsWebApp"/>
<property name="cmsWebApp.configxsl.dir" value="${build.target.dir}/cmsWebApp.xsl"/>
<property name="cmsWebApp.deploy.dir" value="${webapp.deploy.dir}/cmsWebApp"/>
<property name="cmsWebApp.target.dir" value="${webapp.target.dir}/cmsWebApp"/>
<property name="executor.deploy.dir" value="${testMainApp.deploy.dir}"/>
<target name="clean">
<deltree dir="${build.target.dir}"/>
</target>
<target name="config.fixcrlf" if="fix.crlf">
<echo level="verbose" message="########## FIXING CRLF ISSUES ########## ${PerformaInvestments.war.dir}"/>
<fixcrlf srcdir="${build.target.dir}/config" eol="lf" eof="remove" includes="**/*.xml,**/*.txt,**/*.sql,**/*.css,**/*.js,**/*.dtd,**/*.mod,**/*.xsl"/>
</target>
<target name="config" depends="prepare">
<jsync todir="${build.target.dir}/config" overwrite="true">
<fileset dir="${build.source.dir}/config" excludes="*.xml"/>
</jsync>
<echo level="info" message="Styling from ${build.source.dir}/config to ${build.target.dir}/config.xsl and copying to ${build.target.dir}/config"/>
<style processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison" basedir="${build.source.dir}/config" includes="*.xml" destdir="${build.target.dir}/config.xsl" extension=".xml" style="${build.source.dir}/../../Support/xslt/identity-transform.xsl"/>
<jsync overwrite="true" todir="${build.target.dir}/config">
<fileset dir="${build.target.dir}/config.xsl"/>
</jsync>
<jsync todir="${build.target.dir}/config/sql">
<fileset dir="sql">
<include name="**/*.sql"/>
<include name="**/*.xml"/>
<include name="**/*.txt"/>
</fileset>
</jsync>
<antcall target="config.fixcrlf"/>
</target>
<target name="prepare">
<condition property="custom.property.file.exists.notexist">
<not>
<available file="${custom.property.file}.properties" property="custom.property.file.exists"/>
</not>
</condition>
<fail if="custom.property.file.exists.notexist">File does not exist ${custom.property.file}</fail>
<time/>
<tstamp/>
<mkdir dir="${build.target.dir}"/>
<mkdir dir="${build.target.dir}/config"/>
<mkdir dir="${build.target.dir}/config.xsl"/>
<mkdir dir="${build.target.dir}/logs"/>
</target>
<target name="cmsWebApp" depends="prepare,config">
<ant dir="${build.source.dir}/cmsWebApp" target="build"/>
<antcall target="config"/>
<property name="build.partial" value="true"/>
<property name="build.cmsWebApp" value="true"/>
</target>
<target name="cmsWebApp_deploy" depends="cmsWebApp,deploy"/>
<target name="cms">
<property name="build.partial" value="true"/>
<property name="build.cmsWebApp" value="true"/>
</target>
<target name="all" depends="config&#10;            ,cmsWebApp"/>
<target name="all_deploy" depends="all,deploy"/>
<target name="deploy.prepare" unless="build.partial">
<property name="build.cmsWebApp" value="true"/>
</target>
<target name="deploy.basic">
<filter token="config.deploy.dir" value="${config.deploy.dir}"/>
<filter token="webapp.deploy.dir" value="${webapp.deploy.dir}"/>
<filter token="app.deploy.dir" value="${app.deploy.dir}"/>
<filter token="openoffice.dir" value="${openoffice.dir}"/>
<filter token="openoffice.program" value="${openoffice.program}"/>
<filter token="openoffice.port" value="${openoffice.port}"/>
<filter token="cmsWebApp.deploy.dir" value="${cmsWebApp.deploy.dir}"/>
<filter token="key.file" value="${key.file}"/>
<antcall target="tomcat_stop"/>
<mkdir dir="${config.target.dir}"/>
<copy todir="${config.target.dir}" filtering="true">
<fileset dir="${build.target.dir}/config">
<exclude name="**/binaries/**/*"/>
</fileset>
</copy>
<jsync todir="${config.target.dir}" filtering="false">
<fileset dir="${build.target.dir}/config">
<include name="**/binaries/**/*"/>
</fileset>
</jsync>
<mkdir dir="${app.target.dir}/logs"/>
<mkdir dir="${webapp.target.dir}/logs/std"/>
<mkdir dir="${webapp.target.dir}/logs/error"/>
<mkdir dir="${app.target.dir}/logs/std"/>
<mkdir dir="${app.target.dir}/logs/error"/>
<touch file="${app.target.dir}/logs/std/placeholder.txt"/>
<touch file="${app.target.dir}/logs/error/placeholder.txt"/>
</target>
<target name="deploy.cmsWebApp" if="build.cmsWebApp">
<ant dir="${build.source.dir}/cmsWebApp" target="deploy"/>
</target>
<target name="upload.cmsWebApp">
<rsync port="${rsync.port}" toLocation="${rsync.user}@${rsync.server}:${cmsWebApp.deploy.dir}" bwlimit="${rsync.bwlimit}" options="-lcn">
<fileset dir="${cmsWebApp.target.dir}" excludes="${rsync.excludes}"/>
</rsync>
<input message="Do you wish to perform the real rsync (y/n)?" validargs="y,n" addproperty="do.upload.cmsWebApp"/>
<condition property="do.abort">
<equals arg1="n" arg2="${do.upload.cmsWebApp}"/>
</condition>
<fail if="do.abort">RSync aborted.</fail>
<rsync port="${rsync.port}" toLocation="${rsync.user}@${rsync.server}:${cmsWebApp.deploy.dir}" bwlimit="${rsync.bwlimit}" options="-lc">
<fileset dir="${cmsWebApp.target.dir}" excludes="${rsync.excludes}"/>
</rsync>
</target>
<target name="deployJSP.cmsWebApp" if="build.cmsWebApp">
<ant dir="${build.source.dir}/cmsWebApp" target="deployJSP"/>
</target>
<target name="tomcat_stop" if="tomcat.version">
<property name="url" value="http://${web.server.host}:${web.server.port}/manager"/>
<taskdef resource="tomcattasks.properties">
<classpath>
<pathelement location="../Support/${tomcat.version}"/>
<pathelement location="../Support/${tomcat.version}/catalina-ant.jar"/>
</classpath>
</taskdef>
<echo level="info" message="Stopping Tomcat ${url} /${tomcat.app.contextpath}"/>
<nofail>
<stop_web_app url="${url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${tomcat.app.contextpath}"/>
</nofail>
<echo level="info" message="Stopped Tomcat ${url} /${tomcat.app.contextpath}"/>
</target>
<target name="tomcat_start" if="tomcat.version">
<property name="url" value="http://${web.server.host}:${web.server.port}/manager"/>
<taskdef resource="tomcattasks.properties">
<classpath>
<pathelement location="../Support/${tomcat.version}"/>
<pathelement location="../Support/${tomcat.version}/catalina-ant.jar"/>
</classpath>
</taskdef>
<echo level="info" message="Start Tomcat ${url} /${tomcat.app.contextpath}"/>
<nofail>
<start_web_app url="${url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${tomcat.app.contextpath}"/>
</nofail>
<echo level="info" message="Started Tomcat ${url} /${tomcat.app.contextpath}"/>
</target>
<target name="deploy" depends="deploy.prepare,deploy.basic&#10;            ,deploy.cmsWebApp">
<filter token="config.deploy.dir" value="${config.deploy.dir}"/>
<filter token="webapp.deploy.dir" value="${webapp.deploy.dir}"/>
<filter token="app.deploy.dir" value="${app.deploy.dir}"/>
<filter token="openoffice.dir" value="${openoffice.dir}"/>
<filter token="openoffice.program" value="${openoffice.program}"/>
<filter token="openoffice.port" value="${openoffice.port}"/>
<filter token="cmsWebApp.deploy.dir" value="${cmsWebApp.deploy.dir}"/>
<filter token="key.file" value="${key.file}"/>
<antcall target="tomcat_start"/>
</target>
<target name="deployJSP" depends="deploy.prepare,deploy.basic&#10;            ,deployJSP.cmsWebApp"/>
<target name="autogen">
<ant dir="${build.source.dir}/cmsWebApp" target="autogen"/>
</target>
</project>
