martinc 2004/11/21 17:59:50 Modified: chain build.xml Log: Regenerate Ant build file to pick up changes to project.xml. Revision Changes Path 1.9 +164 -381 jakarta-commons/chain/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-commons/chain/build.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- build.xml 25 Feb 2004 00:01:07 -0000 1.8 +++ build.xml 22 Nov 2004 01:59:50 -0000 1.9 @@ -1,395 +1,178 @@ -<!-- - Copyright 2003-2004 The Apache Software Foundation +<?xml version="1.0" encoding="UTF-8"?> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +<!--build.xml generated by maven from project.xml version 1.0-dev + on date November 21 2004, time 1758--> - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<project name="Chain Of Responsibility Pattern" default="compile" basedir="."> - - -<!-- - "Chain of Responsibility" component of the Jakarta Commons Subproject - $Id$ ---> - - -<!-- ========== Initialize Properties ===================================== --> - - - <property file="build.properties"/> <!-- Component local --> - <property file="../build.properties"/> <!-- Commons local --> - <property file="${user.home}/build.properties"/> <!-- User local --> - - -<!-- ========== External Dependencies ===================================== --> - - - <!-- The directory containing your binary distribution of JUnit, - version 3.8.1 or later --> - <property name="junit.home" value="/usr/local/junit3.8.1"/> - - <!-- (OPTIONAL) The directory containing your JavaServer Faces API JAR file --> - <property name="jsf-api.home" value="${user.home}/jwsdp-1.2/jsf/lib"/> - - <!-- (OPTIONAL) The directory containing your Portlet API JAR file --> - <property name="portlet-api.home" value="../../jakarta-jetspeed-2/portlet-api"/> - - <!-- (OPTIONAL) The directory containing your Servlet API JAR file --> - <property name="servlet-api.home" value="lib"/> - - -<!-- ========== Derived Values ============================================ --> - - - <!-- The pathname of the "junit.jar" JAR file --> - <property name="junit.jar" value="${junit.home}/junit.jar"/> - - <!-- (OPTIONAL) The pathname of the JavaServer Faces API JAR file --> - <property name="jsf-api.jar" value="${jsf-api.home}/jsf-api.jar"/> - - <!-- (OPTIONAL) The pathname of the Portlet API JAR file --> - <property name="portlet-api.jar" value="${portlet-api.home}/target/portlet-api-0.6.6.jar"/> - - <!-- (OPTIONAL) The pathname of the Servlet API JAR file --> - <property name="servlet-api.jar" value="${servlet-api.home}/servlet.jar"/> - - -<!-- ========== Component Declarations ==================================== --> - - - <!-- The name of this component --> - <property name="component.name" value="chain"/> - - <!-- The primary package name of this component --> - <property name="component.package" value="org.apache.commons.chain"/> - - <!-- The title of this component --> - <property name="component.title" value="Chain Of Responsibility Pattern"/> - - <!-- The current version number of this component --> - <property name="component.version" value="0.1-dev"/> - - <!-- The base directory for compilation targets --> - <property name="build.home" value="target"/> - - <!-- The base directory for component configuration files --> - <property name="conf.home" value="src/conf"/> - - <!-- The base directory for distribution targets --> - <property name="dist.home" value="dist"/> - - <!-- The base directory for component sources --> - <property name="source.home" value="src/java"/> - - <!-- The base directory for unit test sources --> - <property name="test.home" value="src/test"/> - - -<!-- ========== Compiler Defaults ========================================= --> - - - <!-- 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"/> - - <!-- Construct compile classpath --> - <path id="compile.classpath"> - <pathelement location="${build.home}/classes"/> - <pathelement location="${commons-beanutils.jar}"/> - <pathelement location="${commons-collections.jar}"/> - <pathelement location="${commons-digester.jar}"/> - <pathelement location="${commons-logging.jar}"/> - <pathelement location="${jsf-api.jar}"/> - <pathelement location="${portlet-api.jar}"/> - <pathelement location="${servlet-api.jar}"/> +<project default="jar" name="commons-chain" basedir="."> + <property name="defaulttargetdir" value="target"> + </property> + <property name="libdir" value="target/lib"> + </property> + <property name="classesdir" value="target/classes"> + </property> + <property name="testclassesdir" value="target/test-classes"> + </property> + <property name="testclassesdir" value="target/test-classes"> + </property> + <property name="testreportdir" value="target/test-reports"> + </property> + <property name="distdir" value="dist"> + </property> + <property name="javadocdir" value="dist/docs/api"> + </property> + <property name="final.name" value="commons-chain-1.0-dev"> + </property> + <path id="build.classpath"> + <fileset dir="${libdir}"> + <include name="**/*.jar"> + </include> + </fileset> </path> - - -<!-- ========== Test Execution Defaults =================================== --> - - - <!-- Construct unit test classpath --> - <path id="test.classpath"> - <pathelement location="${build.home}/classes"/> - <pathelement location="${build.home}/tests"/> - <pathelement location="${commons-beanutils.jar}"/> - <pathelement location="${commons-collections.jar}"/> - <pathelement location="${commons-digester.jar}"/> - <pathelement location="${commons-logging.jar}"/> - <pathelement location="${jsf-api.jar}"/> - <pathelement location="${junit.jar}"/> - <pathelement location="${portlet-api.jar}"/> - <pathelement location="${servlet-api.jar}"/> - </path> - - <!-- Should all tests fail if one does? --> - <property name="test.failonerror" value="true"/> - - <!-- The test runner to execute --> - <property name="test.runner" value="junit.textui.TestRunner"/> - - -<!-- ========== Executable Targets ======================================== --> - - - <target name="flags"> - <available property="beanutils.present" - file="${commons-beanutils.jar}"/> - <available property="collections.present" - file="${commons-collections.jar}"/> - <available property="digester.present" file="${commons-digester.jar}"/> - <available property="faces.present" file="${jsf-api.jar}"/> - <available property="logging.present" file="${commons-logging.jar}"/> - <available property="portlet.present" file="${portlet-api.jar}"/> - <available property="servlet.present" file="${servlet-api.jar}"/> - <available property="servlet23.present" classpathref="compile.classpath" - classname="javax.servlet.ServletContextListener"/> - </target> - - - <target name="init" depends="flags" - description="Initialize and evaluate conditionals"> - <echo message="-------- ${component.name} ${component.version} --------"/> - <echo message="beanutils.present = ${beanutils.present}"/> - <echo message="collections.present = ${collections.present}"/> - <echo message="digester.present = ${digester.present}"/> - <echo message="faces.present = ${faces.present}"/> - <echo message="logging.present = ${logging.present}"/> - <echo message="portlet.present = ${portlet.present}"/> - <echo message="servlet.present = ${servlet.present}"/> - <echo message="servlet23.present = ${servlet23.present}"/> - <filter token="name" value="${component.name}"/> - <filter token="package" value="${component.package}"/> - <filter token="version" value="${component.version}"/> - </target> - - - <target name="prepare" depends="init" - description="Prepare build directory"> - <mkdir dir="${build.home}"/> - <mkdir dir="${build.home}/classes"/> - <mkdir dir="${build.home}/conf"/> - <mkdir dir="${build.home}/tests"/> - </target> - - - <target name="static" depends="prepare" - description="Copy static files to build directory"> - <tstamp/> - <copy todir="${build.home}/conf" filtering="on"> - <fileset dir="${conf.home}" includes="*.MF"/> - </copy> - </target> - - - <target name="compile" depends="static" - description="Compile shareable components"> - <javac srcdir="${source.home}" - destdir="${build.home}/classes" - debug="${compile.debug}" - deprecation="${compile.deprecation}" - optimize="${compile.optimize}"> - <classpath refid="compile.classpath"/> - <exclude name="org/apache/commons/chain/config/*.java" - unless="beanutils.present"/> - <exclude name="org/apache/commons/chain/config/*.java" - unless="collections.present"/> - <exclude name="org/apache/commons/chain/config/*.java" - unless="digester.present"/> - <exclude name="org/apache/commons/chain/web/ChainListener.java" - unless="beanutils.present"/> - <exclude name="org/apache/commons/chain/web/ChainListener.java" - unless="collections.present"/> - <exclude name="org/apache/commons/chain/web/ChainListener.java" - unless="digester.present"/> - <exclude name="org/apache/commons/chain/web/ChainListener.java" - unless="logging.present"/> - <exclude name="org/apache/commons/chain/web/ChainListener.java" - unless="servlet23.present"/> - <exclude name="org/apache/commons/chain/web/ChainResources.java" - unless="beanutils.present"/> - <exclude name="org/apache/commons/chain/web/ChainResources.java" - unless="collections.present"/> - <exclude name="org/apache/commons/chain/web/ChainResources.java" - unless="digester.present"/> - <exclude name="org/apache/commons/chain/web/ChainResources.java" - unless="logging.present"/> - <exclude name="org/apache/commons/chain/web/ChainResources.java" - unless="servlet23.present"/> - <exclude name="org/apache/commons/chain/web/ChainServlet.java" - unless="beanutils.present"/> - <exclude name="org/apache/commons/chain/web/ChainServlet.java" - unless="collections.present"/> - <exclude name="org/apache/commons/chain/web/ChainServlet.java" - unless="digester.present"/> - <exclude name="org/apache/commons/chain/web/ChainServlet.java" - unless="servlet.present"/> - <exclude name="org/apache/commons/chain/web/ChainServlet.java" - unless="logging.present"/> - <exclude name="org/apache/commons/chain/web/faces/*.java" - unless="faces.present"/> - <exclude name="org/apache/commons/chain/web/portlet/*.java" - unless="portlet.present"/> - <exclude name="org/apache/commons/chain/web/servlet/*.java" - unless="servlet.present"/> + <target name="init" description="o Initializes some properties"> + <mkdir dir="${libdir}"> + </mkdir> + <condition property="noget"> + <equals arg2="only" arg1="${build.sysclasspath}"> + </equals> + </condition> + <!--Test if JUNIT is present in ANT classpath--> + + <available property="Junit.present" classname="junit.framework.Test"> + </available> + </target> + <target name="compile" description="o Compile the code" depends="get-deps"> + <mkdir dir="${classesdir}"> + </mkdir> + <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html"> + <src> + <pathelement location="src/java"> + </pathelement> + </src> + <classpath refid="build.classpath"> + </classpath> </javac> - <copy todir="${build.home}/classes" filtering="on"> - <fileset dir="${source.home}" excludes="**/*.java"/> - </copy> - </target> - - - <target name="compile.tests" depends="compile" - description="Compile unit test cases"> - <javac srcdir="${test.home}" - destdir="${build.home}/tests" - debug="${compile.debug}" - deprecation="${compile.deprecation}" - optimize="${compile.optimize}"> - <classpath refid="test.classpath"/> - <exclude name="org/apache/commons/chain/web/*Faces*.java" - unless="faces.present"/> - <exclude name="org/apache/commons/chain/web/*Portlet*.java" - unless="portlet.present"/> - <exclude name="org/apache/commons/chain/web/*Http*.java" - unless="servlet.present"/> - <exclude name="org/apache/commons/chain/web/*Servlet*.java" - unless="servlet.present"/> - <exclude name="org/apache/commons/chain/config/*.java" - unless="beanutils.present"/> - <exclude name="org/apache/commons/chain/config/*.java" - unless="collections.present"/> - <exclude name="org/apache/commons/chain/config/*.java" - unless="digester.present"/> - </javac> - <copy todir="${build.home}/tests" filtering="on"> - <fileset dir="${test.home}" excludes="**/*.java"/> - </copy> - </target> - - - <target name="clean" - description="Clean build and distribution directories"> - <delete dir="${build.home}"/> - <delete dir="${dist.home}"/> - </target> - - - <target name="all" depends="clean,compile" - description="Clean and compile all components"/> - - - <target name="javadoc" depends="compile" - description="Create component Javadoc documentation"> - <mkdir dir="${dist.home}"/> - <mkdir dir="${dist.home}/docs"/> - <mkdir dir="${dist.home}/docs/api"/> - <javadoc sourcepath="${source.home}" - destdir="${dist.home}/docs/api" - packagenames="org.apache.commons.*" - author="true" - package="true" - version="true" - overview="src/java/overview.html" - doctitle="<h1>${component.title} (Version ${component.version})</h1>" - windowtitle="${component.title} (Version ${component.version})" - bottom="Copyright (c) 2001-2003 - Apache Software Foundation"> - <classpath refid="compile.classpath"/> - </javadoc> - </target> - - - <target name="dist" depends="javadoc" - description="Create binary distribution"> - <mkdir dir="${dist.home}"/> - <copy file="build.properties.sample" - todir="${dist.home}"/> - <copy file="build.xml" - todir="${dist.home}"/> - <copy file="LICENSE.txt" - todir="${dist.home}"/> - <copy file="RELEASE-NOTES.txt" - todir="${dist.home}"/> - <mkdir dir="${build.home}/classes/META-INF"/> - <copy file="LICENSE.txt" - tofile="${build.home}/classes/META-INF/LICENSE.txt"/> - <jar jarfile="${dist.home}/commons-${component.name}.jar" - basedir="${build.home}/classes" - manifest="${build.home}/conf/MANIFEST.MF"/> - <mkdir dir="${dist.home}/src"/> - <copy todir="${dist.home}/src"> - <fileset dir="src" excludes="**CVS**"/> + <copy todir="${classesdir}"> + <fileset dir="src/test"> + <include name="**/*.xml"> + </include> + </fileset> </copy> </target> - - - <target name="install-jar" depends="dist" - description="Installs jar file in ${lib.repo}"> - <copy todir="${lib.repo}" filtering="no"> - <fileset dir="${dist.home}"> - <include name="commons-${component.name}.jar"/> + <target name="jar" description="o Create the jar" depends="compile,test"> + <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}"> + </jar> + </target> + <target name="clean" description="o Clean up the generated directories"> + <delete dir="${defaulttargetdir}"> + </delete> + <delete dir="${distdir}"> + </delete> + </target> + <target name="dist" description="o Create a distribution" depends="jar, javadoc"> + <mkdir dir="dist"> + </mkdir> + <copy todir="dist"> + <fileset dir="${defaulttargetdir}" includes="*.jar"> + </fileset> + <fileset dir="${basedir}" includes="LICENSE*, README*"> </fileset> </copy> </target> - - -<!-- ========== Unit Test Targets ========================================= --> - - - <target name="test" depends="compile.tests" - description="Run all unit test cases"> - - <junit printsummary="yes" fork="no" - haltonfailure="yes" haltonerror="yes"> - - <classpath refid="test.classpath"/> - <formatter type="plain" usefile="false"/> - - <!-- org.apache.commons.chain.config tests --> - <batchtest> - <fileset dir="${build.home}/tests" - includes="org/apache/commons/chain/config/*TestCase.class"> - <exclude name="org/apache/commons/chain/config/*.class" - unless="digester.present"/> + <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test"> + <fail message="There were test failures."> + </fail> + </target> + <target name="internal-test" if="Junit.present" depends="junit-present,compile-tests"> + <mkdir dir="${testreportdir}"> + </mkdir> + <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true"> + <sysproperty key="basedir" value="."> + </sysproperty> + <formatter type="xml"> + </formatter> + <formatter usefile="false" type="plain"> + </formatter> + <classpath> + <path refid="build.classpath"> + </path> + <pathelement path="${testclassesdir}"> + </pathelement> + <pathelement path="${classesdir}"> + </pathelement> + </classpath> + <batchtest todir="${testreportdir}"> + <fileset dir="src/test"> + <include name="**/*TestCase.java"> + </include> </fileset> </batchtest> - - <!-- org.apache.commons.chain.impl tests --> - <batchtest> - <fileset dir="${build.home}/tests" - includes="org/apache/commons/chain/impl/*TestCase.class"/> - </batchtest> - - <!-- org.apache.commons.chain.web tests --> - <batchtest> - <fileset dir="${build.home}/tests" - includes="org/apache/commons/chain/web/**/*TestCase.class"> - <exclude name="org/apache/commons/chain/web/faces/*.class" - unless="faces.present"/> - <exclude name="org/apache/commons/chain/web/portlet/*.class" - unless="portlet.present"/> - <exclude name="org/apache/commons/chain/web/servlet/*.class" - unless="servlet.present"/> - </fileset> - </batchtest> - </junit> - </target> + <target name="junit-present" unless="Junit.present" depends="init"> + <echo>================================= WARNING ================================</echo> + <echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo> + <echo>==========================================================================</echo> + </target> + <target name="compile-tests" if="Junit.present" depends="junit-present,compile"> + <mkdir dir="${testclassesdir}"> + </mkdir> + <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html"> + <src> + <pathelement location="src/test"> + </pathelement> + </src> + <classpath> + <path refid="build.classpath"> + </path> + <pathelement path="${classesdir}"> + </pathelement> + </classpath> + </javac> + </target> + <target name="javadoc" description="o Generate javadoc" depends="get-deps"> + <mkdir dir="${javadocdir}"> + </mkdir> + <tstamp> + <format pattern="2003-yyyy" property="year"> + </format> + </tstamp> + <property name="copyright" value="Copyright &copy; The Apache Software Foundation. All Rights Reserved."> + </property> + <property name="title" value="Commons Chain 1.0-dev API"> + </property> + <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/java" packagenames="org.apache.commons.chain.*"> + <classpath> + <path refid="build.classpath"> + </path> + </classpath> + </javadoc> + </target> + <target name="get-deps" unless="noget" depends="init"> + <!--Proxy settings works only with a JDK 1.2 and higher.--> - -</project> + <setproxy> + </setproxy> + <get dest="${libdir}/servletapi-2.3.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/servletapi/jars/servletapi-2.3.jar"> + </get> + <get dest="${libdir}/portlet-api-1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/portlet-api/jars/portlet-api-1.0.jar"> + </get> + <get dest="${libdir}/jsf-api-1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/jsf/jars/jsf-api-1.0.jar"> + </get> + <get dest="${libdir}/jsf-impl-1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/jsf/jars/jsf-impl-1.0.jar"> + </get> + <get dest="${libdir}/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar"> + </get> + <get dest="${libdir}/commons-beanutils-1.7.0.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-beanutils/jars/commons-beanutils-1.7.0.jar"> + </get> + <get dest="${libdir}/commons-digester-1.6.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-digester/jars/commons-digester-1.6.jar"> + </get> + <get dest="${libdir}/commons-logging-1.0.3.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.3.jar"> + </get> + </target> + <target name="install-maven"> + <get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar"> + </get> + <unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar"> + </unjar> + </target> +</project> \ No newline at end of file
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
