Author: craigmcc Date: Sat Sep 17 20:03:56 2005 New Revision: 289883 URL: http://svn.apache.org/viewcvs?rev=289883&view=rev Log: Restore use of "-enableassertions" without the "-D" option, since it actually does activate insertion generation.
Modified: struts/shale/trunk/core-library/build.xml Modified: struts/shale/trunk/core-library/build.xml URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/build.xml?rev=289883&r1=289882&r2=289883&view=diff ============================================================================== --- struts/shale/trunk/core-library/build.xml (original) +++ struts/shale/trunk/core-library/build.xml Sat Sep 17 20:03:56 2005 @@ -1,436 +1,436 @@ -<!-- - - Copyright 2004-2005 The Apache Software Foundation. - - 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 - - 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. - - $Id: build.xml 54942 2004-10-16 22:39:25Z craigmcc $ - ---> - - -<project name="Shale Core Library" default="library" basedir="."> - - - <!-- ===================== Initialize Property Values ==================== --> - - - <!-- Initialize property values --> - <property name="root.dir" value="${basedir}/.."/> - <property name="lib.dir" value="${root.dir}/lib"/> - <property file="build.properties"/> - <property file="../build.properties"/> - <property file="../default.properties"/> - <property file="${user.home}/build.properties"/> - - - <!-- Dependency home directory defaults --> - <property name="shale-test.home" value="${basedir}/../test-framework/dist"/> - <property name="webflow.home" value="/usr/local/spring-webflow-pr4"/> - - - <!-- Dependency library defaults --> - <property name="shale-test.jar" value="${shale-test.home}/lib/shale-test.jar"/> - - - <!-- Build Defaults --> - <property name="build.home" value="${basedir}/target"/> - <property name="dist.home" value="${basedir}/dist"/> - <property name="project.name" value="Shale Core Library"/> - <property name="project.package" value="org.apache.shale"/> - <property name="project.version" value="0.1-dev"/> - - - <!-- Findbugs Defaults --> - <property name="findbugs.outputFile" value="${basedir}/core-library-fb.html"/> - - - <!-- Unit Test Defaults --> - <property name="test.haltonerror" value="true"/> - <property name="test.haltonfailure" value="true"/> - <property name="test.runner" value="junit.textui.TestRunner"/> - - - <!-- Compile Classpath --> - <path id="compile.classpath"> - <pathelement location="${commons-beanutils.jar}"/> - <pathelement location="${commons-chain.jar}"/> - <!-- <pathelement location="${commons-collections.jar}"/> --> - <pathelement location="${commons-digester.jar}"/> -<!-- <pathelement location="${commons-fileupload.jar}"/> --> - <pathelement location="${commons-logging.jar}"/> - <pathelement location="${commons-validator.jar}"/> - <pathelement location="${jsf-api.jar}"/> - <pathelement location="${jsf-impl.jar}"/> - <pathelement location="${jsp-api.jar}"/> - <pathelement location="${servlet-api.jar}"/> - <pathelement location="${spring-beans.jar}"/> - <pathelement location="${spring-context.jar}"/> - <pathelement location="${spring-core.jar}"/> - <pathelement location="${spring-web.jar}"/> - <pathelement location="${spring-webflow.jar}"/> - <pathelement location="${build.home}/classes"/> - <pathelement location="${tiles.jar}"/> - </path> - - - <!-- Findbugs Classpath --> - <path id="findbugs.classpath"> - <pathelement location="${commons-beanutils.jar}"/> - <pathelement location="${commons-chain.jar}"/> - <!-- <pathelement location="${commons-collections.jar}"/> --> - <pathelement location="${commons-digester.jar}"/> - <pathelement location="${commons-logging.jar}"/> - <pathelement location="${findbugs.home}/lib/findbugs-ant.jar"/> - <pathelement location="${jsf-api.jar}"/> - <pathelement location="${jsp-api.jar}"/> - <pathelement location="${servlet-api.jar}"/> - <pathelement location="${spring-beans.jar}"/> - <pathelement location="${spring-context.jar}"/> - <pathelement location="${spring-core.jar}"/> - <pathelement location="${spring-web.jar}"/> - <pathelement location="${spring-webflow.jar}"/> - </path> - - - <!-- Test Classpath --> - <path id="test.classpath"> - <pathelement location="${commons-beanutils.jar}"/> - <pathelement location="${commons-chain.jar}"/> - <!-- <pathelement location="${commons-collections.jar}"/> --> - <pathelement location="${commons-digester.jar}"/> - <!-- <pathelement location="${commons-fileupload.jar}"/> --> - <pathelement location="${commons-logging.jar}"/> - <pathelement location="${commons-validator.jar}"/> - <pathelement location="${jsf-api.jar}"/> - <pathelement location="${jsp-api.jar}"/> - <pathelement location="${junit.jar}"/> - <pathelement location="${servlet-api.jar}"/> - <pathelement location="${shale-test.jar}"/> - <pathelement location="${spring-beans.jar}"/> - <pathelement location="${spring-context.jar}"/> - <pathelement location="${spring-core.jar}"/> - <pathelement location="${spring-web.jar}"/> - <pathelement location="${spring-webflow.jar}"/> - <pathelement location="${build.home}/classes"/> - <pathelement location="${build.home}/test-classes"/> - <pathelement location="${tiles.jar}"/> - </path> - - <!-- Conditional Processing Flags --> - <available property="jsfri.present" - classname="com.sun.faces.RIConstants" - classpath="${jsf-impl.jar}"/> - <available property="myfaces.present" - classname="org.apache.myfaces.config.MyfacesConfig" - classpath="${jsf-impl.jar}"/> - <available property="tiles.present" - classname="org.apache.tiles.servlets.TilesServlet" - classpathref="compile.classpath"/> - <condition property="spring.present"> - <and> - <available classname="org.springframework.core.Constants" - classpathref="compile.classpath"/> - <available classname="org.springframework.context.ApplicationContext" - classpathref="compile.classpath"/> - <available classname="org.springframework.web.jsf.DelegatingVariableResolver" - classpathref="compile.classpath"/> - </and> - </condition> - <available property="webflow.present" - classname="org.springframework.webflow.Flow" - classpath="${spring-webflow.jar}"/> - - - <!-- ==================== Maintenance Targets ============================ --> - - - <target name="clean" - description="Clean all build directories"> - <delete dir="${build.home}"/> - <delete dir="${dist.home}"/> - </target> - - - <target name="init"> - <echo message="---------- ${project.name} ${project.version} -----------"/> - <filter token="name" value="${project.name}"/> - <filter token="package" value="${project.package}"/> - <filter token="state" value="${systest.state.saving}"/> - <filter token="version" value="${project.version}"/> - <echo message="jsf-api.jar = ${jsf-api.jar}"/> - <echo message="jsf-impl.jar = ${jsf-impl.jar}"/> - <echo message="shale-test.jar = ${shale-test.jar}"/> - <echo message="spring-webflow.jar = ${spring-webflow.jar}"/> - <echo message="jsfri.present = ${jsfri.present}"/> - <echo message="myfaces.present= ${myfaces.present}"/> - <echo message="spring.present= ${spring.present}"/> - <echo message="tiles.present= ${tiles.present}"/> - <echo message="webflow.present= ${webflow.present}"/> - </target> - - - <target name="prepare" depends="init"> - <mkdir dir="${build.home}"/> - <mkdir dir="${build.home}/classes"/> - <mkdir dir="${build.home}/classes/META-INF"/> - <mkdir dir="${build.home}/conf"/> - <mkdir dir="${build.home}/lib"/> - <mkdir dir="${dist.home}"/> - <mkdir dir="${dist.home}/docs"/> - <mkdir dir="${dist.home}/docs/api"/> - </target> - - - <target name="static" depends="prepare"> - <tstamp/> - <copy todir="${build.home}/conf" - filtering="on"> - <fileset dir="src/conf" - includes="*.MF"/> - </copy> - <copy todir="${build.home}/classes/META-INF"> - <fileset dir="src/conf" - includes="*faces-config.xml taglib.tld"/> - </copy> - </target> - - - <!-- =================== Compile Library Components ====================== --> - - - <target name="compile" depends="static" - description="Compile core library"> - - <!-- Compile Java Sources --> - <javac srcdir="src/java" - destdir="${build.home}/classes" - debug="${compile.debug}" - deprecation="${compile.deprecation}" - optimize="${compile.optimize}" - source="${platform.source}" - target="${platform.target}"> - <classpath refid="compile.classpath" /> - <exclude name="org/apache/shale/spring/**" - unless="spring.present"/> - <exclude name="org/apache/shale/tiles/**" - unless="tiles.present"/> - <exclude name="org/apache/shale/spring/webflow/**" - unless="webflow.present"/> - </javac> - - <!-- Copy non-Java Sources --> - <copy todir="${build.home}/classes"> - <fileset dir="src/java"> - <exclude name="**/*.java"/> - <exclude name="org/apache/shale/spring/**" - unless="spring.present"/> - <exclude name="org/apache/shale/tiles/**" - unless="tiles.present"/> - <exclude name="org/apache/shale/spring/webflow/**" - unless="webflow.present"/> - </fileset> - </copy> - - <!-- Copy DTD for dialog configuration resources --> - <copy todir="${build.home}/classes/org/apache/shale/dialog" - file="src/conf/dialog.dtd"/> - - <!-- Copy license and notice files --> - <copy tofile="${build.home}/classes/META-INF/LICENSE.txt" - file="LICENSE.txt"/> - <copy tofile="${build.home}/classes/META-INF/NOTICE.txt" - file="NOTICE.txt"/> - - <!-- Copy the validator default message bundle to avoid problems if the - server locale is not English. --> - <copy file="src/java/org/apache/shale/validator/messages.properties" - tofile="${build.home}/classes/org/apache/shale/validator/messages_en.properties"/> - - </target> - - - <target name="library-core" depends="compile" - description="Package core library"> - - <jar jarfile="${build.home}/lib/shale-core.jar" - basedir="${build.home}/classes" - manifest="${build.home}/conf/MANIFEST.MF" - excludes="org/apache/shale/spring/** org/apache/shale/tiles/** **/package.html"/> - - </target> - - - <target name="library-spring" depends="compile" if="spring.present" - description="Package Spring integration library"> - <mkdir dir="${build.home}/shale-spring"/> - <mkdir dir="${build.home}/shale-spring/META-INF"/> - <copy todir="${build.home}/shale-spring/META-INF" - file="src/java/org/apache/shale/spring/faces-config.xml"/> - <jar jarfile="${build.home}/lib/shale-spring.jar" - manifest="${build.home}/conf/MANIFEST.MF"> - <fileset dir="${build.home}/shale-spring"/> - <fileset dir="${build.home}/classes" - includes="org/apache/shale/spring/**" - excludes="**/faces-config.xml **/package.html"/> - </jar> - </target> - - <target name="library-tiles" depends="compile" if="tiles.present" - description="Package Tiles integration library"> - <mkdir dir="${build.home}/shale-tiles"/> - <mkdir dir="${build.home}/shale-tiles/META-INF"/> - <copy todir="${build.home}/shale-tiles/META-INF" - file="src/java/org/apache/shale/tiles/faces-config.xml"/> - <jar jarfile="${build.home}/lib/shale-tiles.jar" - manifest="${build.home}/conf/MANIFEST.MF"> - <fileset dir="${build.home}/shale-tiles"/> - <fileset dir="${build.home}/classes" - includes="org/apache/shale/tiles/**" - excludes="**/faces-config.xml **/package.html"/> - </jar> - </target> - - - <target name="library" depends="library-core, library-spring, library-tiles" - description="Package all libraries"/> - - - <!-- ===================== Generate Documentation ======================== --> - - - <target name="docs" depends="library" - description="Create generated documentation and JavaDocs"> - - <javadoc - sourcepath="src/java" - destdir="${dist.home}/docs/api" - author="false" - private="true" - version="true" - overview="src/java/overview.html" - packagenames="org.apache.shale.*" - windowtitle="${project.name} (Version ${project.version})" - doctitle="${project.name} (Version ${project.version})" - bottom="Copyright © 2004-2005 - The Apache Software Foundation"> - <classpath refid="compile.classpath"/> - </javadoc> - - </target> - - - <!-- ==================== Create Binary Distribution ==================== --> - - - <target name="dist" depends="docs" - description="Create binary distribution"> - - <mkdir dir="${dist.home}"/> - <copy todir="${dist.home}"> - <fileset dir="${basedir}" includes="*.txt build.*" - excludes="build.properties"/> - </copy> -<!-- - <mkdir dir="${dist.home}/conf"/> - <copy todir="${dist.home}/conf"> - <fileset dir="${build.home}/conf" includes="*.tld"/> - </copy> ---> - <mkdir dir="${dist.home}/lib"/> - <copy todir="${dist.home}/lib"> - <fileset dir="${build.home}/lib" includes="*.jar"/> - </copy> - - <mkdir dir="${dist.home}/src"/> - <copy todir="${dist.home}/src"> - <fileset dir="src" excludes="**/.svn/**"/> - </copy> - - </target> - - - <!-- =========================== Find Bugs =============================== --> - - - <target name="findbugs" depends="library"> - - <taskdef name="findbugs" - classname="edu.umd.cs.findbugs.anttask.FindBugsTask" - classpathref="findbugs.classpath"/> - - <findbugs home="${findbugs.home}" - output="html" - outputFile="${findbugs.outputFile}" - reportLevel="low" - workHard="true"> - <auxClasspath - refid="findbugs.classpath"/> - <sourcePath path="${basedir}/src/java"/> - <class location="${basedir}/target/lib/shale-core.jar"/> - <class location="${basedir}/target/lib/shale-spring.jar"/> - </findbugs> - </target> - - - <!-- ========================= Unit Tests ================================ --> - - - <target name="test:compile" depends="library" - description="Compile library unit tests"> - - <mkdir dir="${build.home}/test-classes"/> - - <!-- Compile Java Sources --> - <javac srcdir="src/test" - destdir="${build.home}/test-classes" - debug="${compile.debug}" - deprecation="${compile.deprecation}" - optimize="${compile.optimize}" - source="${platform.source}" - target="${platform.target}"> - <classpath refid="test.classpath" /> - </javac> - - <!-- Copy non-Java Sources --> - <copy todir="${build.home}/test-classes"> - <fileset dir="src/test"> - <exclude name="**/*.java"/> - </fileset> - </copy> - - </target> - - - <target name="test" depends="test:compile" - description="Execute library unit tests"> - - <junit fork="yes" - haltonerror="${test.haltonerror}" - haltonfailure="${test.haltonfailure}" - printSummary="no"> - - <jvmarg value="-Denableassertions:org.apache.shale..."/> - <classpath refid="test.classpath"/> - <formatter type="plain" - usefile="false"/> - <batchtest fork="yes"> - <fileset dir="${build.home}/test-classes" - includes="org/apache/shale/**/*TestCase.class"/> - </batchtest> - - </junit> - - </target> - - -</project> +<!-- + + Copyright 2004-2005 The Apache Software Foundation. + + 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 + + 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. + + $Id: build.xml 54942 2004-10-16 22:39:25Z craigmcc $ + +--> + + +<project name="Shale Core Library" default="library" basedir="."> + + + <!-- ===================== Initialize Property Values ==================== --> + + + <!-- Initialize property values --> + <property name="root.dir" value="${basedir}/.."/> + <property name="lib.dir" value="${root.dir}/lib"/> + <property file="build.properties"/> + <property file="../build.properties"/> + <property file="../default.properties"/> + <property file="${user.home}/build.properties"/> + + + <!-- Dependency home directory defaults --> + <property name="shale-test.home" value="${basedir}/../test-framework/dist"/> + <property name="webflow.home" value="/usr/local/spring-webflow-pr4"/> + + + <!-- Dependency library defaults --> + <property name="shale-test.jar" value="${shale-test.home}/lib/shale-test.jar"/> + + + <!-- Build Defaults --> + <property name="build.home" value="${basedir}/target"/> + <property name="dist.home" value="${basedir}/dist"/> + <property name="project.name" value="Shale Core Library"/> + <property name="project.package" value="org.apache.shale"/> + <property name="project.version" value="0.1-dev"/> + + + <!-- Findbugs Defaults --> + <property name="findbugs.outputFile" value="${basedir}/core-library-fb.html"/> + + + <!-- Unit Test Defaults --> + <property name="test.haltonerror" value="true"/> + <property name="test.haltonfailure" value="true"/> + <property name="test.runner" value="junit.textui.TestRunner"/> + + + <!-- Compile Classpath --> + <path id="compile.classpath"> + <pathelement location="${commons-beanutils.jar}"/> + <pathelement location="${commons-chain.jar}"/> + <!-- <pathelement location="${commons-collections.jar}"/> --> + <pathelement location="${commons-digester.jar}"/> +<!-- <pathelement location="${commons-fileupload.jar}"/> --> + <pathelement location="${commons-logging.jar}"/> + <pathelement location="${commons-validator.jar}"/> + <pathelement location="${jsf-api.jar}"/> + <pathelement location="${jsf-impl.jar}"/> + <pathelement location="${jsp-api.jar}"/> + <pathelement location="${servlet-api.jar}"/> + <pathelement location="${spring-beans.jar}"/> + <pathelement location="${spring-context.jar}"/> + <pathelement location="${spring-core.jar}"/> + <pathelement location="${spring-web.jar}"/> + <pathelement location="${spring-webflow.jar}"/> + <pathelement location="${build.home}/classes"/> + <pathelement location="${tiles.jar}"/> + </path> + + + <!-- Findbugs Classpath --> + <path id="findbugs.classpath"> + <pathelement location="${commons-beanutils.jar}"/> + <pathelement location="${commons-chain.jar}"/> + <!-- <pathelement location="${commons-collections.jar}"/> --> + <pathelement location="${commons-digester.jar}"/> + <pathelement location="${commons-logging.jar}"/> + <pathelement location="${findbugs.home}/lib/findbugs-ant.jar"/> + <pathelement location="${jsf-api.jar}"/> + <pathelement location="${jsp-api.jar}"/> + <pathelement location="${servlet-api.jar}"/> + <pathelement location="${spring-beans.jar}"/> + <pathelement location="${spring-context.jar}"/> + <pathelement location="${spring-core.jar}"/> + <pathelement location="${spring-web.jar}"/> + <pathelement location="${spring-webflow.jar}"/> + </path> + + + <!-- Test Classpath --> + <path id="test.classpath"> + <pathelement location="${commons-beanutils.jar}"/> + <pathelement location="${commons-chain.jar}"/> + <!-- <pathelement location="${commons-collections.jar}"/> --> + <pathelement location="${commons-digester.jar}"/> + <!-- <pathelement location="${commons-fileupload.jar}"/> --> + <pathelement location="${commons-logging.jar}"/> + <pathelement location="${commons-validator.jar}"/> + <pathelement location="${jsf-api.jar}"/> + <pathelement location="${jsp-api.jar}"/> + <pathelement location="${junit.jar}"/> + <pathelement location="${servlet-api.jar}"/> + <pathelement location="${shale-test.jar}"/> + <pathelement location="${spring-beans.jar}"/> + <pathelement location="${spring-context.jar}"/> + <pathelement location="${spring-core.jar}"/> + <pathelement location="${spring-web.jar}"/> + <pathelement location="${spring-webflow.jar}"/> + <pathelement location="${build.home}/classes"/> + <pathelement location="${build.home}/test-classes"/> + <pathelement location="${tiles.jar}"/> + </path> + + <!-- Conditional Processing Flags --> + <available property="jsfri.present" + classname="com.sun.faces.RIConstants" + classpath="${jsf-impl.jar}"/> + <available property="myfaces.present" + classname="org.apache.myfaces.config.MyfacesConfig" + classpath="${jsf-impl.jar}"/> + <available property="tiles.present" + classname="org.apache.tiles.servlets.TilesServlet" + classpathref="compile.classpath"/> + <condition property="spring.present"> + <and> + <available classname="org.springframework.core.Constants" + classpathref="compile.classpath"/> + <available classname="org.springframework.context.ApplicationContext" + classpathref="compile.classpath"/> + <available classname="org.springframework.web.jsf.DelegatingVariableResolver" + classpathref="compile.classpath"/> + </and> + </condition> + <available property="webflow.present" + classname="org.springframework.webflow.Flow" + classpath="${spring-webflow.jar}"/> + + + <!-- ==================== Maintenance Targets ============================ --> + + + <target name="clean" + description="Clean all build directories"> + <delete dir="${build.home}"/> + <delete dir="${dist.home}"/> + </target> + + + <target name="init"> + <echo message="---------- ${project.name} ${project.version} -----------"/> + <filter token="name" value="${project.name}"/> + <filter token="package" value="${project.package}"/> + <filter token="state" value="${systest.state.saving}"/> + <filter token="version" value="${project.version}"/> + <echo message="jsf-api.jar = ${jsf-api.jar}"/> + <echo message="jsf-impl.jar = ${jsf-impl.jar}"/> + <echo message="shale-test.jar = ${shale-test.jar}"/> + <echo message="spring-webflow.jar = ${spring-webflow.jar}"/> + <echo message="jsfri.present = ${jsfri.present}"/> + <echo message="myfaces.present= ${myfaces.present}"/> + <echo message="spring.present= ${spring.present}"/> + <echo message="tiles.present= ${tiles.present}"/> + <echo message="webflow.present= ${webflow.present}"/> + </target> + + + <target name="prepare" depends="init"> + <mkdir dir="${build.home}"/> + <mkdir dir="${build.home}/classes"/> + <mkdir dir="${build.home}/classes/META-INF"/> + <mkdir dir="${build.home}/conf"/> + <mkdir dir="${build.home}/lib"/> + <mkdir dir="${dist.home}"/> + <mkdir dir="${dist.home}/docs"/> + <mkdir dir="${dist.home}/docs/api"/> + </target> + + + <target name="static" depends="prepare"> + <tstamp/> + <copy todir="${build.home}/conf" + filtering="on"> + <fileset dir="src/conf" + includes="*.MF"/> + </copy> + <copy todir="${build.home}/classes/META-INF"> + <fileset dir="src/conf" + includes="*faces-config.xml taglib.tld"/> + </copy> + </target> + + + <!-- =================== Compile Library Components ====================== --> + + + <target name="compile" depends="static" + description="Compile core library"> + + <!-- Compile Java Sources --> + <javac srcdir="src/java" + destdir="${build.home}/classes" + debug="${compile.debug}" + deprecation="${compile.deprecation}" + optimize="${compile.optimize}" + source="${platform.source}" + target="${platform.target}"> + <classpath refid="compile.classpath" /> + <exclude name="org/apache/shale/spring/**" + unless="spring.present"/> + <exclude name="org/apache/shale/tiles/**" + unless="tiles.present"/> + <exclude name="org/apache/shale/spring/webflow/**" + unless="webflow.present"/> + </javac> + + <!-- Copy non-Java Sources --> + <copy todir="${build.home}/classes"> + <fileset dir="src/java"> + <exclude name="**/*.java"/> + <exclude name="org/apache/shale/spring/**" + unless="spring.present"/> + <exclude name="org/apache/shale/tiles/**" + unless="tiles.present"/> + <exclude name="org/apache/shale/spring/webflow/**" + unless="webflow.present"/> + </fileset> + </copy> + + <!-- Copy DTD for dialog configuration resources --> + <copy todir="${build.home}/classes/org/apache/shale/dialog" + file="src/conf/dialog.dtd"/> + + <!-- Copy license and notice files --> + <copy tofile="${build.home}/classes/META-INF/LICENSE.txt" + file="LICENSE.txt"/> + <copy tofile="${build.home}/classes/META-INF/NOTICE.txt" + file="NOTICE.txt"/> + + <!-- Copy the validator default message bundle to avoid problems if the + server locale is not English. --> + <copy file="src/java/org/apache/shale/validator/messages.properties" + tofile="${build.home}/classes/org/apache/shale/validator/messages_en.properties"/> + + </target> + + + <target name="library-core" depends="compile" + description="Package core library"> + + <jar jarfile="${build.home}/lib/shale-core.jar" + basedir="${build.home}/classes" + manifest="${build.home}/conf/MANIFEST.MF" + excludes="org/apache/shale/spring/** org/apache/shale/tiles/** **/package.html"/> + + </target> + + + <target name="library-spring" depends="compile" if="spring.present" + description="Package Spring integration library"> + <mkdir dir="${build.home}/shale-spring"/> + <mkdir dir="${build.home}/shale-spring/META-INF"/> + <copy todir="${build.home}/shale-spring/META-INF" + file="src/java/org/apache/shale/spring/faces-config.xml"/> + <jar jarfile="${build.home}/lib/shale-spring.jar" + manifest="${build.home}/conf/MANIFEST.MF"> + <fileset dir="${build.home}/shale-spring"/> + <fileset dir="${build.home}/classes" + includes="org/apache/shale/spring/**" + excludes="**/faces-config.xml **/package.html"/> + </jar> + </target> + + <target name="library-tiles" depends="compile" if="tiles.present" + description="Package Tiles integration library"> + <mkdir dir="${build.home}/shale-tiles"/> + <mkdir dir="${build.home}/shale-tiles/META-INF"/> + <copy todir="${build.home}/shale-tiles/META-INF" + file="src/java/org/apache/shale/tiles/faces-config.xml"/> + <jar jarfile="${build.home}/lib/shale-tiles.jar" + manifest="${build.home}/conf/MANIFEST.MF"> + <fileset dir="${build.home}/shale-tiles"/> + <fileset dir="${build.home}/classes" + includes="org/apache/shale/tiles/**" + excludes="**/faces-config.xml **/package.html"/> + </jar> + </target> + + + <target name="library" depends="library-core, library-spring, library-tiles" + description="Package all libraries"/> + + + <!-- ===================== Generate Documentation ======================== --> + + + <target name="docs" depends="library" + description="Create generated documentation and JavaDocs"> + + <javadoc + sourcepath="src/java" + destdir="${dist.home}/docs/api" + author="false" + private="true" + version="true" + overview="src/java/overview.html" + packagenames="org.apache.shale.*" + windowtitle="${project.name} (Version ${project.version})" + doctitle="${project.name} (Version ${project.version})" + bottom="Copyright © 2004-2005 - The Apache Software Foundation"> + <classpath refid="compile.classpath"/> + </javadoc> + + </target> + + + <!-- ==================== Create Binary Distribution ==================== --> + + + <target name="dist" depends="docs" + description="Create binary distribution"> + + <mkdir dir="${dist.home}"/> + <copy todir="${dist.home}"> + <fileset dir="${basedir}" includes="*.txt build.*" + excludes="build.properties"/> + </copy> +<!-- + <mkdir dir="${dist.home}/conf"/> + <copy todir="${dist.home}/conf"> + <fileset dir="${build.home}/conf" includes="*.tld"/> + </copy> +--> + <mkdir dir="${dist.home}/lib"/> + <copy todir="${dist.home}/lib"> + <fileset dir="${build.home}/lib" includes="*.jar"/> + </copy> + + <mkdir dir="${dist.home}/src"/> + <copy todir="${dist.home}/src"> + <fileset dir="src" excludes="**/.svn/**"/> + </copy> + + </target> + + + <!-- =========================== Find Bugs =============================== --> + + + <target name="findbugs" depends="library"> + + <taskdef name="findbugs" + classname="edu.umd.cs.findbugs.anttask.FindBugsTask" + classpathref="findbugs.classpath"/> + + <findbugs home="${findbugs.home}" + output="html" + outputFile="${findbugs.outputFile}" + reportLevel="low" + workHard="true"> + <auxClasspath + refid="findbugs.classpath"/> + <sourcePath path="${basedir}/src/java"/> + <class location="${basedir}/target/lib/shale-core.jar"/> + <class location="${basedir}/target/lib/shale-spring.jar"/> + </findbugs> + </target> + + + <!-- ========================= Unit Tests ================================ --> + + + <target name="test:compile" depends="library" + description="Compile library unit tests"> + + <mkdir dir="${build.home}/test-classes"/> + + <!-- Compile Java Sources --> + <javac srcdir="src/test" + destdir="${build.home}/test-classes" + debug="${compile.debug}" + deprecation="${compile.deprecation}" + optimize="${compile.optimize}" + source="${platform.source}" + target="${platform.target}"> + <classpath refid="test.classpath" /> + </javac> + + <!-- Copy non-Java Sources --> + <copy todir="${build.home}/test-classes"> + <fileset dir="src/test"> + <exclude name="**/*.java"/> + </fileset> + </copy> + + </target> + + + <target name="test" depends="test:compile" + description="Execute library unit tests"> + + <junit fork="yes" + haltonerror="${test.haltonerror}" + haltonfailure="${test.haltonfailure}" + printSummary="no"> + + <jvmarg value="-enableassertions:org.apache.shale..."/> + <classpath refid="test.classpath"/> + <formatter type="plain" + usefile="false"/> + <batchtest fork="yes"> + <fileset dir="${build.home}/test-classes" + includes="org/apache/shale/**/*TestCase.class"/> + </batchtest> + + </junit> + + </target> + + +</project> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]