<project name="Generic Webapp" default="compile" basedir=".">
-<!--
- This is a generic build.xml file for Ant that can be used to develop
- any web application that conforms to the following requirements:
+ <!--
+ This is a generic build.xml file for Ant that can be used to develop
+ any web application that conforms to the following requirements:
- - Web sources appear in the directory specified by the "webapp.web"
- property, in exactly the hierarchy to be present in the created
- web application archive.
+ - Web sources appear in the directory specified by the "webapp.web"
+ property, in exactly the hierarchy to be present in the created
+ web application archive.
- - Java sources (if any) appear in the directory specified by the
- "webapp.src" property, which will be compiled into the
- "WEB-INF/classes" directory of the resulting web application.
+ - Java sources (if any) appear in the directory specified by the
+ "webapp.src" property, which will be compiled into the
+ "WEB-INF/classes" directory of the resulting web application.
- - You must specify a "servlet.jar" property that defines the path
- of the servlet API classes you will compile against.
+ - You must specify a "servlet.jar" property that defines the path
+ of the servlet API classes you will compile against.
- - If you want to copy Struts libraries and TLD files to your web
- application, set the "struts.libs" property to the pathname of a
- directory containing struts.jar and the associated *.tld files.
+ - If you want to copy Struts libraries and TLD files to your web
+ application, set the "struts.libs" property to the pathname of a
+ directory containing struts.jar and the associated *.tld files.
- - If you want to copy additional JAR files into the WEB-INF/lib
- directory of your web app, set the "webapp.libs" property to the
- pathname of a directory containing the JAR files to be copied.
+ - If you want to copy additional JAR files into the WEB-INF/lib
+ directory of your web app, set the "webapp.libs" property to the
+ pathname of a directory containing the JAR files to be copied.
--->
+ -->
-<!-- ========== Prerequisite Properties =================================== -->
+ <!-- ========== 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.
+ <!--
+ 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.
- compile.classpath The class path containing external
- JAR files and directories required for
- compiling this web application. Note
- that struts.jar will automatically be
- added if "struts.lib" is defined, and
- dependent JAR files will be added if
- "webapp.libs" is defined.
+ compile.classpath The class path containing external
+ JAR files and directories required for
+ compiling this web application. Note
+ that struts.jar will automatically be
+ added if "struts.lib" is defined, and
+ dependent JAR files will be added if
+ "webapp.libs" is defined.
- build.home Base directory into which we are building
- the Struts components.
+ build.home Base directory into which we are building
+ the Struts components.
- commons-beanutils.jar (required). The path to the JAR file
- of the Jakarta Commons Beanutils
- package (version 1.0 or later).
+ commons-beanutils.jar (required). The path to the JAR file
+ of the Jakarta Commons Beanutils
+ package (version 1.0 or later).
- commons-collections.jar (required). The path to the JAR file
- of the Jakarta Commons Collections
- package (version 1.0 or later).
+ commons-collections.jar (required). The path to the JAR file
+ of the Jakarta Commons Collections
+ package (version 1.0 or later).
- commons-digester.jar (required). The path to the JAR file
- of the Jakarta Commons Digester
- package (version 1.0 or later).
+ commons-digester.jar (required). The path to the JAR file
+ of the Jakarta Commons Digester
+ package (version 1.0 or later).
- commons-logging.jar (required). The path to the JAR file
- of the Jakarta Commons Logging
- package (version 1.0 or later).
+ commons-logging.jar (required). The path to the JAR file
+ of the Jakarta Commons Logging
+ package (version 1.0 or later).
- servlet.jar MUST be set to the pathname of the
- servlet API classes you wish to
- compile against.
+ servlet.jar MUST be set to the pathname of the
+ servlet API classes you wish to
+ compile against.
- securityfilter.libs If specified, must be the pathname of a
- directory from which "securityfilter.jar"
- will be copied to your WEB-INF/lib
- directory. Also, the securityfilter.jar
- file will automatically be added to your
- compile classpath.
+ securityfilter.libs If specified, must be the pathname of a
+ directory from which "securityfilter.jar"
+ will be copied to your WEB-INF/lib
+ directory. Also, the securityfilter.jar
+ file will automatically be added to your
+ compile classpath.
- webapp.libs If specified, must be the pathname of a
- directory from which all available
- "*.jar" files are copied to the web
- application's WEB-INF/lib directory.
- Also, any JAR files found here will
- automatically be added to your compile
- classpath.
+ webapp.libs If specified, must be the pathname of a
+ directory from which all available
+ "*.jar" files are copied to the web
+ application's WEB-INF/lib directory.
+ Also, any JAR files found here will
+ automatically be added to your compile
+ classpath.
- webapp.name MUST be set to the base name of the web
- application archive file that will be
- created for this web application.
+ webapp.name MUST be set to the base name of the web
+ application archive file that will be
+ created for this web application.
- webapp.suppress Set this property to an arbitrary value
- (such as "true") if you do NOT want the
- source code for your web application
- copied to the WEB-INF/src directory.
+ webapp.suppress Set this property to an arbitrary value
+ (such as "true") if you do NOT want the
+ source code for your web application
+ copied to the WEB-INF/src directory.
- webapp.war If specified, overrides the default name
- of the web application archive file to be
- created for this webapp. Default value
- is "${webapp.name}.war".
+ webapp.war If specified, overrides the default name
+ of the web application archive file to be
+ created for this webapp. Default value
+ is "${webapp.name}.war".
--->
+ -->
-<property name="build.home" value="target" />
-<property name="servlet.jar" value="../jakarta-servletapi/lib/servlet.jar"/>
+ <!-- property name="build.home" value="target" / -->
+ <!-- property name="servlet.jar" value="../jakarta-servletapi/lib/servlet.jar"/ -->
-<!-- ========== Initialization Properties ================================= -->
+ <!-- ========== 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.
--->
+ <!--
+ 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.
+ -->
-<!-- Should Java compilations set the debug compiler option? -->
-<property name="compile.debug" value="true" />
+ <!-- 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 deprecation compiler option? -->
+ <property name="compile.deprecation" value="false"/>
-<!-- Should Java compilations set the optimize compiler option? -->
-<property name="compile.optimize" value="true" />
+ <!-- Should Java compilations set the optimize compiler option? -->
+ <property name="compile.optimize" value="true"/>
-<!-- The base directory for distribution targets -->
-<property name="dist.home" value="dist" />
+ <!-- The base directory for distribution targets -->
+ <property name="dist.home" value="dist"/>
-<!-- The source directory for Java compilations related to this webapp -->
-<property name="webapp.src" value="src/${webapp.name}" />
+ <!-- The source directory for Java compilations related to this webapp -->
+ <property name="webapp.src" value="src/${webapp.name}"/>
-<!-- The version number of this particular web application -->
-<property name="webapp.version" value="1.0" />
+ <!-- The version number of this particular web application -->
+ <property name="webapp.version" value="1.0"/>
-<!-- The name of the web application archive file to be produced -->
-<property name="webapp.war" value="${webapp.name}.war" />
+ <!-- The name of the web application archive file to be produced -->
+ <property name="webapp.war" value="${webapp.name}.war"/>
-<!-- The source directory for copying static web resources and files -->
-<property name="webapp.web" value="web/${webapp.name}" />
+ <!-- The source directory for copying static web resources and files -->
+ <property name="webapp.web" value="web/${webapp.name}"/>
-<!-- ========== Derived Properties ======================================== -->
+ <!-- ========== Derived Properties ======================================== -->
-<!--
- These property values are derived from values defined above, and
- generally should NOT be overridden by command line settings
--->
+ <!--
+ These property values are derived from values defined above, and
+ generally should NOT be overridden by command line settings
+ -->
-<!-- The target directory for building the packed web application -->
-<property name="webapp.dist" value="${dist.home}/webapps" />
+ <!-- The target directory for building the packed web application -->
+ <property name="webapp.dist" value="${dist.home}/webapps"/>
-<!-- The target directory for building the unpacked web application -->
-<property name="webapp.target" value="${build.home}/${webapp.name}" />
+ <!-- The target directory for building the unpacked web application -->
+ <property name="webapp.target" value="${build.home}/${webapp.name}"/>
-<!-- The class path used for compiling this library -->
-<path id="classpath">
- <pathelement location="${catalina.jar}"/>
- <pathelement location="${commons-beanutils.jar}"/>
- <pathelement location="${commons-collections.jar}"/>
- <pathelement location="${commons-digester.jar}"/>
- <pathelement location="${commons-logging.jar}"/>
- <pathelement location="${servlet.jar}"/>
- <pathelement location="${securityfilter.libs}/securityfilter.jar"/>
- <pathelement location="${webapp.libs}"/>
- <pathelement path="${compile.classpath}"/>
-</path>
+ <!-- The class path used for compiling this library -->
+ <path id="classpath">
+ <pathelement location="${catalina.jar}"/>
+ <pathelement location="${commons-beanutils.jar}"/>
+ <pathelement location="${commons-collections.jar}"/>
+ <pathelement location="${commons-digester.jar}"/>
+ <pathelement location="${commons-logging.jar}"/>
+ <pathelement location="${servlet.jar}"/>
+ <pathelement location="${securityfilter.libs}/securityfilter.jar"/>
+ <pathelement location="${webapp.libs}"/>
+ <pathelement path="${compile.classpath}"/>
+ </path>
-<!-- ========== Executable Targets ======================================== -->
+ <!-- ========== Executable Targets ======================================== -->
-<!--
- The "init" target evaluates "available" expressions as necessary
- to modify the behavior of this script.
--->
-<target name="init">
+ <!--
+ The "init" target evaluates "available" expressions as necessary
+ to modify the behavior of this script.
+ -->
+ <target name="init">
- <echo message="Processing webapp ${webapp.name}"/>
+ <echo message="Processing webapp ${webapp.name}"/>
- <!-- Do we need to copy dependent libraries? -->
- <available property="copy.libs" file="${webapp.libs}" />
+ <!-- Do we need to copy dependent libraries? -->
+ <available property="copy.libs" file="${webapp.libs}"/>
- <!-- Do we need to compile the Java sources for this web application? -->
- <available property="webapp.compile" file="${webapp.src}" />
+ <!-- Do we need to compile the Java sources for this web application? -->
+ <available property="webapp.compile" file="${webapp.src}"/>
- <!-- Should we copy Security Filter library files? -->
- <available property="webapp.securityfilter" file="${securityfilter.libs}" />
+ <!-- Should we copy Security Filter library files? -->
+ <available property="webapp.securityfilter" file="${securityfilter.libs}"/>
-</target>
+ </target>
-<!--
- The "prepare" target creates a directory structure in the build target
- area for the unpacked files associated with this web application
--->
-<target name="prepare" depends="init"
- description="Prepare target directory">
- <echo message="Processing webapp ${webapp.name}"/>
- <mkdir dir="${webapp.target}" />
- <mkdir dir="${webapp.target}/WEB-INF" />
- <mkdir dir="${webapp.target}/WEB-INF/classes" />
- <!-- do we need this twice? -->
- <mkdir dir="${webapp.target}" />
-</target>
-
-
-<!--
- The "libs" target copies specified library JAR files (if any) from the
- "${webapp.libs} directory into the WEB-INF/lib directory of this app.
--->
-
-<target name="libs" depends="prepare" if="copy.libs"
- description="Copy dependent libraries">
- <echo message="Processing webapp ${webapp.name}"/>
- <mkdir dir="${webapp.target}/WEB-INF/lib" />
- <copy todir="${webapp.target}/WEB-INF/lib">
- <fileset dir="${webapp.libs}" includes="*.jar"/>
- </copy>
-</target>
-
-
-<!--
- The "source" target copies the Java source code of your web application
- into the build target area, IF AND ONLY IF the "webapp.source"
- property has been set to an arbitrary value.
--->
-
-<target name="source" depends="prepare" if="webapp.compile"
- unless="webapp.suppress"
- description="Copy Java sources">
- <echo message="Processing webapp ${webapp.name}"/>
- <mkdir dir="${webapp.target}/WEB-INF/src"/>
- <copy todir="${webapp.target}/WEB-INF/src">
- <fileset dir="${webapp.src}"/>
- </copy>
-</target>
-
-
-<!--
- The "securityfilter" target copies the Security Filter library JAR file
- into the build target area.
--->
-<target name="securityfilter" depends="prepare" if="webapp.securityfilter"
- description="Copy Security Filter library files">
- <echo message="Processing webapp ${webapp.name}"/>
- <mkdir dir="${webapp.target}/WEB-INF/lib"/>
- <copy todir="${webapp.target}/WEB-INF/lib">
- <fileset dir="${securityfilter.libs}" includes="commons-*.jar"/>
- <fileset dir="${securityfilter.libs}" includes="jakarta-oro.jar"/>
- <fileset dir="${securityfilter.libs}" includes="securityfilter.jar"/>
- </copy>
-</target>
-
-
-<!--
- The "static" target copies the static web resources portion of your
- web application source into the build target area.
--->
-<target name="static" depends="prepare,source,libs,securityfilter"
- description="Copy static files">
- <echo message="Processing webapp ${webapp.name}"/>
- <copy todir="${webapp.target}">
- <fileset dir="${webapp.web}"/>
- </copy>
-</target>
-
-
-<!--
- The "compile" target compiles the Java source code of your web
- application, if and only if the specified source directory
- actually exists.
--->
-<target name="compile" depends="static" if="webapp.compile"
- description="Compile Java sources">
- <echo message="Processing webapp ${webapp.name}"/>
- <javac srcdir="${webapp.src}"
+ <!--
+ The "prepare" target creates a directory structure in the build target
+ area for the unpacked files associated with this web application
+ -->
+ <target name="prepare" depends="init"
+ description="Prepare target directory">
+ <echo message="Processing webapp ${webapp.name}"/>
+ <mkdir dir="${webapp.target}"/>
+ <mkdir dir="${webapp.target}/WEB-INF"/>
+ <mkdir dir="${webapp.target}/WEB-INF/classes"/>
+ </target>
+
+
+ <!--
+ The "libs" target copies specified library JAR files (if any) from the
+ "${webapp.libs} directory into the WEB-INF/lib directory of this app.
+ -->
+
+ <target name="libs" depends="prepare" if="copy.libs"
+ description="Copy dependent libraries">
+ <echo message="Processing webapp ${webapp.name}"/>
+ <mkdir dir="${webapp.target}/WEB-INF/lib"/>
+ <copy todir="${webapp.target}/WEB-INF/lib">
+ <fileset dir="${webapp.libs}" includes="*.jar"/>
+ </copy>
+ </target>
+
+
+ <!--
+ The "source" target copies the Java source code of your web application
+ into the build target area, IF AND ONLY IF the "webapp.source"
+ property has been set to an arbitrary value.
+ -->
+
+ <target name="source" depends="prepare" if="webapp.compile"
+ unless="webapp.suppress"
+ description="Copy Java sources">
+ <echo message="Processing webapp ${webapp.name}"/>
+ <mkdir dir="${webapp.target}/WEB-INF/src"/>
+ <copy todir="${webapp.target}/WEB-INF/src">
+ <fileset dir="${webapp.src}"/>
+ </copy>
+ </target>
+
+
+ <!--
+ The "securityfilter" target copies the Security Filter library JAR file
+ into the build target area.
+ -->
+ <target name="securityfilter" depends="prepare" if="webapp.securityfilter"
+ description="Copy Security Filter library files">
+ <echo message="Processing webapp ${webapp.name}"/>
+ <mkdir dir="${webapp.target}/WEB-INF/lib"/>
+ <copy todir="${webapp.target}/WEB-INF/lib">
+ <fileset dir="${securityfilter.libs}" includes="commons-*.jar"/>
+ <fileset dir="${securityfilter.libs}" includes="jakarta-oro.jar"/>
+ <fileset dir="${securityfilter.libs}" includes="catalina-base64.jar"/>
+ <fileset dir="${securityfilter.libs}" includes="securityfilter.jar"/>
+ </copy>
+ </target>
+
+
+ <!--
+ The "static" target copies the static web resources portion of your
+ web application source into the build target area.
+ -->
+ <target name="static" depends="prepare,source,libs,securityfilter"
+ description="Copy static files">
+ <echo message="Processing webapp ${webapp.name}"/>
+ <copy todir="${webapp.target}">
+ <fileset dir="${webapp.web}"/>
+ </copy>
+ </target>
+
+
+ <!--
+ The "compile" target compiles the Java source code of your web
+ application, if and only if the specified source directory
+ actually exists.
+ -->
+ <target name="compile" depends="static" if="webapp.compile"
+ description="Compile Java sources">
+ <echo message="Processing webapp ${webapp.name}"/>
+ <javac srcdir="${webapp.src}"
destdir="${webapp.target}/WEB-INF/classes"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="classpath"/>
- </javac>
- <copy todir="${webapp.target}/WEB-INF/classes">
- <fileset dir="${webapp.src}">
- <exclude name="**/*.java"/>
- </fileset>
- </copy>
-</target>
-
-
-
-<!--
- The "dist" target creates a web application archive containing
- your completed web application, suitable for deployment on any
- compatible servlet container.
--->
-<target name="dist" depends="compile"
- description="Create web application archive">
- <echo message="Processing webapp ${webapp.name}"/>
- <jar jarfile="${webapp.dist}/${webapp.war}"
- basedir="${webapp.target}"/>
-</target>
-
-
-<!--
- The "clean" task deletes any created directories that have resulted
- from running any of the other targets in this script.
--->
-
-<target name="clean"
- description="Clean build and distribution directories">
- <echo message="Processing webapp ${webapp.name}"/>
- <delete dir="${webapp.target}" />
- <delete file="${webapp.dist}/${webapp.war}"/>
-</target>
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}">
+ <classpath refid="classpath"/>
+ </javac>
+ <copy todir="${webapp.target}/WEB-INF/classes">
+ <fileset dir="${webapp.src}">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+ </target>
+
+
+
+ <!--
+ The "dist" target creates a web application archive containing
+ your completed web application, suitable for deployment on any
+ compatible servlet container.
+ -->
+ <target name="dist" depends="compile"
+ description="Create web application archive">
+ <echo message="Processing webapp ${webapp.name}"/>
+ <jar jarfile="${webapp.dist}/${webapp.war}"
+ basedir="${webapp.target}"/>
+ </target>
+
+
+ <!--
+ The "clean" task deletes any created directories that have resulted
+ from running any of the other targets in this script.
+ -->
+
+ <target name="clean"
+ description="Clean build and distribution directories">
+ <echo message="Processing webapp ${webapp.name}"/>
+ <delete dir="${webapp.target}"/>
+ <delete file="${webapp.dist}/${webapp.war}"/>
+ </target>
</project>
<project name="Security Filter" default="compile.library" basedir=".">
-<!--
- Security Filter main build.xml file for building everything related to Security Filter :
- - core Security Filter library
- - documentation
- - Security Filter web apps
- - ...
+ <!--
+ Security Filter main build.xml file for building everything related to Security Filter :
+ - core Security Filter library
+ - documentation
+ - Security Filter web apps
+ - ...
- This script will delegate some of it's tasks to the other build*.xml
- scripts (build-webapps.xml, ...)
--->
+ This script will delegate some of it's tasks to the other build*.xml
+ scripts (build-webapps.xml, ...)
+ -->
-<!-- ========== Prerequisite Properties =================================== -->
+ <!-- ========== Prerequisite Properties =================================== -->
-<!--
- These properties MUST be set on the "ant" command line, a
- "build.properties" file in the base directory, or a
- "build.properties" file in your user home directory.
+ <!--
+ These properties MUST be set on the "ant" command line, a
+ "build.properties" file in the base directory, or a
+ "build.properties" file in your user home directory.
- catalina.jar (required). The path to the JAR file
- of the Tomcat
- package (version 4.0 or later).
+ catalina.jar (required). The path to the JAR file
+ of the Tomcat
+ package (version 4.0 or later).
- commons-beanutils.jar (required). The path to the JAR file
- of the Jakarta Commons Beanutils
- package (version 1.0 or later).
+ commons-beanutils.jar (required). The path to the JAR file
+ of the Jakarta Commons Beanutils
+ package (version 1.0 or later).
- commons-collections.jar (required). The path to the JAR file
- of the Jakarta Commons Collections
- package (version 1.0 or later).
+ commons-collections.jar (required). The path to the JAR file
+ of the Jakarta Commons Collections
+ package (version 1.0 or later).
- commons-digester.jar (required). The path to the JAR file
- of the Jakarta Commons Digester
- package (version 1.0 or later).
+ commons-digester.jar (required). The path to the JAR file
+ of the Jakarta Commons Digester
+ package (version 1.0 or later).
- commons-logging.jar (required). The path to the JAR file
- of the Jakarta Commons Logging
- package (version 1.0 or later).
+ commons-logging.jar (required). The path to the JAR file
+ of the Jakarta Commons Logging
+ package (version 1.0 or later).
- jakarta-oro.jar (required). The path to the JAR file
- of the Jakarta ORO
- package (version 2.0.6 or later).
+ jakarta-oro.jar (required). The path to the JAR file
+ of the Jakarta ORO
+ package (version 2.0.6 or later).
- servlet.jar (required). The path to the Servlet API
- classes to compile against
- (version 2.3 or later).
+ servlet.jar (required). The path to the Servlet API
+ classes to compile against
+ (version 2.3 or later).
--->
+ -->
- <!-- Load local and user build preferences -->
- <property file="${user.home}/build.properties"/>
- <property file="build.properties"/>
+ <!-- Load local and user build preferences -->
+ <property file="${user.home}/build.properties"/>
+ <property file="build.properties"/>
-<!-- ========== Initialization Properties ================================= -->
+ <!-- ========== Initialization Properties ================================= -->
-<!--
- These property values may optionally be overridden with property
- settings from an "ant" command line, the "build.properties" file
- in this directory, the "build.properties" file in your home
- directory, or from settings in a superior build.xml script.
--->
+ <!--
+ These property values may optionally be overridden with property
+ settings from an "ant" command line, the "build.properties" file
+ in this directory, the "build.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="${basedir}/target"/>
+ <!-- Output directory name for all files generated by the build process -->
+ <property name="build.home" location="${basedir}/target"/>
- <!-- Should Java compilations set the debug compiler option? -->
- <property name="compile.debug" value="true" />
+ <!-- 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 deprecation compiler option? -->
+ <property name="compile.deprecation" value="false"/>
- <!-- Should Java compilations set the optimize compiler option? -->
- <property name="compile.optimize" value="true" />
+ <!-- Should Java compilations set the optimize compiler option? -->
+ <property name="compile.optimize" value="true"/>
- <!-- Name of the core securityfilter library -->
- <property name="app.name" value="securityfilter"/>
+ <!-- Name of the core securityfilter library -->
+ <property name="app.name" value="securityfilter"/>
- <!-- Name of the project -->
- <property name="project.name" value="securityfilter"/>
+ <!-- Name of the project -->
+ <property name="project.name" value="securityfilter"/>
- <!-- Version of the project -->
- <property name="project.version" value="1.1-dev"/>
+ <!-- Version of the project -->
+ <property name="project.version" value="1.1-dev"/>
-<!-- ========== Derived Properties ======================================== -->
+ <!-- ========== Derived Properties ======================================== -->
-<!--
- These property values are derived from values defined above, and
- generally should NOT be overridden by command line settings
--->
+ <!--
+ 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" />
+ <!-- The base directory for distribution targets -->
+ <property name="dist.home" location="${basedir}/dist"/>
- <!-- The base directory for release targets -->
- <property name="release.home" value="release" />
+ <!-- The base directory for release targets -->
+ <property name="release.home" location="${basedir}/release"/>
- <!-- Source directory -->
- <property name="src.dir" value="src"/>
+ <!-- Source directory -->
+ <property name="src.dir" location="${basedir}/src"/>
- <!-- Source directory for core securityfilter library -->
- <property name="src.share.dir" value="${src.dir}/share"/>
+ <!-- Source directory for core securityfilter library -->
+ <property name="src.share.dir" location="${src.dir}/share"/>
- <!-- Source directory for securityfilter-catalina library -->
- <property name="src.catalina.dir" value="${src.dir}/catalina"/>
+ <!-- Source directory for securityfilter-catalina library -->
+ <property name="src.catalina.dir" location="${src.dir}/catalina"/>
- <!-- Directory where core struts library configurations files are stored -->
- <property name="conf.share.dir" value="conf/share"/>
+ <!-- Directory where core struts library configurations files are stored -->
+ <property name="conf.share.dir" location="${basedir}/conf/share"/>
- <!-- Directory where binary release files are staged -->
- <property name="stage.bin.dir" value="${release.home}/stage/bin"/>
+ <!-- Directory where binary release files are staged -->
+ <property name="stage.bin.dir" location="${release.home}/stage/bin"/>
- <!-- Directory where library release files are staged -->
- <property name="stage.lib.dir" value="${release.home}/stage/lib"/>
+ <!-- Directory where library release files are staged -->
+ <property name="stage.lib.dir" location="${release.home}/stage/lib"/>
- <!-- Directory where source release files are staged -->
- <property name="stage.src.dir" value="${release.home}/stage/src"/>
+ <!-- Directory where source release files are staged -->
+ <property name="stage.src.dir" location="${release.home}/stage/src"/>
- <!-- Directory where release builds are prepared for upload -->
- <property name="upload.dir" value="${release.home}/upload"/>
+ <!-- Directory where release builds are prepared for upload -->
+ <property name="upload.dir" location="${release.home}/upload"/>
- <!-- Base file name for upload files -->
- <property name="upload.file.base" value="${project.name}-${project.version}"/>
+ <!-- Base file name for upload files -->
+ <property name="upload.file.base" value="${project.name}-${project.version}"/>
- <!-- Web directory -->
- <property name="web.dir" value="web"/>
+ <!-- Web directory -->
+ <property name="web.dir" location="${basedir}/web"/>
- <!-- Compilation Classpath -->
- <path id="compile.classpath">
+ <!-- Compilation Classpath -->
+ <path id="compile.classpath">
<pathelement location="${catalina.jar}"/>
<pathelement location="${commons-beanutils.jar}"/>
<pathelement location="${commons-collections.jar}"/>
<pathelement location="${commons-logging.jar}"/>
<pathelement location="${jakarta-oro.jar}"/>
<pathelement location="${servlet.jar}"/>
- </path>
-
-
-<!-- ========== 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 securityfilter library
--->
- <target name="prepare.library" depends="init">
- <mkdir dir="${build.home}/library/classes/META-INF"/>
- <copy file="LICENSE"
- tofile="${build.home}/library/classes/META-INF/LICENSE"/>
- <copy todir="${build.home}/library/classes/org/securityfilter/resources">
- <fileset dir="${conf.share.dir}" includes="**/*.dtd"/>
- </copy>
- <copy file="${catalina.jar}"
- tofile="${build.home}/library/catalina.jar"/>
- <copy file="${commons-beanutils.jar}"
- tofile="${build.home}/library/commons-beanutils.jar"/>
- <copy file="${commons-collections.jar}"
- tofile="${build.home}/library/commons-collections.jar"/>
- <copy file="${commons-digester.jar}"
- tofile="${build.home}/library/commons-digester.jar"/>
- <copy file="${commons-logging.jar}"
- tofile="${build.home}/library/commons-logging.jar"/>
- <copy file="${jakarta-oro.jar}"
- tofile="${build.home}/library/jakarta-oro.jar"/>
- </target>
-
-<!--
- Prepare static directories for web applications
--->
- <target name="static.webapps">
- <ant antfile="build-webapps.xml" target="static"/>
- </target>
-
-<!--
- Compile core securityfilter library directory components
--->
- <target name="compile.library" depends="prepare.library"
- description="Compile Security Filter library files">
- <javac srcdir="${src.share.dir}"
- destdir="${build.home}/library/classes"
- debug="${compile.debug}"
- optimize="${compile.optimize}"
- deprecation="${compile.deprecation}">
- <classpath refid="compile.classpath"/>
- </javac>
- <!-- catalina -->
- <javac srcdir="${src.catalina.dir}"
- destdir="${build.home}/library/classes"
- debug="${compile.debug}"
- optimize="${compile.optimize}"
- deprecation="${compile.deprecation}">
- <classpath refid="compile.classpath"/>
- </javac>
- <copy todir="${build.home}/library">
- <fileset dir="${conf.share.dir}" includes="*.dtd"/>
- </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"
- description="Compile Struts web applications">
- <ant antfile="build-webapps.xml" target="compile"/>
- </target>
-
-<!--
- Create Javadoc documentation
--->
- <target name="compile.javadoc"
- description="Generate JavaDoc API docs">
- <delete dir="${build.home}/documentation/api"/>
- <mkdir dir="${build.home}/documentation/api"/>
- <javadoc
- destdir="${build.home}/documentation/api"
- classpath="${servlet.jar}"
- packagenames="org.securityfilter.*"
- author="true"
- private="true"
- version="true"
- windowtitle="Security Filter API Documentation"
- doctitle="<h1>Security Filter (Version ${project.version})</h1>"
- bottom="Copyright © 2002 - SecurityFilter.org">
- <sourcepath>
- <pathelement location="${src.share.dir}" />
- <pathelement location="${src.catalina.dir}" />
- </sourcepath>
- <classpath refid="compile.classpath"/>
- </javadoc>
- </target>
-
-<!--
- Create directories and copy files for distribution
--->
- <target name="prepare.dist" depends="init">
- <mkdir dir="${dist.home}"/>
- <mkdir dir="${dist.home}/lib"/>
- <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="*.xml"/>
- </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 file="INSTALL" tofile="${dist.home}/INSTALL"/> -->
- <copy file="LICENSE" tofile="${dist.home}/LICENSE"/>
- <copy file="README" tofile="${dist.home}/README"/>
- </target>
-
-<!--
- Construct complete binary distribution
--->
- <target name="dist" depends="dist.library,dist.webapps,dist.source"
- description="Construct binary distribution"/>
-
-<!--
- Construct complete release distributions
--->
- <target name="release" depends="clean,dist"
- description="Construct release distribution">
- <mkdir dir="${stage.bin.dir}/${upload.file.base}"/>
- <mkdir dir="${stage.lib.dir}/${upload.file.base}-lib"/>
- <mkdir dir="${stage.src.dir}/${upload.file.base}-src"/>
- <copy todir="${stage.bin.dir}/${upload.file.base}">
- <fileset dir="${dist.home}"/>
- </copy>
- <copy todir="${stage.lib.dir}/${upload.file.base}-lib">
- <fileset dir="${dist.home}" includes="LICENSE"/>
- <fileset dir="${dist.home}/lib"/>
- </copy>
- <copy todir="${stage.src.dir}/${upload.file.base}-src">
- <fileset dir=".">
- <exclude name="build.properties"/>
- <exclude name="target/**"/>
- <exclude name="dist/**"/>
- <exclude name="release/**"/>
- <exclude name="*.ipr"/>
- <exclude name=".output/**"/>
- </fileset>
- </copy>
- <mkdir dir="${upload.dir}"/>
- <zip zipfile="${upload.dir}/${upload.file.base}.zip"
- basedir="${stage.bin.dir}"/>
- <zip zipfile="${upload.dir}/${upload.file.base}-lib.zip"
- basedir="${stage.lib.dir}"/>
- <zip zipfile="${upload.dir}/${upload.file.base}-src.zip"
- basedir="${stage.src.dir}"/>
- <tar tarfile="${upload.dir}/${upload.file.base}.tar"
- basedir="${stage.bin.dir}"
- longfile="gnu"/>
- <tar tarfile="${upload.dir}/${upload.file.base}-lib.tar"
- basedir="${stage.lib.dir}"
- longfile="gnu"/>
- <tar tarfile="${upload.dir}/${upload.file.base}-src.tar"
- basedir="${stage.src.dir}"
- longfile="gnu"/>
- <gzip src="${upload.dir}/${upload.file.base}.tar"
- zipfile="${upload.dir}/${upload.file.base}.tar.gz"/>
- <gzip src="${upload.dir}/${upload.file.base}-lib.tar"
- zipfile="${upload.dir}/${upload.file.base}-lib.tar.gz"/>
- <gzip src="${upload.dir}/${upload.file.base}-src.tar"
- zipfile="${upload.dir}/${upload.file.base}-src.tar.gz"/>
- </target>
-
-
-<!--
- Clean up build and distribution directories
--->
- <target name="clean"
- description="Clean build and distribution directories">
- <delete dir="${build.home}"/>
- <delete dir="${dist.home}"/>
- <delete dir="${release.home}"/>
- </target>
-
-<!--
- All-in-one build target
--->
- <target name="all" depends="clean,compile.library,compile.webapps"
- description="Clean and build library and web applications"/>
+ </path>
+
+
+ <!-- ========== 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 securityfilter library
+ -->
+ <target name="prepare.library" depends="init">
+ <mkdir dir="${build.home}/library/classes/META-INF"/>
+ <copy file="LICENSE"
+ tofile="${build.home}/library/classes/META-INF/LICENSE"/>
+ <copy todir="${build.home}/library/classes/org/securityfilter/resources">
+ <fileset dir="${conf.share.dir}" includes="**/*.dtd"/>
+ </copy>
+ <copy file="${commons-beanutils.jar}"
+ tofile="${build.home}/library/commons-beanutils.jar"/>
+ <copy file="${commons-collections.jar}"
+ tofile="${build.home}/library/commons-collections.jar"/>
+ <copy file="${commons-digester.jar}"
+ tofile="${build.home}/library/commons-digester.jar"/>
+ <copy file="${commons-logging.jar}"
+ tofile="${build.home}/library/commons-logging.jar"/>
+ <copy file="${jakarta-oro.jar}"
+ tofile="${build.home}/library/jakarta-oro.jar"/>
+
+ <!-- catalina.jar file is needed for realm classes -->
+ <copy file="${catalina.jar}"
+ tofile="${build.home}/library/catalina.jar"/>
+
+ <!-- extract Base64 class from the catalina.jar file -->
+ <jar destfile="${build.home}/library/catalina-base64.jar">
+ <zipfileset src="${catalina.jar}">
+ <patternset>
+ <include name="org/apache/catalina/util/Base64.class"/>
+ </patternset>
+ </zipfileset>
+ </jar>
+ </target>
+
+ <!--
+ Prepare static directories for web applications
+ -->
+ <target name="static.webapps">
+ <ant antfile="build-webapps.xml" target="static"/>
+ </target>
+
+ <!--
+ Compile core securityfilter library directory components
+ -->
+ <target name="compile.library" depends="prepare.library"
+ description="Compile Security Filter library files">
+ <!-- securityfilter core -->
+ <javac srcdir="${src.share.dir}"
+ destdir="${build.home}/library/classes"
+ debug="${compile.debug}"
+ optimize="${compile.optimize}"
+ deprecation="${compile.deprecation}">
+ <classpath refid="compile.classpath"/>
+ </javac>
+ <!-- catalina adapter realm -->
+ <javac srcdir="${src.catalina.dir}"
+ destdir="${build.home}/library/classes"
+ debug="${compile.debug}"
+ optimize="${compile.optimize}"
+ deprecation="${compile.deprecation}">
+ <classpath refid="compile.classpath"/>
+ </javac>
+ <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"
+ description="Compile Struts web applications">
+ <ant antfile="build-webapps.xml" target="compile"/>
+ </target>
+
+ <!--
+ Create Javadoc documentation
+ -->
+ <target name="compile.javadoc"
+ description="Generate JavaDoc API docs">
+ <delete dir="${build.home}/documentation/api"/>
+ <mkdir dir="${build.home}/documentation/api"/>
+ <javadoc
+ destdir="${build.home}/documentation/api"
+ classpath="${servlet.jar}"
+ packagenames="org.securityfilter.*"
+ author="true"
+ private="true"
+ version="true"
+ windowtitle="Security Filter API Documentation"
+ doctitle="<h1>Security Filter (Version ${project.version})</h1>"
+ bottom="Copyright © 2002 - SecurityFilter.org">
+ <sourcepath>
+ <pathelement location="${src.share.dir}"/>
+ <pathelement location="${src.catalina.dir}"/>
+ </sourcepath>
+ <classpath refid="compile.classpath"/>
+ </javadoc>
+ </target>
+
+ <!--
+ Create directories and copy files for distribution
+ -->
+ <target name="prepare.dist" depends="init">
+ <mkdir dir="${dist.home}"/>
+ <mkdir dir="${dist.home}/lib"/>
+ <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="*.jar"/>
+ </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 file="LICENSE" tofile="${dist.home}/LICENSE"/>
+ <copy file="README" tofile="${dist.home}/README"/>
+ <copy file="INSTALL" tofile="${dist.home}/INSTALL"/>
+ <copy file="HISTORY" tofile="${dist.home}/HISTORY"/>
+ </target>
+
+ <!--
+ Construct complete binary distribution
+ -->
+ <target name="dist" depends="dist.library,dist.webapps,dist.source"
+ description="Construct binary distribution"/>
+
+ <!--
+ Construct complete release distributions
+ -->
+ <target name="release" depends="clean,dist"
+ description="Construct release distribution">
+ <mkdir dir="${stage.bin.dir}/${upload.file.base}"/>
+ <mkdir dir="${stage.src.dir}/${upload.file.base}-src"/>
+ <copy todir="${stage.bin.dir}/${upload.file.base}">
+ <fileset dir="${dist.home}"/>
+ </copy>
+ <copy todir="${stage.src.dir}/${upload.file.base}-src">
+ <fileset dir=".">
+ <exclude name="build.properties"/>
+ <exclude name="target/**"/>
+ <exclude name="dist/**"/>
+ <exclude name="release/**"/>
+ <exclude name="*.ipr"/>
+ <exclude name=".output/**"/>
+ </fileset>
+ </copy>
+ <mkdir dir="${upload.dir}"/>
+ <zip zipfile="${upload.dir}/${upload.file.base}.zip"
+ basedir="${stage.bin.dir}"/>
+ <zip zipfile="${upload.dir}/${upload.file.base}-src.zip"
+ basedir="${stage.src.dir}"/>
+ <tar tarfile="${upload.dir}/${upload.file.base}.tar"
+ basedir="${stage.bin.dir}"
+ longfile="gnu"/>
+ <tar tarfile="${upload.dir}/${upload.file.base}-src.tar"
+ basedir="${stage.src.dir}"
+ longfile="gnu"/>
+ <gzip src="${upload.dir}/${upload.file.base}.tar"
+ zipfile="${upload.dir}/${upload.file.base}.tar.gz"/>
+ <gzip src="${upload.dir}/${upload.file.base}-src.tar"
+ zipfile="${upload.dir}/${upload.file.base}-src.tar.gz"/>
+ </target>
+
+
+ <!--
+ Clean up build and distribution directories
+ -->
+ <target name="clean"
+ description="Clean build and distribution directories">
+ <delete dir="${build.home}"/>
+ <delete dir="${dist.home}"/>
+ <delete dir="${release.home}"/>
+ </target>
+
+ <!--
+ All-in-one build target
+ -->
+ <target name="all" depends="clean,compile.library,compile.webapps"
+ description="Clean and build library and web applications"/>
</project>