vmassol 01/03/18 09:56:56
Modified: . build-webapps.xml build.xml
Log:
added comments + reformatting of build.xml to look like build-webapp*.xml + addd
some properties like ${conf.share.dir}, ${src.share.dir}, ... + take into account the
new directory structure (doc and conf at the project root)
Revision Changes Path
1.3 +20 -14 jakarta-struts/build-webapps.xml
Index: build-webapps.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/build-webapps.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build-webapps.xml 2001/03/10 19:33:59 1.2
+++ build-webapps.xml 2001/03/18 17:56:56 1.3
@@ -67,7 +67,13 @@
<!-- The directory into which Struts JAR and TLD files have been created -->
<property name="struts.home" value="${build.home}/library" />
+<!-- Directory where core struts library configurations files are stored -->
+<property name="conf.share.dir" value="conf/share"/>
+<!-- Doc directory -->
+<property name="doc.dir" value="doc"/>
+
+
<!-- ========== Executable Targets ======================================== -->
@@ -91,9 +97,9 @@
<ant antfile="build-webapp.xml" target="static">
<property name="webapp.name" value="template-example"/>
</ant>
- <ant antfile="build-webapp.xml" target="static">
+ <!--ant antfile="build-webapp.xml" target="static">
<property name="webapp.name" value="test"/>
- </ant>
+ </ant-->
<ant antfile="build-webapp.xml" target="static">
<property name="webapp.name" value="upload"/>
</ant>
@@ -108,11 +114,11 @@
description="Copy static resources for individual web applications">
<!-- Copy DTDs for Struts constructs -->
<copy todir="${build.home}/documentation/dtds">
- <fileset dir="src/conf" includes="**/*.dtd"/>
+ <fileset dir="${conf.share.dir}" includes="**/*.dtd"/>
</copy>
<!-- Copy required image for the Struts example application -->
<copy tofile="${build.home}/example/struts-power.gif"
- file="src/doc/images/struts-power.gif"/>
+ file="${doc.dir}/images/struts-power.gif"/>
</target>
@@ -136,9 +142,9 @@
<ant antfile="build-webapp.xml" target="compile">
<property name="webapp.name" value="template-example"/>
</ant>
- <ant antfile="build-webapp.xml" target="compile">
+ <!--ant antfile="build-webapp.xml" target="compile">
<property name="webapp.name" value="test"/>
- </ant>
+ </ant-->
<ant antfile="build-webapp.xml" target="compile">
<property name="webapp.name" value="upload"/>
</ant>
@@ -152,16 +158,16 @@
<target name="compile" depends="compile.generic"
description="Compile individual web applications">
<!-- Create the taglib documentation -->
- <style basedir="src/doc" destdir="${build.home}/documentation"
+ <style basedir="${doc.dir}" destdir="${build.home}/documentation"
extension=".html" style="stylesheets/struts.xsl" includes="*.xml"/>
<!-- Create the user guide -->
- <style basedir="src/doc/userGuide"
+ <style basedir="${doc.dir}/userGuide"
destdir="${build.home}/documentation/userGuide"
extension=".html" style="../stylesheets/userGuide.xsl"
includes="*.xml"/>
<!-- Copy the basic documentation files -->
<copy todir="${build.home}/documentation">
- <fileset dir="src/doc">
+ <fileset dir="${doc.dir}">
<include name="**/*.css"/>
<include name="**/*.gif"/>
<include name="**/*.html"/>
@@ -171,7 +177,7 @@
</copy>
<!-- Copy the basic user guide files -->
<copy todir="${build.home}/documentation/userGuide">
- <fileset dir="src/doc/userGuide">
+ <fileset dir="${doc.dir}/userGuide">
<include name="**/*.css"/>
<include name="**/*.gif"/>
<include name="**/*.html"/>
@@ -208,10 +214,10 @@
<property name="webapp.name" value="template-example"/>
<property name="webapp.war" value="struts-template.war"/>
</ant>
- <ant antfile="build-webapp.xml" target="dist">
+ <!--ant antfile="build-webapp.xml" target="dist">
<property name="webapp.name" value="test"/>
<property name="webapp.war" value="struts-test.war"/>
- </ant>
+ </ant-->
<ant antfile="build-webapp.xml" target="dist">
<property name="webapp.name" value="upload"/>
<property name="webapp.war" value="struts-upload.war"/>
@@ -248,9 +254,9 @@
<ant antfile="build-webapp.xml" target="clean">
<property name="webapp.name" value="template-example"/>
</ant>
- <ant antfile="build-webapp.xml" target="clean">
+ <!--ant antfile="build-webapp.xml" target="clean">
<property name="webapp.name" value="test"/>
- </ant>
+ </ant-->
<ant antfile="build-webapp.xml" target="clean">
<property name="webapp.name" value="upload"/>
</ant>
1.45 +363 -226 jakarta-struts/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/build.xml,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- build.xml 2001/03/12 00:07:30 1.44
+++ build.xml 2001/03/18 17:56:56 1.45
@@ -1,231 +1,368 @@
<project name="Struts" default="compile.library" basedir=".">
- <!-- Initialization properties -->
- <property name="app.name" value="struts"/>
- <property name="build.home" value="target"/>
- <property name="catalina.home" value="../jakarta-tomcat-4.0/build"/>
- <property name="debug" value="true"/>
- <property name="deprecation" value="false"/>
- <property name="dist.home" value="${build.home}/dist"/>
- <property name="optimize" value="true"/>
- <property name="project.name" value="jakarta-struts"/>
- <property name="project.version" value="1.0-b1"/>
- <property name="tomcat.home" value="../build/tomcat"/>
-
- <!-- BUILD: Create directories and copy files for library -->
- <target name="prepare.library">
- <mkdir dir="${build.home}"/>
- <mkdir dir="${build.home}/library"/>
- <mkdir dir="${build.home}/library/classes"/>
- <mkdir dir="${build.home}/library/classes/META-INF"/>
- <mkdir dir="${build.home}/library/classes/META-INF/tlds"/>
- <copy file="src/conf/struts.tld"
- tofile="${build.home}/library/classes/META-INF/taglib.tld"/>
- <mkdir dir="${build.home}/library/classes/org"/>
- <mkdir dir="${build.home}/library/classes/org/apache"/>
- <mkdir dir="${build.home}/library/classes/org/apache/struts"/>
- <mkdir dir="${build.home}/library/classes/org/apache/struts/resources"/>
- <copy todir="${build.home}/library/classes/org/apache/struts/resources">
- <fileset dir="src/conf" includes="**/*.dtd"/>
- </copy>
- </target>
-
- <!-- BUILD: Prepare static directories for web applications -->
- <target name="static.webapps">
- <ant antfile="build-webapps.xml" target="static">
- </ant>
- </target>
-
- <!-- BUILD: Compile library directory components -->
- <target name="compile.library" depends="prepare.library">
- <javac srcdir="src/share" destdir="${build.home}/library/classes"
- classpath="${servlet.jar}"
- debug="${debug}" optimize="${optimize}"
- deprecation="${deprecation}"/>
- <copy todir="${build.home}/library/classes">
- <fileset dir="src/share" includes="**/*.properties"/>
- </copy>
- <copy todir="${build.home}/library">
- <fileset dir="src/conf" includes="*.dtd"/>
- <fileset dir="src/conf" includes="*.tld"/>
- </copy>
- <style basedir="src/doc" destdir="${build.home}/library"
- extension=".tld" style="stylesheets/tld.xsl"
- includes="struts-*.xml"/>
- <copy todir="${build.home}/library/classes/META-INF/tlds">
- <fileset dir="${build.home}/library" includes="struts-*.tld"/>
- </copy>
- <jar jarfile="${build.home}/library/${app.name}.jar"
- manifest="src/conf/MANIFEST.MF"
- basedir="${build.home}/library/classes" includes="**"/>
- </target>
-
- <!-- BUILD: Compile code for web applications -->
- <target name="compile.webapps" depends="compile.library,static.webapps">
- <ant antfile="build-webapps.xml" target="compile">
- </ant>
- </target>
-
- <!-- BUILD: Create Javadoc documentation -->
- <target name="compile.javadoc">
- <delete dir="${build.home}/documentation/api"/>
- <mkdir dir="${build.home}/documentation/api"/>
- <javadoc sourcepath="src/share"
- destdir="${build.home}/documentation/api"
- classpath="${servlet.jar}:${java.class.path}"
- packagenames="org.apache.struts.*"
- author="true"
- private="true"
- version="true"
+<!--
+ Struts main build.xml file for building everything related to Struts :
+ - core Struts library
+ - documentation
+ - Struts web apps
+ - run unit tests
+ - ...
+
+ This script will delegate some of it's tasks to the other build*.xml
+ scripts (build-webapps.xml, build-tests.xml, ...)
+-->
+
+
+<!-- ========== Prerequisite Properties =================================== -->
+
+<!--
+ These properties MUST be set on the "ant" command line, the "antrc"
+ properties file in your home directory, or from settings in a superior
+ build.xml script, if you wish to take advantage of the corresponding
+ functionality.
+
+ catalina.home (optional). The path to the Tomcat 4.0
+ installation. This is required only when
+ executing the "deploy.catalina" target.
+
+ servlet.jar The path to the Servlet API jar.
+
+ tomcat.home (optional). The path to the Tomcat 3.x
+ installation. This is required only when
+ executing the "deploy.tomcat" target.
+
+ xerces.home (optional) Distribution directory for the
+ Xerces XML parser. This is required only
+ when executing the "deploy.catalina"
+ target.
+
+ The values defined below are default values for properties that were
+ not defined
+-->
+
+ <property name="servlet.jar" value="../jakarta-servletapi/lib/servlet.jar"/>
+ <property name="catalina.home" value="../jakarta-tomcat-4.0/build"/>
+ <property name="tomcat.home" value="../build/tomcat"/>
+
+
+<!-- ========== Initialization Properties ================================= -->
+
+
+<!--
+ These property values may optionally be overridden with property
+ settings from an "ant" command line, the "antrc" properties file
+ in your home directory, or from settings in a superior build.xml
+ script.
+-->
+
+ <!-- Output directory name for all files generated by the build process -->
+ <property name="build.home" value="target"/>
+
+ <!-- Should Java compilations set the debug compiler option? -->
+ <property name="compile.debug" value="true" />
+
+ <!-- Should Java compilations set the deprecation compiler option? -->
+ <property name="compile.deprecation" value="false" />
+
+ <!-- Should Java compilations set the optimize compiler option? -->
+ <property name="compile.optimize" value="true" />
+
+ <!-- Name of the core struts library -->
+ <property name="app.name" value="struts"/>
+
+ <!-- Name of the project -->
+ <property name="project.name" value="jakarta-struts"/>
+
+ <!-- Version of the project -->
+ <property name="project.version" value="1.0-b1"/>
+
+
+<!-- ========== Derived Properties ======================================== -->
+
+
+<!--
+ These property values are derived from values defined above, and
+ generally should NOT be overridden by command line settings
+-->
+
+ <!-- The base directory for distribution targets -->
+ <property name="dist.home" value="dist" />
+
+ <!-- Source directory -->
+ <property name="src.dir" value="src"/>
+
+ <!-- Source directory for core struts library -->
+ <property name="src.share.dir" value="${src.dir}/share"/>
+
+ <!-- Directory where core struts library configurations files are stored -->
+ <property name="conf.share.dir" value="conf/share"/>
+
+ <!-- Directory where test configurations files are stored -->
+ <property name="conf.test.dir" value="conf/test"/>
+
+ <!-- Doc directory -->
+ <property name="doc.dir" value="doc"/>
+
+ <!-- Web directory -->
+ <property name="web.dir" value="web"/>
+
+
+<!-- ========== Executable Targets ======================================== -->
+
+
+<!--
+ The "init" target evaluates "available" expressions as necessary
+ to modify the behavior of this script and print some information on
+ screen
+-->
+ <target name="init">
+
+ <echo message="--------- ${project.name} ${project.version} ---------"/>
+ <echo message=""/>
+
+ <echo message="java.class.path = ${java.class.path}"/>
+ <echo message="java.home = ${java.home}"/>
+ <echo message="user.home = ${user.home}"/>
+
+ </target>
+
+<!--
+ Create directories and copy files for the core struts library
+-->
+ <target name="prepare.library" depends="init">
+ <mkdir dir="${build.home}/library/classes/META-INF/tlds"/>
+ <copy file="${conf.share.dir}/struts.tld"
+ tofile="${build.home}/library/classes/META-INF/taglib.tld"/>
+ <mkdir dir="${build.home}/library/classes/org/apache/struts/resources"/>
+ <copy todir="${build.home}/library/classes/org/apache/struts/resources">
+ <fileset dir="${conf.share.dir}" includes="**/*.dtd"/>
+ </copy>
+ </target>
+
+<!--
+ Prepare static directories for web applications
+-->
+ <target name="static.webapps">
+ <ant antfile="build-webapps.xml" target="static"/>
+ </target>
+
+<!--
+ Compile core struts library directory components
+-->
+ <target name="compile.library" depends="prepare.library">
+ <javac srcdir="${src.share.dir}"
+ destdir="${build.home}/library/classes"
+ classpath="${servlet.jar}"
+ debug="${debug}"
+ optimize="${optimize}"
+ deprecation="${deprecation}"/>
+ <copy todir="${build.home}/library/classes">
+ <fileset dir="${src.share.dir}" includes="**/*.properties"/>
+ </copy>
+ <copy todir="${build.home}/library">
+ <fileset dir="${conf.share.dir}" includes="*.dtd"/>
+ <fileset dir="${conf.share.dir}" includes="*.tld"/>
+ </copy>
+ <style basedir="${doc.dir}"
+ destdir="${build.home}/library"
+ extension=".tld"
+ style="stylesheets/tld.xsl"
+ includes="struts-*.xml"/>
+ <copy todir="${build.home}/library/classes/META-INF/tlds">
+ <fileset dir="${build.home}/library" includes="struts-*.tld"/>
+ </copy>
+ <jar jarfile="${build.home}/library/${app.name}.jar"
+ manifest="${conf.share.dir}/MANIFEST.MF"
+ basedir="${build.home}/library/classes"
+ includes="**"/>
+ </target>
+
+<!--
+ Compile code for web applications
+-->
+ <target name="compile.webapps" depends="compile.library,static.webapps">
+ <ant antfile="build-webapps.xml" target="compile"/>
+ </target>
+
+<!--
+ Create Javadoc documentation
+-->
+ <target name="compile.javadoc">
+ <delete dir="${build.home}/documentation/api"/>
+ <mkdir dir="${build.home}/documentation/api"/>
+ <javadoc sourcepath="${src.share.dir}"
+ destdir="${build.home}/documentation/api"
+ classpath="${servlet.jar}:${java.class.path}"
+ packagenames="org.apache.struts.*"
+ author="true"
+ private="true"
+ version="true"
windowtitle="Apache Struts API Documentation"
- doctitle="<h1>Apache Struts Framework (Version
${project.version})</h1>"
- bottom="Copyright © 2000-2001 - Apache Software Foundation"/>
- </target>
-
- <!-- DIST: Create directories and copy files for distribution -->
- <target name="prepare.dist">
- <mkdir dir="${dist.home}"/>
- <mkdir dir="${dist.home}/etc"/>
- <mkdir dir="${dist.home}/lib"/>
- <mkdir dir="${dist.home}/src"/>
- <mkdir dir="${dist.home}/web"/>
- <mkdir dir="${dist.home}/webapps"/>
- </target>
-
- <!-- DIST: Construct library distributables -->
- <target name="dist.library" depends="prepare.dist,compile.library">
- <copy todir="${dist.home}/lib">
- <fileset dir="${build.home}/library" includes="*.dtd"/>
- <fileset dir="${build.home}/library" includes="*.jar"/>
- <fileset dir="${build.home}/library" includes="*.tld"/>
- </copy>
- </target>
-
- <!-- DIST: Construct distributable web applications -->
- <target name="dist.webapps" depends="compile.webapps,compile.javadoc">
- <ant antfile="build-webapps.xml" target="dist">
- </ant>
- </target>
-
- <!-- DIST: Copy sources -->
- <target name="dist.source" depends="prepare.dist">
- <copy todir="${dist.home}/etc">
- <fileset dir="." includes="build.*"/>
- </copy>
- <copy file="INSTALL" tofile="${dist.home}/INSTALL"/>
- <copy file="LICENSE" tofile="${dist.home}/LICENSE"/>
- <copy file="README" tofile="${dist.home}/README"/>
- <copy todir="${dist.home}/src">
- <fileset dir="src"/>
- </copy>
- <copy todir="${dist.home}/web">
- <fileset dir="web"/>
- </copy>
- </target>
-
- <!-- DIST: Construct complete release distribution -->
- <target name="dist"
- depends="dist.library,dist.webapps,dist.source"/>
-
- <!-- DEPLOY: Deploy these applications on Catalina -->
- <target name="deploy.catalina" depends="compile.webapps">
- <mkdir dir="${catalina.home}/webapps/struts-blank"/>
- <copy todir="${catalina.home}/webapps/struts-blank">
- <fileset dir="${build.home}/blank"/>
- </copy>
- <copy todir="${catalina.home}/webapps/struts-blank/WEB-INF/lib">
- <fileset dir="${xerces.home}" includes="xerces.jar"/>
- </copy>
- <mkdir dir="${catalina.home}/webapps/struts-documentation"/>
- <copy todir="${catalina.home}/webapps/struts-documentation">
- <fileset dir="${build.home}/documentation"/>
- </copy>
- <copy todir="${catalina.home}/webapps/struts-documentation/WEB-INF/lib">
- <fileset dir="${xerces.home}" includes="xerces.jar"/>
- </copy>
- <mkdir dir="${catalina.home}/webapps/struts-example"/>
- <copy todir="${catalina.home}/webapps/struts-example">
- <fileset dir="${build.home}/example"/>
- </copy>
- <copy todir="${catalina.home}/webapps/struts-example/WEB-INF/lib">
- <fileset dir="${xerces.home}" includes="xerces.jar"/>
- </copy>
- <mkdir dir="${catalina.home}/webapps/struts-template"/>
- <copy todir="${catalina.home}/webapps/struts-template">
- <fileset dir="${build.home}/template-example"/>
- </copy>
- <copy todir="${catalina.home}/webapps/struts-template/WEB-INF/lib">
- <fileset dir="${xerces.home}" includes="xerces.jar"/>
- </copy>
- <mkdir dir="${catalina.home}/webapps/struts-exercise-taglib"/>
- <copy todir="${catalina.home}/webapps/struts-exercise-taglib">
- <fileset dir="${build.home}/exercise-taglib"/>
- </copy>
- <copy todir="${catalina.home}/webapps/struts-exercise-taglib/WEB-INF/lib">
- <fileset dir="${xerces.home}" includes="xerces.jar"/>
- </copy>
- <mkdir dir="${catalina.home}/webapps/struts-upload"/>
- <copy todir="${catalina.home}/webapps/struts-upload">
- <fileset dir="${build.home}/upload"/>
- </copy>
- <copy todir="${catalina.home}/webapps/struts-upload/WEB-INF/lib">
- <fileset dir="${xerces.home}" includes="xerces.jar"/>
- </copy>
- </target>
-
- <!-- DEPLOY: Deploy these applications on Tomcat -->
- <target name="deploy.tomcat" depends="compile.webapps">
- <mkdir dir="${tomcat.home}/webapps/struts-blank"/>
- <copy todir="${tomcat.home}/webapps/struts-blank">
- <fileset dir="${build.home}/blank"/>
- </copy>
- <mkdir dir="${tomcat.home}/webapps/struts-documentation"/>
- <copy todir="${tomcat.home}/webapps/struts-documentation">
- <fileset dir="${build.home}/documentation"/>
- </copy>
- <mkdir dir="${tomcat.home}/webapps/struts-example"/>
- <copy todir="${tomcat.home}/webapps/struts-example">
- <fileset dir="${build.home}/example"/>
- </copy>
- <mkdir dir="${tomcat.home}/webapps/struts-template"/>
- <copy todir="${tomcat.home}/webapps/struts-template">
- <fileset dir="${build.home}/template-example"/>
- </copy>
- <mkdir dir="${tomcat.home}/webapps/struts-exercise-taglib"/>
- <copy todir="${tomcat.home}/webapps/struts-exercise-taglib">
- <fileset dir="${build.home}/exercise-taglib"/>
- </copy>
- <mkdir dir="${tomcat.home}/webapps/struts-upload"/>
- <copy todir="${tomcat.home}/webapps/struts-upload">
- <fileset dir="${build.home}/upload"/>
- </copy>
- </target>
-
- <!-- UTILITY: Display all targets intended for developer use -->
- <target name="targets">
- <echo message=""/>
- <echo message="ANT build for ${project.name} ${project.version}"/>
- <echo message=""/>
- <echo message="The following targets are available:"/>
- <echo message=" all Cleans and builds library and
webapps"/>
- <echo message=" clean Cleans the build and distribution
directories"/>
- <echo message=" compile.javadoc Builds Javadoc API docs for Struts"/>
- <echo message=" compile.library Builds the main packages"/>
- <echo message=" compile.webapps Builds the web applications"/>
- <echo message=" deploy.catalina Deploys build to Catalina build
directory"/>
- <echo message=" deploy.tomcat Depoys build to Tomcat build
directory"/>
- <echo message=" dist Builds binary distribution in dist
directory"/>
- <echo message=""/>
- <echo message="Default target is 'compile.library'"/>
- </target>
-
- <!-- UTILITY: Clean up build and distribution directories -->
- <target name="clean">
- <delete dir="${build.home}"/>
- </target>
-
- <!-- UTILITY: All-in-one build target -->
- <target name="all"
- depends="clean,compile.library,compile.webapps"/>
+ doctitle="<h1>Apache Struts Framework (Version
${project.version})</h1>"
+ bottom="Copyright © 2000-2001 - Apache Software Foundation"/>
+ </target>
+
+<!--
+ Create directories and copy files for distribution
+-->
+ <target name="prepare.dist" depends="init">
+ <mkdir dir="${dist.home}"/>
+ <mkdir dir="${dist.home}/etc"/>
+ <mkdir dir="${dist.home}/lib"/>
+ <mkdir dir="${dist.home}/src"/>
+ <mkdir dir="${dist.home}/web"/>
+ <mkdir dir="${dist.home}/webapps"/>
+ </target>
+
+<!--
+ Construct library distributables
+-->
+ <target name="dist.library" depends="prepare.dist,compile.library">
+ <copy todir="${dist.home}/lib">
+ <fileset dir="${build.home}/library" includes="*.dtd"/>
+ <fileset dir="${build.home}/library" includes="*.jar"/>
+ <fileset dir="${build.home}/library" includes="*.tld"/>
+ </copy>
+ </target>
+
+<!--
+ Construct distributable web applications
+-->
+ <target name="dist.webapps" depends="compile.webapps,compile.javadoc">
+ <ant antfile="build-webapps.xml" target="dist"/>
+ </target>
+
+<!--
+ Copy sources for distribution
+-->
+ <target name="dist.source" depends="prepare.dist">
+ <copy todir="${dist.home}/etc">
+ <fileset dir="." includes="build.*"/>
+ </copy>
+ <copy file="INSTALL" tofile="${dist.home}/INSTALL"/>
+ <copy file="LICENSE" tofile="${dist.home}/LICENSE"/>
+ <copy file="README" tofile="${dist.home}/README"/>
+ <copy todir="${dist.home}/src">
+ <fileset dir="${src.dir}"/>
+ </copy>
+ <copy todir="${dist.home}/web">
+ <fileset dir="${web.dir}"/>
+ </copy>
+ </target>
+
+<!--
+ Construct complete release distribution
+-->
+ <target name="dist" depends="dist.library,dist.webapps,dist.source"/>
+
+<!--
+ Deploy these applications on Catalina
+-->
+ <target name="deploy.catalina" depends="compile.webapps">
+ <mkdir dir="${catalina.home}/webapps/struts-blank"/>
+ <copy todir="${catalina.home}/webapps/struts-blank">
+ <fileset dir="${build.home}/blank"/>
+ </copy>
+ <copy todir="${catalina.home}/webapps/struts-blank/WEB-INF/lib">
+ <fileset dir="${xerces.home}" includes="xerces.jar"/>
+ </copy>
+ <mkdir dir="${catalina.home}/webapps/struts-documentation"/>
+ <copy todir="${catalina.home}/webapps/struts-documentation">
+ <fileset dir="${build.home}/documentation"/>
+ </copy>
+ <copy todir="${catalina.home}/webapps/struts-documentation/WEB-INF/lib">
+ <fileset dir="${xerces.home}" includes="xerces.jar"/>
+ </copy>
+ <mkdir dir="${catalina.home}/webapps/struts-example"/>
+ <copy todir="${catalina.home}/webapps/struts-example">
+ <fileset dir="${build.home}/example"/>
+ </copy>
+ <copy todir="${catalina.home}/webapps/struts-example/WEB-INF/lib">
+ <fileset dir="${xerces.home}" includes="xerces.jar"/>
+ </copy>
+ <mkdir dir="${catalina.home}/webapps/struts-template"/>
+ <copy todir="${catalina.home}/webapps/struts-template">
+ <fileset dir="${build.home}/template-example"/>
+ </copy>
+ <copy todir="${catalina.home}/webapps/struts-template/WEB-INF/lib">
+ <fileset dir="${xerces.home}" includes="xerces.jar"/>
+ </copy>
+ <mkdir dir="${catalina.home}/webapps/struts-exercise-taglib"/>
+ <copy todir="${catalina.home}/webapps/struts-exercise-taglib">
+ <fileset dir="${build.home}/exercise-taglib"/>
+ </copy>
+ <copy todir="${catalina.home}/webapps/struts-exercise-taglib/WEB-INF/lib">
+ <fileset dir="${xerces.home}" includes="xerces.jar"/>
+ </copy>
+ <mkdir dir="${catalina.home}/webapps/struts-upload"/>
+ <copy todir="${catalina.home}/webapps/struts-upload">
+ <fileset dir="${build.home}/upload"/>
+ </copy>
+ <copy todir="${catalina.home}/webapps/struts-upload/WEB-INF/lib">
+ <fileset dir="${xerces.home}" includes="xerces.jar"/>
+ </copy>
+ </target>
+
+<!--
+ Deploy these applications on Tomcat
+-->
+ <target name="deploy.tomcat" depends="compile.webapps">
+ <mkdir dir="${tomcat.home}/webapps/struts-blank"/>
+ <copy todir="${tomcat.home}/webapps/struts-blank">
+ <fileset dir="${build.home}/blank"/>
+ </copy>
+ <mkdir dir="${tomcat.home}/webapps/struts-documentation"/>
+ <copy todir="${tomcat.home}/webapps/struts-documentation">
+ <fileset dir="${build.home}/documentation"/>
+ </copy>
+ <mkdir dir="${tomcat.home}/webapps/struts-example"/>
+ <copy todir="${tomcat.home}/webapps/struts-example">
+ <fileset dir="${build.home}/example"/>
+ </copy>
+ <mkdir dir="${tomcat.home}/webapps/struts-template"/>
+ <copy todir="${tomcat.home}/webapps/struts-template">
+ <fileset dir="${build.home}/template-example"/>
+ </copy>
+ <mkdir dir="${tomcat.home}/webapps/struts-exercise-taglib"/>
+ <copy todir="${tomcat.home}/webapps/struts-exercise-taglib">
+ <fileset dir="${build.home}/exercise-taglib"/>
+ </copy>
+ <mkdir dir="${tomcat.home}/webapps/struts-upload"/>
+ <copy todir="${tomcat.home}/webapps/struts-upload">
+ <fileset dir="${build.home}/upload"/>
+ </copy>
+ </target>
+
+<!--
+ Display all targets intended for developer use
+-->
+ <target name="targets">
+ <echo message=""/>
+ <echo message="ANT build for ${project.name} ${project.version}"/>
+ <echo message=""/>
+ <echo message="The following targets are available:"/>
+ <echo message=" all Cleans and builds library and
webapps"/>
+ <echo message=" clean Cleans the build and distribution
directories"/>
+ <echo message=" compile.javadoc Builds Javadoc API docs for
Struts"/>
+ <echo message=" compile.library Builds the main packages"/>
+ <echo message=" compile.webapps Builds the web applications"/>
+ <echo message=" deploy.catalina Deploys build to Catalina build
directory"/>
+ <echo message=" deploy.tomcat Depoys build to Tomcat build
directory"/>
+ <echo message=" dist Builds binary distribution in dist
directory"/>
+ <echo message=""/>
+ <echo message="Default target is 'compile.library'"/>
+ </target>
+
+<!--
+ Clean up build and distribution directories
+-->
+ <target name="clean">
+ <delete dir="${build.home}"/>
+ </target>
+
+<!--
+ All-in-one build target
+-->
+ <target name="all" depends="clean,compile.library,compile.webapps"/>
</project>