cmlenz 2003/06/30 08:33:12
Modified: framework build.xml
Log:
Migrate to a more compact XML layout with two spaces indentation instead of four
Revision Changes Path
1.63 +473 -489 jakarta-cactus/framework/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/build.xml,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- build.xml 29 Jun 2003 11:12:50 -0000 1.62
+++ build.xml 30 Jun 2003 15:33:12 -0000 1.63
@@ -36,507 +36,491 @@
-->
<project name="Cactus Framework" default="dist" basedir="..">
- <description>
+ <description>
Cactus Framework
---------------------------------------------------------
Contains the core classes of the Cactus in-container
testing framework.
- </description>
+ </description>
- <!-- Base directory for all file related operations -->
- <property name="base.dir" location="framework"/>
+ <!-- Base directory for all file related operations -->
+ <property name="base.dir" location="framework"/>
- <!-- Indicate that this subproject is dependant on the version of the J2EE
- API available -->
- <property name="j2ee.dependant" value="true"/>
-
- <!-- Include properties and targets common to the different subprojects -->
- &common;
-
- <!-- Global project properties -->
- <property name="project.name.text" value="Cactus Framework"/>
- <property name="project.name.file" value="cactus-framework"/>
-
- <!--
- ========================================================================
- Initialize source, target and dist properties
- ========================================================================
- -->
- <target name="properties">
-
- <!-- Set the properties related to the source tree -->
- <property name="src.dir" location="${base.dir}/src"/>
- <property name="src.java.dir" location="${src.dir}/java"/>
- <property name="src.java.share.dir" location="${src.java.dir}/share"/>
- <property name="src.java.specific.dir"
- location="${src.java.dir}/j2ee${j2ee.api}"/>
- <property name="src.test.dir" location="${src.dir}/test"/>
- <property name="src.test.share.dir" location="${src.test.dir}/share"/>
- <property name="build.dir" location="${base.dir}/."/>
- <property name="conf.dir" location="${base.dir}/conf"/>
- <property name="web.dir" location="${base.dir}/web"/>
-
- <!-- Set the properties related to the target area -->
- <property name="target.src.dir" location="${target.dir}/src"/>
- <property name="target.classes.dir" location="${target.dir}/classes"/>
- <property name="target.classes.java.dir"
- location="${target.classes.dir}/java"/>
- <property name="target.classes.clover.dir"
- location="${target.classes.dir}/clover"/>
- <property name="target.classes.test.dir"
- location="${target.classes.dir}/test"/>
- <property name="target.doc.dir" location="${target.dir}/doc"/>
- <property name="target.doc.api.dir" location="${target.doc.dir}/api"/>
-
- </target>
-
- <!--
- ========================================================================
- Initialize AspectJ
- ========================================================================
- -->
- <target name="init.aspectj">
-
- <!-- Define the AspectJ tasks -->
- <taskdef name="ajc" classname="org.aspectj.tools.ant.taskdefs.Ajc">
- <classpath>
- <pathelement location="${aspectj-tools.jar}"/>
- <pathelement location="${aspectj-ant.jar}"/>
- </classpath>
- </taskdef>
-
- </target>
-
- <!--
- ========================================================================
- Initialize the build. Must be called by all targets
- ========================================================================
- -->
- <target name="init"
- depends="init.common, properties, init.aspectj, init.clover">
-
- <echo>Dependencies:</echo>
- <echo> aspectjrt.jar = [${aspectjrt.jar}]</echo>
- <echo> commons.httpclient.jar = [${commons.httpclient.jar}]</echo>
- <echo> commons.logging.jar = [${commons.logging.jar}]</echo>
- <echo> httpunit.jar = [${httpunit.jar}]</echo>
- <echo> j2ee.jar = [${j2ee.jar}]</echo>
- <echo> junit.jar = [${junit.jar}]</echo>
- <echo> xmlapis.jar (optional) = [${xmlapis.jar}]</echo>
- <echo/>
- <echo>Options:</echo>
- <echo> clover.enable = ${clover.enable}</echo>
-
- <path id="project.classpath">
- <pathelement location="${aspectjrt.jar}"/>
- <pathelement location="${commons.logging.jar}"/>
- <pathelement location="${commons.httpclient.jar}"/>
- <pathelement location="${httpunit.jar}"/>
- <pathelement location="${j2ee.jar}"/>
- <pathelement location="${junit.jar}"/>
- <pathelement location="${xmlapis.jar}"/>
- </path>
-
- <condition property="properties.ok">
- <and>
- <available file="${aspectjrt.jar}"/>
- <available file="${commons.httpclient.jar}"/>
- <available file="${commons.logging.jar}"/>
- <available file="${httpunit.jar}"/>
- <available file="${j2ee.jar}"/>
- <available file="${junit.jar}"/>
- <!-- Check for a TraX class instead of the xmlapis.jar file so that
- the build works on JDK 1.4 without needing to define the
- xmlapis.jar property -->
- <available classname="javax.xml.transform.Transformer"
- classpathref="project.classpath"/>
- </and>
- </condition>
+ <!-- Indicate that this subproject is dependant on the version of the J2EE
+ API available -->
+ <property name="j2ee.dependant" value="true"/>
+
+ <!-- Include properties and targets common to the different subprojects -->
+ &common;
+
+ <!-- Global project properties -->
+ <property name="project.name.text" value="Cactus Framework"/>
+ <property name="project.name.file" value="cactus-framework"/>
+
+ <!--
+ ========================================================================
+ Initialize source, target and dist properties
+ ========================================================================
+ -->
+ <target name="properties">
+
+ <!-- Set the properties related to the source tree -->
+ <property name="src.dir" location="${base.dir}/src"/>
+ <property name="src.java.dir" location="${src.dir}/java"/>
+ <property name="src.java.share.dir" location="${src.java.dir}/share"/>
+ <property name="src.java.specific.dir"
+ location="${src.java.dir}/j2ee${j2ee.api}"/>
+ <property name="src.test.dir" location="${src.dir}/test"/>
+ <property name="src.test.share.dir" location="${src.test.dir}/share"/>
+ <property name="build.dir" location="${base.dir}/."/>
+ <property name="conf.dir" location="${base.dir}/conf"/>
+ <property name="web.dir" location="${base.dir}/web"/>
+
+ <!-- Set the properties related to the target area -->
+ <property name="target.src.dir" location="${target.dir}/src"/>
+ <property name="target.classes.dir" location="${target.dir}/classes"/>
+ <property name="target.classes.java.dir"
+ location="${target.classes.dir}/java"/>
+ <property name="target.classes.clover.dir"
+ location="${target.classes.dir}/clover"/>
+ <property name="target.classes.test.dir"
+ location="${target.classes.dir}/test"/>
+ <property name="target.doc.dir" location="${target.dir}/doc"/>
+ <property name="target.doc.api.dir" location="${target.doc.dir}/api"/>
+
+ </target>
+
+ <!--
+ ========================================================================
+ Initialize AspectJ
+ ========================================================================
+ -->
+ <target name="init.aspectj">
+
+ <!-- Define the AspectJ tasks -->
+ <taskdef name="ajc" classname="org.aspectj.tools.ant.taskdefs.Ajc">
+ <classpath>
+ <pathelement location="${aspectj-tools.jar}"/>
+ <pathelement location="${aspectj-ant.jar}"/>
+ </classpath>
+ </taskdef>
+
+ </target>
+
+ <!--
+ ========================================================================
+ Initialize the build. Must be called by all targets
+ ========================================================================
+ -->
+ <target name="init"
+ depends="init.common, properties, init.aspectj, init.clover">
+
+ <echo>Dependencies:</echo>
+ <echo> aspectjrt.jar = [${aspectjrt.jar}]</echo>
+ <echo> commons.httpclient.jar = [${commons.httpclient.jar}]</echo>
+ <echo> commons.logging.jar = [${commons.logging.jar}]</echo>
+ <echo> httpunit.jar = [${httpunit.jar}]</echo>
+ <echo> j2ee.jar = [${j2ee.jar}]</echo>
+ <echo> junit.jar = [${junit.jar}]</echo>
+ <echo> xmlapis.jar (optional) = [${xmlapis.jar}]</echo>
+ <echo/>
+ <echo>Options:</echo>
+ <echo> clover.enable = ${clover.enable}</echo>
+
+ <path id="project.classpath">
+ <pathelement location="${aspectjrt.jar}"/>
+ <pathelement location="${commons.logging.jar}"/>
+ <pathelement location="${commons.httpclient.jar}"/>
+ <pathelement location="${httpunit.jar}"/>
+ <pathelement location="${j2ee.jar}"/>
+ <pathelement location="${junit.jar}"/>
+ <pathelement location="${xmlapis.jar}"/>
+ </path>
+
+ <condition property="properties.ok">
+ <and>
+ <available file="${aspectjrt.jar}"/>
+ <available file="${commons.httpclient.jar}"/>
+ <available file="${commons.logging.jar}"/>
+ <available file="${httpunit.jar}"/>
+ <available file="${j2ee.jar}"/>
+ <available file="${junit.jar}"/>
+ <!-- Check for a TraX class instead of the xmlapis.jar file so that
+ the build works on JDK 1.4 without needing to define the
+ xmlapis.jar property -->
+ <available classname="javax.xml.transform.Transformer"
+ classpathref="project.classpath"/>
+ </and>
+ </condition>
- <fail unless="properties.ok">One or more required dependancies could not
+ <fail unless="properties.ok">One or more required dependancies could not
be resolved. Please check you build.properties file, and run Ant with the
-verbose option for more details</fail>
- </target>
+ </target>
- <!--
- ========================================================================
- Compiles the sources
- ========================================================================
- -->
- <target name="compile.prepare"
- depends="init">
-
- <!-- Copy the source files to resolve the project version in the
- Version.java source file -->
- <copy todir="${target.src.dir}" filtering="on">
- <fileset dir="${src.java.share.dir}"/>
- </copy>
-
- </target>
-
- <target name="compile.clover"
- depends="compile.prepare"
- if="clover.enable">
-
- <clover-setup initstring="${clover.initstring}" enabled="yes">
- <files>
- <exclude name="**/*Aspect.*"/>
- <exclude name="**/Test*.*"/>
- <exclude name="**/Mock*.*"/>
- <exclude name="**/AssertUtils.*"/>
- <exclude name="**/ClientCookie.*"/>
- </files>
- </clover-setup>
-
- <mkdir dir="${target.classes.clover.dir}"/>
-
- <javac destdir="${target.classes.clover.dir}"
- debug="${debug}" deprecation="${deprecation}"
- optimize="${optimize}">
- <src path="${target.src.dir}"/>
- <src path="${src.java.specific.dir}"/>
- <exclude name="**/package.html"/>
- <exclude name="**/overview.html"/>
- <classpath refid="project.classpath"/>
- </javac>
-
- <copy todir="${target.classes.clover.dir}/org/apache/cactus/server"
- file="${web.dir}/jspRedirector.jsp"/>
-
- <!-- Disable Clover for subsequent compilations -->
- <clover-setup initstring="${clover.initstring}" enabled="no"/>
-
- </target>
-
- <target name="compile.test" depends="compile.main">
-
- <mkdir dir="${target.classes.test.dir}"/>
-
- <javac destdir="${target.classes.test.dir}"
- debug="${debug}" deprecation="${deprecation}"
- optimize="${optimize}">
-
- <src path="${src.test.share.dir}"/>
-
- <classpath>
- <path path="${target.classes.java.dir}"/>
- <path refid="project.classpath"/>
- </classpath>
-
- </javac>
-
- </target>
-
- <target name="compile.main.prepare" depends="compile.prepare">
-
- <!-- Only recompile if source files have changed since the last time
- the main jar was created -->
- <condition property="compile.main.required">
- <not>
- <uptodate targetfile="${target.dir}/${cactus.jar.name}.jar">
- <srcfiles dir="${target.src.dir}"/>
- <srcfiles dir="${src.java.specific.dir}"/>
- </uptodate>
- </not>
- </condition>
-
- </target>
-
- <target name="compile.main" depends="init, compile.main.prepare"
- if="compile.main.required">
-
- <mkdir dir="${target.classes.java.dir}"/>
-
- <ajc destdir="${target.classes.java.dir}"
- debug="${debug}" deprecation="${deprecation}"
- optimize="${optimize}">
-
- <src path="${target.src.dir}"/>
- <src path="${src.java.specific.dir}"/>
-
- <exclude name="**/package.html"/>
- <exclude name="**/overview.html"/>
-
- <classpath refid="project.classpath"/>
- </ajc>
-
- <copy todir="${target.classes.java.dir}/org/apache/cactus/server"
- file="${web.dir}/jspRedirector.jsp"/>
-
- </target>
-
- <target name="compile" depends="compile.main,compile.test,compile.clover"
- description="Compile the sources"/>
-
- <!--
- ========================================================================
- Create the runtime jar file
- ========================================================================
- -->
- <target name="jar.clover" depends="compile.clover" if="clover.enable">
-
- <jar jarfile="${target.dir}/${cactus.clover.jar.name}.jar">
-
- <manifest>
- <section name="org/apache/cactus/">
- <attribute name="Specification-Title"
- value="${project.name.text} for ${j2ee.title}"/>
- <attribute name="Specification-Version"
- value="${project.version}"/>
- <attribute name="Specification-Vendor"
- value="Apache Software Foundation"/>
- <attribute name="Implementation-Title"
- value="${project.name.file}"/>
- <attribute name="Implementation-Version"
- value="${project.version} ${TODAY}"/>
- <attribute name="Implementation-Vendor"
- value="Apache Software Foundation"/>
- </section>
- </manifest>
-
- <metainf dir=".">
- <include name="LICENSE.cactus"/>
- </metainf>
- <fileset dir="${target.classes.clover.dir}"/>
- </jar>
-
- </target>
-
- <target name="jar.main"
- depends="compile.main">
-
- <jar jarfile="${target.dir}/${cactus.jar.name}.jar">
-
- <manifest>
- <section name="org/apache/cactus/">
- <attribute name="Specification-Title"
- value="${project.name.text} for ${j2ee.title}"/>
- <attribute name="Specification-Version"
- value="${project.version}"/>
- <attribute name="Specification-Vendor"
- value="Apache Software Foundation"/>
- <attribute name="Implementation-Title"
- value="${project.name.file}"/>
- <attribute name="Implementation-Version"
- value="${project.version} ${TODAY}"/>
- <attribute name="Implementation-Vendor"
- value="Apache Software Foundation"/>
- </section>
- </manifest>
-
- <metainf dir=".">
- <include name="LICENSE.cactus"/>
- </metainf>
- <fileset dir="${target.classes.java.dir}"/>
- </jar>
-
- </target>
-
- <target name="jar" depends="jar.main,jar.clover"
- description="Generate the library jar"/>
-
- <!--
- ========================================================================
- Generate the documentation (javadoc)
- ========================================================================
- -->
- <target name="doc.check" depends="init">
-
- <uptodate property="doc.uptodate"
- targetfile="${target.doc.api.dir}/index.html">
- <srcfiles dir="${src.java.share.dir}"
- includes="**/*.java, **/*.html"/>
- <srcfiles dir="${src.java.specific.dir}"
- includes="**/*.java, **/*.html"/>
- </uptodate>
-
- </target>
-
- <target name="doc" depends="doc.check" unless="doc.uptodate"
- description="Generates the API documentation">
-
- <mkdir dir="${target.doc.api.dir}"/>
-
- <!-- Ideally we should use Ajdoc. However, the generated output is not
- as nice as the javadoc output. In addition, ajdoc does not
- currently work with the JDK 1.4 (at least until Ajdoc 1.0.6). -->
- <javadoc
- packagenames="org.apache.cactus.*"
- destdir="${target.doc.api.dir}"
- author="true"
- protected="true"
- version="true"
- use="true"
- windowtitle="${project.name.text} ${project.doc.version}"
- doctitle="${project.name.text} ${project.doc.version}"
- overview="${src.java.share.dir}/overview.html"
- bottom="Copyright &copy; ${year} Apache Software Foundation.
- All Rights Reserved.">
-
- <group title="Public API">
- <package name="org.apache.cactus"/>
- <package name="org.apache.cactus.client.authentication"/>
- <package name="org.apache.cactus.extension.jsp"/>
- <package name="org.apache.cactus.server"/>
- </group>
- <group title="Internal API">
- <package name="org.apache.cactus.client"/>
- <package name="org.apache.cactus.client.connector.http"/>
- <package name="org.apache.cactus.client.initialization"/>
- <package name="org.apache.cactus.configuration"/>
- <package name="org.apache.cactus.extension.jetty"/>
- <package name="org.apache.cactus.server.runner"/>
- <package name="org.apache.cactus.util"/>
- </group>
-
- <sourcepath>
- <pathelement location="${src.java.share.dir}"/>
- <pathelement location="${src.java.specific.dir}"/>
- </sourcepath>
-
- <classpath refid="project.classpath"/>
-
- </javadoc>
-
- </target>
-
- <!--
- ========================================================================
- Run the full suite of unit tests.
- ========================================================================
- -->
- <target name="test.clover.prepare" depends="compile.test,compile.clover"
- if="clover.enable">
-
- <path id="test.class.path">
- <pathelement path="${target.classes.clover.dir}"/>
- <pathelement path="${target.classes.test.dir}"/>
- <pathelement location="${clover.jar}"/>
- <path refid="project.classpath"/>
- </path>
-
- </target>
-
- <target name="test.main.prepare" depends="compile.test"
- unless="clover.enable">
-
- <path id="test.class.path">
- <pathelement path="${target.classes.java.dir}"/>
- <pathelement path="${target.classes.test.dir}"/>
- <path refid="project.classpath"/>
- </path>
-
- </target>
-
- <target name="test" depends="test.clover.prepare,test.main.prepare"
- description="Run the unit tests">
-
- <junit printsummary="yes" haltonfailure="yes" fork="yes">
-
- <classpath>
- <path refid="test.class.path"/>
- </classpath>
-
- <formatter type="plain" usefile="false"/>
-
- <test name="org.apache.cactus.TestAll"/>
-
- </junit>
-
- </target>
-
- <!--
- ========================================================================
- Generate the distributable files
- ========================================================================
- -->
- <target name="dist.clover" depends="jar.clover" if="clover.enable">
-
- <copy todir="${dist.lib.dir}"
- file="${target.dir}/${cactus.clover.jar.name}.jar"/>
-
- </target>
-
- <target name="dist" depends="checkstyle,test,doc,jar.main,dist.clover"
- description="Generate the distributable files">
-
- <mkdir dir="${dist.lib.dir}"/>
- <mkdir dir="${dist.doc.api.dir}"/>
- <mkdir dir="${dist.web.dir}"/>
-
- <copy todir="${dist.lib.dir}"
- file="${target.dir}/${cactus.jar.name}.jar"/>
- <copy todir="${dist.doc.api.dir}">
- <fileset dir="${target.doc.api.dir}"/>
- </copy>
- <copy todir="${dist.web.dir}">
- <fileset dir="${web.dir}"/>
- </copy>
-
- </target>
-
- <!--
- ========================================================================
- Perform a code audit using CheckStyle. Only performs the audit if
- the checkstyle jar is in the Ant classpasth.
- ========================================================================
- -->
- <target name="checkstyle" depends="init,init.checkstyle"
- if="checkstyle.available"
- description="Perform a code audit using Checkstyle">
-
- <mkdir dir="${target.dir}"/>
-
- <checkstyle config="./checkstyle.xml"
- failOnViolation="true">
-
- <fileset dir="${src.java.dir}">
- <include name="**/*.java"/>
- <exclude name="**/*Aspect.*"/>
- </fileset>
- <fileset dir="${src.test.dir}">
- <include name="**/*.java"/>
- </fileset>
-
- <formatter type="plain"/>
- <formatter type="xml"
- toFile="${target.dir}/checkstyle_results.xml"/>
-
- <property key="checkstyle.header.file" file="./LICENSE.cactus"/>
-
- </checkstyle>
-
- </target>
-
- <!--
- ========================================================================
- Run the Clover Swing report
- ========================================================================
- -->
- <target name="clover.swing" depends="init" if="clover.enable">
-
- <java classname="com.cortexeb.tools.clover.reporters.jfc.Viewer"
- fork="yes">
- <arg path="${clover.initstring}"/>
- <classpath>
- <pathelement path="${clover.jar}"/>
- </classpath>
- </java>
-
- </target>
-
- <!--
- ========================================================================
- Clean generated files (including distributables)
- ========================================================================
- -->
- <target name="clean" depends="init.display,init.properties"
- description="Clean all generated files">
+ <!--
+ ========================================================================
+ Compiles the sources
+ ========================================================================
+ -->
+ <target name="compile.prepare"
+ depends="init">
+
+ <!-- Copy the source files to resolve the project version in the
+ Version.java source file -->
+ <copy todir="${target.src.dir}" filtering="on">
+ <fileset dir="${src.java.share.dir}"/>
+ </copy>
+
+ </target>
+
+ <target name="compile.clover"
+ depends="compile.prepare"
+ if="clover.enable">
+
+ <clover-setup initstring="${clover.initstring}" enabled="yes">
+ <files>
+ <exclude name="**/*Aspect.*"/>
+ <exclude name="**/Test*.*"/>
+ <exclude name="**/Mock*.*"/>
+ <exclude name="**/AssertUtils.*"/>
+ <exclude name="**/ClientCookie.*"/>
+ </files>
+ </clover-setup>
+
+ <mkdir dir="${target.classes.clover.dir}"/>
+
+ <javac destdir="${target.classes.clover.dir}"
+ debug="${debug}" deprecation="${deprecation}"
+ optimize="${optimize}">
+ <src path="${target.src.dir}"/>
+ <src path="${src.java.specific.dir}"/>
+ <exclude name="**/package.html"/>
+ <exclude name="**/overview.html"/>
+ <classpath refid="project.classpath"/>
+ </javac>
+
+ <copy todir="${target.classes.clover.dir}/org/apache/cactus/server"
+ file="${web.dir}/jspRedirector.jsp"/>
+
+ <!-- Disable Clover for subsequent compilations -->
+ <clover-setup initstring="${clover.initstring}" enabled="no"/>
+
+ </target>
+
+ <target name="compile.test" depends="compile.main">
+
+ <mkdir dir="${target.classes.test.dir}"/>
+
+ <javac destdir="${target.classes.test.dir}"
+ debug="${debug}" deprecation="${deprecation}"
+ optimize="${optimize}">
+ <src path="${src.test.share.dir}"/>
+ <classpath>
+ <path path="${target.classes.java.dir}"/>
+ <path refid="project.classpath"/>
+ </classpath>
+ </javac>
+
+ </target>
+
+ <target name="compile.main.prepare" depends="compile.prepare">
+
+ <!-- Only recompile if source files have changed since the last time
+ the main jar was created -->
+ <condition property="compile.main.required">
+ <not>
+ <uptodate targetfile="${target.dir}/${cactus.jar.name}.jar">
+ <srcfiles dir="${target.src.dir}"/>
+ <srcfiles dir="${src.java.specific.dir}"/>
+ </uptodate>
+ </not>
+ </condition>
+
+ </target>
+
+ <target name="compile.main" depends="init, compile.main.prepare"
+ if="compile.main.required">
+
+ <mkdir dir="${target.classes.java.dir}"/>
+
+ <ajc destdir="${target.classes.java.dir}"
+ debug="${debug}" deprecation="${deprecation}"
+ optimize="${optimize}">
+ <src path="${target.src.dir}"/>
+ <src path="${src.java.specific.dir}"/>
+ <exclude name="**/package.html"/>
+ <exclude name="**/overview.html"/>
+ <classpath refid="project.classpath"/>
+ </ajc>
+
+ <copy todir="${target.classes.java.dir}/org/apache/cactus/server"
+ file="${web.dir}/jspRedirector.jsp"/>
+
+ </target>
+
+ <target name="compile" depends="compile.main,compile.test,compile.clover"
+ description="Compile the sources"/>
+
+ <!--
+ ========================================================================
+ Create the runtime jar file
+ ========================================================================
+ -->
+ <target name="jar.clover" depends="compile.clover" if="clover.enable">
+
+ <jar jarfile="${target.dir}/${cactus.clover.jar.name}.jar">
+ <manifest>
+ <section name="org/apache/cactus/">
+ <attribute name="Specification-Title"
+ value="${project.name.text} for ${j2ee.title}"/>
+ <attribute name="Specification-Version"
+ value="${project.version}"/>
+ <attribute name="Specification-Vendor"
+ value="Apache Software Foundation"/>
+ <attribute name="Implementation-Title"
+ value="${project.name.file}"/>
+ <attribute name="Implementation-Version"
+ value="${project.version} ${TODAY}"/>
+ <attribute name="Implementation-Vendor"
+ value="Apache Software Foundation"/>
+ </section>
+ </manifest>
+ <metainf dir=".">
+ <include name="LICENSE.cactus"/>
+ </metainf>
+ <fileset dir="${target.classes.clover.dir}"/>
+ </jar>
+
+ </target>
+
+ <target name="jar.main"
+ depends="compile.main">
+
+ <jar jarfile="${target.dir}/${cactus.jar.name}.jar">
+
+ <manifest>
+ <section name="org/apache/cactus/">
+ <attribute name="Specification-Title"
+ value="${project.name.text} for ${j2ee.title}"/>
+ <attribute name="Specification-Version"
+ value="${project.version}"/>
+ <attribute name="Specification-Vendor"
+ value="Apache Software Foundation"/>
+ <attribute name="Implementation-Title"
+ value="${project.name.file}"/>
+ <attribute name="Implementation-Version"
+ value="${project.version} ${TODAY}"/>
+ <attribute name="Implementation-Vendor"
+ value="Apache Software Foundation"/>
+ </section>
+ </manifest>
+
+ <metainf dir=".">
+ <include name="LICENSE.cactus"/>
+ </metainf>
+ <fileset dir="${target.classes.java.dir}"/>
+ </jar>
+
+ </target>
+
+ <target name="jar" depends="jar.main,jar.clover"
+ description="Generate the library jar"/>
+
+ <!--
+ ========================================================================
+ Generate the documentation (javadoc)
+ ========================================================================
+ -->
+ <target name="doc.check" depends="init">
+
+ <uptodate property="doc.uptodate"
+ targetfile="${target.doc.api.dir}/index.html">
+ <srcfiles dir="${src.java.share.dir}"
+ includes="**/*.java, **/*.html"/>
+ <srcfiles dir="${src.java.specific.dir}"
+ includes="**/*.java, **/*.html"/>
+ </uptodate>
+
+ </target>
+
+ <target name="doc" depends="doc.check" unless="doc.uptodate"
+ description="Generates the API documentation">
+
+ <mkdir dir="${target.doc.api.dir}"/>
+
+ <!-- Ideally we should use Ajdoc. However, the generated output is not
+ as nice as the javadoc output. In addition, ajdoc does not
+ currently work with the JDK 1.4 (at least until Ajdoc 1.0.6). -->
+ <javadoc
+ packagenames="org.apache.cactus.*"
+ destdir="${target.doc.api.dir}"
+ author="true"
+ protected="true"
+ version="true"
+ use="true"
+ windowtitle="${project.name.text} ${project.doc.version}"
+ doctitle="${project.name.text} ${project.doc.version}"
+ overview="${src.java.share.dir}/overview.html"
+ bottom="Copyright &copy; ${year} Apache Software Foundation.
+ All Rights Reserved.">
+ <group title="Public API">
+ <package name="org.apache.cactus"/>
+ <package name="org.apache.cactus.client.authentication"/>
+ <package name="org.apache.cactus.extension.jsp"/>
+ <package name="org.apache.cactus.server"/>
+ </group>
+ <group title="Internal API">
+ <package name="org.apache.cactus.client"/>
+ <package name="org.apache.cactus.client.connector.http"/>
+ <package name="org.apache.cactus.client.initialization"/>
+ <package name="org.apache.cactus.configuration"/>
+ <package name="org.apache.cactus.extension.jetty"/>
+ <package name="org.apache.cactus.server.runner"/>
+ <package name="org.apache.cactus.util"/>
+ </group>
+ <sourcepath>
+ <pathelement location="${src.java.share.dir}"/>
+ <pathelement location="${src.java.specific.dir}"/>
+ </sourcepath>
+ <classpath refid="project.classpath"/>
+ </javadoc>
+
+ </target>
+
+ <!--
+ ========================================================================
+ Run the full suite of unit tests.
+ ========================================================================
+ -->
+ <target name="test.clover.prepare" depends="compile.test,compile.clover"
+ if="clover.enable">
+
+ <path id="test.class.path">
+ <pathelement path="${target.classes.clover.dir}"/>
+ <pathelement path="${target.classes.test.dir}"/>
+ <pathelement location="${clover.jar}"/>
+ <path refid="project.classpath"/>
+ </path>
+
+ </target>
+
+ <target name="test.main.prepare" depends="compile.test"
+ unless="clover.enable">
+
+ <path id="test.class.path">
+ <pathelement path="${target.classes.java.dir}"/>
+ <pathelement path="${target.classes.test.dir}"/>
+ <path refid="project.classpath"/>
+ </path>
+
+ </target>
+
+ <target name="test" depends="test.clover.prepare,test.main.prepare"
+ description="Run the unit tests">
+
+ <junit printsummary="yes" haltonfailure="yes" fork="yes">
+ <classpath>
+ <path refid="test.class.path"/>
+ </classpath>
+ <formatter type="plain" usefile="false"/>
+ <test name="org.apache.cactus.TestAll"/>
+ </junit>
+
+ </target>
+
+ <!--
+ ========================================================================
+ Generate the distributable files
+ ========================================================================
+ -->
+ <target name="dist.clover" depends="jar.clover" if="clover.enable">
+
+ <copy todir="${dist.lib.dir}"
+ file="${target.dir}/${cactus.clover.jar.name}.jar"/>
+
+ </target>
+
+ <target name="dist" depends="checkstyle,test,doc,jar.main,dist.clover"
+ description="Generate the distributable files">
+
+ <mkdir dir="${dist.lib.dir}"/>
+ <mkdir dir="${dist.doc.api.dir}"/>
+ <mkdir dir="${dist.web.dir}"/>
+
+ <copy todir="${dist.lib.dir}"
+ file="${target.dir}/${cactus.jar.name}.jar"/>
+ <copy todir="${dist.doc.api.dir}">
+ <fileset dir="${target.doc.api.dir}"/>
+ </copy>
+ <copy todir="${dist.web.dir}">
+ <fileset dir="${web.dir}"/>
+ </copy>
+
+ </target>
+
+ <!--
+ ========================================================================
+ Perform a code audit using CheckStyle. Only performs the audit if
+ the checkstyle jar is in the Ant classpasth.
+ ========================================================================
+ -->
+ <target name="checkstyle" depends="init,init.checkstyle"
+ if="checkstyle.available"
+ description="Perform a code audit using Checkstyle">
+
+ <mkdir dir="${target.dir}"/>
+
+ <checkstyle config="./checkstyle.xml"
+ failOnViolation="true">
+
+ <fileset dir="${src.java.dir}">
+ <include name="**/*.java"/>
+ <exclude name="**/*Aspect.*"/>
+ </fileset>
+ <fileset dir="${src.test.dir}">
+ <include name="**/*.java"/>
+ </fileset>
+
+ <formatter type="plain"/>
+ <formatter type="xml"
+ toFile="${target.dir}/checkstyle_results.xml"/>
+
+ <property key="checkstyle.header.file" file="./LICENSE.cactus"/>
+
+ </checkstyle>
+
+ </target>
+
+ <!--
+ ========================================================================
+ Run the Clover Swing report
+ ========================================================================
+ -->
+ <target name="clover.swing" depends="init" if="clover.enable">
+
+ <java classname="com.cortexeb.tools.clover.reporters.jfc.Viewer"
+ fork="yes">
+ <arg path="${clover.initstring}"/>
+ <classpath>
+ <pathelement path="${clover.jar}"/>
+ </classpath>
+ </java>
+
+ </target>
+
+ <!--
+ ========================================================================
+ Clean generated files (including distributables)
+ ========================================================================
+ -->
+ <target name="clean" depends="init.display,init.properties"
+ description="Clean all generated files">
- <delete dir="${target.dir}"/>
- <delete dir="${dist.dir}"/>
+ <delete dir="${target.dir}"/>
+ <delete dir="${dist.dir}"/>
- </target>
+ </target>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]