updated build to automate the process of copying configuration to Tomcat 5,
and also have it generate logging configuration with selectable logging directory
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
Contributor(s):
|
||||
-->
|
||||
<project name="Venice" default="deploy">
|
||||
<project name="venice" default="deploy">
|
||||
|
||||
<!-- ============================================================================
|
||||
Load build properties
|
||||
@@ -37,6 +37,7 @@
|
||||
<!-- [Target directories] -->
|
||||
<property name="deploy.home" value="../venice"/>
|
||||
<property name="javadoc.home" value="${deploy.home}/javadoc"/>
|
||||
<property name="logging.dir" value="${user.home}"/>
|
||||
|
||||
<!-- [Location of Servlet API 2.4] -->
|
||||
<property name="servlet.base" value="../servletapi"/>
|
||||
@@ -94,6 +95,11 @@
|
||||
<property name="velocity.lib" value="${velocity.base}"/>
|
||||
<property name="velocity.jarfile" value="velocity-1.4.jar"/>
|
||||
|
||||
<!-- [Tomcat 5 deploy properties] -->
|
||||
<property name="tomcat5.base" value="../tomcat5"/>
|
||||
<property name="tomcat5.confdir" value="${tomcat5.base}/conf/Catalina/localhost"/>
|
||||
<property name="tomcat5.deployAs" value="${ant.project.name}"/>
|
||||
|
||||
<!-- ============================================================================
|
||||
Path references
|
||||
============================================================================ -->
|
||||
@@ -110,6 +116,13 @@
|
||||
<fileset dir="${velocity.lib}" includes="${velocity.jarfile}"/>
|
||||
</path>
|
||||
|
||||
<!-- ============================================================================
|
||||
Initialization task information
|
||||
============================================================================ -->
|
||||
|
||||
<property name="deploy.home.full" location="${deploy.home}"/>
|
||||
<available file="${tomcat5.confdir}" type="dir" property="do.deploy-tomcat5"/>
|
||||
|
||||
<!-- ============================================================================
|
||||
"buildprep" - Creates the build directories
|
||||
============================================================================ -->
|
||||
@@ -178,11 +191,11 @@
|
||||
</target>
|
||||
|
||||
<!-- ============================================================================
|
||||
"deploy" - Copy everything to the deployment directory, including stuff that
|
||||
requires a restart to take effect.
|
||||
"deploy-files" - Copy everything to the deployment directory, including stuff
|
||||
that requires a restart to take effect.
|
||||
============================================================================ -->
|
||||
|
||||
<target name="deploy" depends="jar,fastupdate">
|
||||
<target name="deploy-files" depends="jar,fastupdate">
|
||||
<copy todir="${deploy.home}/WEB-INF">
|
||||
<fileset dir="etc">
|
||||
<include name="*.xml"/>
|
||||
@@ -190,8 +203,13 @@
|
||||
<include name="*.dict"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<mkdir dir="${deploy.home}/WEB-INF/classes"/>
|
||||
<mkdir dir="${deploy.home}/WEB-INF/lib"/>
|
||||
<copy file="etc/logging-config.xml.in" tofile="${deploy.home}/WEB-INF/logging-config.xml">
|
||||
<filterset>
|
||||
<filter token="LOGDIR" value="${logging.dir}"/>
|
||||
</filterset>
|
||||
</copy>
|
||||
<mkdir dir="${deploy.home}/WEB-INF/classes"/>
|
||||
<mkdir dir="${deploy.home}/WEB-INF/lib"/>
|
||||
<copy todir="${deploy.home}/WEB-INF/lib">
|
||||
<fileset dir="${collections.lib}" includes="${collections.jarfile}"/>
|
||||
<fileset dir="${codec.lib}" includes="${codec.jarfile}"/>
|
||||
@@ -205,15 +223,33 @@
|
||||
<fileset dir="lib" includes="*.jar"/>
|
||||
<fileset dir="jars" includes="venice001.jar"/>
|
||||
</copy>
|
||||
<mkdir dir="${deploy.home}/WEB-INF/tlds"/>
|
||||
<mkdir dir="${deploy.home}/WEB-INF/tlds"/>
|
||||
<copy todir="${deploy.home}/WEB-INF/tlds">
|
||||
<fileset dir="tlds">
|
||||
<include name="*.tld"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<mkdir dir="${deploy.home}/WEB-INF/temp"/>
|
||||
<mkdir dir="${deploy.home}/WEB-INF/temp"/>
|
||||
</target>
|
||||
|
||||
<!-- ============================================================================
|
||||
"deploy-tomcat5" - Copies the deployment config file to Tomcat 5.
|
||||
============================================================================ -->
|
||||
|
||||
<target name="deploy-tomcat5" if="do.deploy-tomcat5">
|
||||
<copy file="setup/venice-tomcat5.xml.in" tofile="${tomcat5.confdir}/${tomcat5.deployAs}.xml">
|
||||
<filterset>
|
||||
<filter token="DOCBASE" value="${deploy.home.full}"/>
|
||||
</filterset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- ============================================================================
|
||||
"deploy" - Pseudo-target that deploys everything.
|
||||
============================================================================ -->
|
||||
|
||||
<target name="deploy" depends="deploy-files,deploy-tomcat5"/>
|
||||
|
||||
<!-- ============================================================================
|
||||
"javadoc" - Create Javadocs
|
||||
============================================================================ -->
|
||||
@@ -228,6 +264,7 @@
|
||||
============================================================================ -->
|
||||
|
||||
<target name="clean">
|
||||
<delete file="${tomcat5.confdir}/${tomcat5.deployAs}.xml" quiet="true"/>
|
||||
<delete dir="${deploy.home}"/>
|
||||
<delete dir="buildwork"/>
|
||||
<delete dir="jars"/>
|
||||
|
||||
Reference in New Issue
Block a user