Author: craigmcc Date: Tue Jan 24 18:23:41 2006 New Revision: 372078 URL: http://svn.apache.org/viewcvs?rev=372078&view=rev Log: Update the build script for the Shale MailReader Example to one based on the (new) blank project template. The application compiles and runs; need to tweak some stylistic things and write a few unit tests before publishing it.
Added: struts/shale/trunk/mailreader/default.properties (with props) struts/shale/trunk/mailreader/ext/ struts/shale/trunk/mailreader/lib/ struts/shale/trunk/mailreader/src/conf/MANIFEST.MF struts/shale/trunk/mailreader/src/systest/ struts/shale/trunk/mailreader/src/test/ Modified: struts/shale/trunk/mailreader/build.xml struts/shale/trunk/mailreader/src/java/org/apache/shale/examples/mailreader/ApplicationListener.java Modified: struts/shale/trunk/mailreader/build.xml URL: http://svn.apache.org/viewcvs/struts/shale/trunk/mailreader/build.xml?rev=372078&r1=372077&r2=372078&view=diff ============================================================================== --- struts/shale/trunk/mailreader/build.xml (original) +++ struts/shale/trunk/mailreader/build.xml Tue Jan 24 18:23:41 2006 @@ -1,6 +1,6 @@ <!-- - Copyright 2002,2004-2005 The Apache Software Foundation. + Copyright 2006 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. @@ -19,7 +19,7 @@ --> -<project name="Shale-Based MailReader Example" default="compile" basedir="."> +<project name="Shale MailReader Example" default="compile" basedir="."> <!-- ===================== Initialize Property Values ==================== --> @@ -27,97 +27,93 @@ <!-- Initialize property values --> <property file="build.properties"/> - <property file="../build.properties"/> - <property file="../../build.properties"/> - <property file="../../../build.properties"/> - <property file="${user.home}/build.properties"/> - - - <!-- Dependency home directory defaults --> - <property name="chain.home" value="/usr/local/commons-chain-1.0"/> - <property name="jsf.home" value="/usr/local/jsf-1_1_01"/> - <property name="jstl.home" value="/usr/local/jakarta-taglibs-standard-1.1.2"/> - <property name="junit.home" value="/usr/local/junit-3.8.1"/> - <property name="server.home" value="/usr/local/jakarta-tomcat-5.0.28"/> - - - <!-- Dependency library defaults --> - <property name="commons-beanutils.jar" - value="${jsf.home}/lib/commons-beanutils.jar"/> - <property name="commons-chain.jar" - value="${chain.home}/commons-chain-1.0.jar"/> - <property name="commons-collections.jar" - value="${jsf.home}/lib/commons-collections.jar"/> - <property name="commons-digester.jar" - value="${jsf.home}/lib/commons-digester.jar"/> - <property name="commons-logging.jar" - value="${jsf.home}/lib/commons-logging.jar"/> - <property name="jsf-api.jar" value="${jsf.home}/lib/jsf-api.jar"/> - <property name="jsf-impl.jar" value="${jsf.home}/lib/jsf-impl.jar"/> - <property name="jsp-api.jar" value="${server.home}/common/lib/jsp-api.jar"/> - <property name="jstl.jar" value="${jstl.home}/lib/jstl.jar"/> - <property name="junit.jar" value="${junit.home}/junit.jar"/> - <property name="mailreader.jar" value="${basedir}/../../../core/trunk/struts-examples/mailreader/target/lib/struts-mailreader.jar"/> - <property name="servlet-api.jar" value="${server.home}/common/lib/servlet-api.jar"/> - <property name="shale.jar" value="${basedir}/../core-library/target/lib/shale.jar"/> - <property name="standard.jar" value="${jstl.home}/lib/standard.jar"/> + <property file="default.properties"/> + + + <!-- Search classpath for setting conditional processing flags --> + <path id="search.classpath"> + <fileset dir="${lib.dir}" + includes="**/*.jar"/> + </path> <!-- Conditional Processing Flags --> - <available property="jsfri.present" - classname="com.sun.faces.RIConstants" - classpath="${jsf-impl.jar}"/> - <available property="myfaces.present" - classname="net.sourceforge.myfaces.config.MyfacesConfig" - classpath="${jsf-impl.jar}"/> - - <!-- Build Defaults --> - <property name="build.home" value="${basedir}/target"/> - <property name="dist.home" value="${basedir}/dist"/> - <property name="context.path" value="struts-shale-mailreader"/> - <property name="project.name" value="Struts-Shale MailReader"/> - <property name="project.package" value="org.apache.shale.examples/mailreader"/> - <property name="project.version" value="0.1-dev"/> - - - <!-- Compile Defaults --> - <property name="compile.debug" value="true"/> - <property name="compile.deprecation" value="false"/> - <property name="compile.optimize" value="true"/> + <available property="jsfri.present" + classname="com.sun.faces.RIConstants" + classpathref="search.classpath"/> + <available property="license.present" + file="${basedir}/LICENSE.txt"/> + <available property="myfaces.present" + classname="org.apache.myfaces.config.MyfacesConfig" + classpathref="search.classpath"/> + <available property="notice.present" + file="${basedir}/NOTICE.txt"/> + <condition property="spring.present"> + <and> + <available classname="org.springframework.core.Constants" + classpathref="search.classpath"/> + <available classname="org.springframework.context.ApplicationContext" + classpathref="search.classpath"/> + <available classname="org.springframework.web.jsf.DelegatingVariableResolver" + classpathref="search.classpath"/> + </and> + </condition> + <available property="tiger.present" + classname="java.net.Proxy" + classpathref="search.classpath"/> + <available property="tiles.present" + classname="org.apache.tiles.servlets.TilesServlet" + classpathref="search.classpath"/> <!-- 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-logging.jar}"/> - <pathelement location="${jsf-api.jar}"/> - <pathelement location="${jsp-api.jar}"/> - <pathelement location="${jstl.jar}"/> - <pathelement location="${mailreader.jar}"/> - <pathelement location="${servlet.jar}"/> - <pathelement location="${shale.jar}"/> - <pathelement location="${build.home}/${context.path}/WEB-INF/classes"/> + <fileset dir="${lib.dir}" + includes="**/*.jar"> + <exclude name="junit.jar"/> + <exclude name="shale-spring.jar" + unless="spring.present"/> + <exclude name="shale-tiger.jar" + unless="tiger.present"/> + <exclude name="shale-tiles.jar" + unless="tiles.present"/> + </fileset> + <fileset dir="${ext.dir}" + includes="**/*.jar"/> + <fileset dir="${shale.dir}/dist" + includes="**/*.jar" + excludes="shale-test.jar"/> </path> - <!-- Custom Tomcat Integration --> - <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"/> - <taskdef name="install" classname="org.apache.catalina.ant.InstallTask"/> - <taskdef name="list" classname="org.apache.catalina.ant.ListTask"/> - <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/> - <taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask"/> - <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"/> - <property name="password" value="tomcat"/> - <property name="url" value="http://localhost:8080/manager"/> - <property name="username" value="tomcat"/> + <!-- Unit Test Classpath --> + <path id="test.classpath"> + <path refid="compile.classpath"/> + <fileset dir="${lib.dir}" + includes="**/junit.jar"/> + <fileset dir="${ext.dir}" + includes="**/junit.jar"/> + <path location="${build.web.dir}/WEB-INF/classes"/> + <fileset dir="${shale.dir}/dist" + includes="shale-test.jar"/> + <path location="${build.test.dir}"/> + </path> - <!-- Filter Settings --> - <property name="webapp.state.saving" value="server"/> - <property name="webapp.url" value="http://localhost:8080$/{context.path}"/> + <!-- System Integration Test Classpath --> + <path id="systest.classpath"> + <path refid="compile.classpath"/> + <fileset dir="${htmlunit.dir}/lib" + includes="*.jar"/> + <fileset dir="${lib.dir}" + includes="**/junit.jar"/> + <fileset dir="${ext.dir}" + includes="**/junit.jar"/> + <fileset dir="${shale.dir}/dist" + includes="shale-test.jar"/> + <pathelement location="${build.sys.dir}"/> + <pathelement location="${build.web.dir}/WEB-INF/classes"/> + </path> <!-- ==================== Maintenance Targets ============================ --> @@ -125,141 +121,152 @@ <target name="clean" description="Clean all build directories"> - <delete dir="${build.home}"/> - <delete dir="${dist.home}"/> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}"/> </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="${webapp.state.saving}"/> - <filter token="version" value="${project.version}"/> - <echo message="build.standalone = ${build.standalone}"/> - <echo message="commons-chain.jar =${commons-chain.jar}"/> - <echo message="jsf-api.jar = ${jsf-api.jar}"/> - <echo message="jsf-impl.jar = ${jsf-impl.jar}"/> - <echo message="mailreader.jar = ${mailreader.jar}"/> - <echo message="shale.jar = ${shale.jar}"/> + <filter token="implVendor" value="${project.vendor}"/> + <filter token="implVendorId" value="${project.vendor.id}"/> + <filter token="implVersion" value="${project.version}"/> + <filter token="projectName" value="${project.name}"/> + <filter token="projectPackage" value="${project.package}"/> + <filter token="specVendor" value="${project.spec.vendor}"/> + <filter token="specVersion" value="${project.spec.version}"/> + <filter token="stateSaving" value="${webapp.state.saving}"/> <echo message="jsfri.present = ${jsfri.present}"/> - <echo message="myfaces.present= ${myfaces.present}"/> + <echo message="myfaces.present = ${myfaces.present}"/> + <echo message="spring.present = ${spring.present}"/> + <echo message="tiger.present = ${tiger.present}"/> + <echo message="tiles.present = ${tiles.present}"/> </target> <target name="prepare" depends="init"> - <mkdir dir="${build.home}"/> - <mkdir dir="${build.home}/${context.path}"/> - <mkdir dir="${build.home}/${context.path}/WEB-INF"/> - <mkdir dir="${build.home}/${context.path}/WEB-INF/classes"/> - <mkdir dir="${build.home}/${context.path}/WEB-INF/lib"/> - <mkdir dir="${dist.home}"/> - <mkdir dir="${dist.home}/docs"/> - <mkdir dir="${dist.home}/docs/api"/> + <mkdir dir="${build.dir}"/> + <mkdir dir="${build.web.dir}"/> + <mkdir dir="${build.web.dir}/META-INF"/> + <mkdir dir="${build.web.dir}/WEB-INF"/> + <mkdir dir="${build.web.dir}/WEB-INF/classes"/> + <mkdir dir="${build.web.dir}/WEB-INF/lib"/> + <mkdir dir="${dist.dir}"/> + <mkdir dir="${dist.dir}/docs"/> + <mkdir dir="${dist.dir}/docs/api"/> </target> - <target name="static" depends="prepare"> + <target name="static" depends="prepare,static.license,static.notice"> + + <!-- Copy and filter configuration files --> + <copy todir="${build.dir}/META-INF" + filtering="on" + file="${src.conf.dir}/MANIFEST.MF"/> <!-- Copy static web resources --> - <copy todir="${build.home}/${context.path}" + <copy todir="${build.web.dir}" filtering="on"> - <fileset dir="src/web"/> + <fileset dir="${src.web.dir}"/> </copy> - <!-- Copy required library JAR files --> - <mkdir dir="${build.home}/${context.path}/WEB-INF/lib"/> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${commons-beanutils.jar}"/> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${commons-chain.jar}"/> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${commons-collections.jar}"/> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${commons-digester.jar}"/> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${commons-logging.jar}"/> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${mailreader.jar}"/> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${shale.jar}"/> - - </target> + <!-- Copy libraries from "lib.dir" directory --> + <copy todir="${build.web.dir}/WEB-INF/lib" + flatten="true"> + <fileset dir="${lib.dir}" + includes="**/*.jar"> + <exclude name="**/commons-codec.jar" + unless="myfaces.present"/> + <exclude name="**/commons-el.jar" + unless="myfaces.present"/> + <exclude name="**/commons-fileupload.jar" + unless="myfaces.present"/> + <exclude name="**/jsf-api.jar" + if="myfaces.present"/> + <exclude name="**/jsf-impl.jar" + if="myfaces.present"/> + <exclude name="**/junit.jar"/> + <exclude name="**/jsp-api.jar"/> + <!-- Comment out following line if using MyFaces components --> + <exclude name="**/myfaces-extensions.jar"/> + <exclude name="**/portlet-api.jar"/> + <exclude name="**/servlet-api.jar"/> + <!-- Comment out the following lines for Spring components you need --> + <exclude name="**/spring.jar"/> + <exclude name="**/spring-aop.jar"/> + <exclude name="**/spring-dao.jar"/> + <exclude name="**/spring-hibernate.jar"/> + <exclude name="**/spring-jdbc.jar"/> + <exclude name="**/spring-mock.jar"/> + <exclude name="**/spring-orm.jar"/> + <exclude name="**/spring-remoting.jar"/> + <exclude name="**/spring-support.jar"/> + <exclude name="**/spring-webmvc.jar"/> +<!-- <exclude name="**/struts-mailreader-dao.jar"/> --> + <exclude name="**/spring*.jar"/> + <exclude name="**/taglibrarydoc.jar"/> + </fileset> + </copy> - <target name="static.jsfri" depends="static" - if="jsfri.present"> + <!-- Copy libraries from Shale release --> + <copy todir="${build.web.dir}/WEB-INF/lib" + flatten="true"> + <fileset dir="${shale.dir}/dist" + includes="**/*.jar"> + <exclude name="shale-spring.jar" + unless="spring.present"/> + <exclude name="shale-test.jar"/> + <exclude name="shale-tiger.jar" + unless="tiger.present"/> + <exclude name="shale-tiles.jar" + unless="tiles.present"/> + <exclude name="shale-clay.jar"/> + <exclude name="shale-spring.jar"/> + <exclude name="shale-tiles.jar"/> + <exclude name="tiles-core.jar"/> + </fileset> + </copy> - <replace dir="${build.home}/${context.path}/WEB-INF" - token="MYFACES_BEGIN" - value="<!-- MyFaces Listener"/> - <replace dir="${build.home}/${context.path}/WEB-INF" - token="MYFACES_END" - value="-->"/> </target> - <target name="static.myfaces" depends="static.jsfri" - if="myfaces.present"> - - <replace dir="${build.home}/${context.path}/WEB-INF" - token="MYFACES_BEGIN" - value="<!-- MyFaces Listener -->"/> - <replace dir="${build.home}/${context.path}/WEB-INF" - token="MYFACES_END" - value=""/> - + <target name="static.license" if="license.present"> + <copy todir="${build.web.dir}/META-INF" + file="${basedir}/LICENSE.txt"/> </target> - <target name="libraries" depends="static.myfaces" - if="build.standalone"> - - <!-- Copy libraries required for standalone use only --> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${jsf-api.jar}"/> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${jsf-impl.jar}"/> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${jstl.jar}"/> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${standard.jar}"/> - - </target> - - - <target name="libraries.myfaces" depends="libraries" - if="myfaces.present"> - - <!-- Copy additional libraries required by MyFaces implementation --> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${jsf.home}/lib/commons-codec-1.2.jar"/> - <copy todir="${build.home}/${context.path}/WEB-INF/lib" - file="${jsf.home}/lib/commons-el.jar"/> - + <target name="static.notice" if="notice.present"> + <copy todir="${build.web.dir}/META-INF" + file="${basedir}/NOTICE.txt"/> </target> <!-- ================= Compile Application Components ==================== --> - <target name="compile" depends="libraries.myfaces" + <target name="compile" depends="static" description="Compile application components"> <!-- Compile Java Sources --> - <javac srcdir="src/java" - destdir="${build.home}/${context.path}/WEB-INF/classes" + <javac srcdir="${src.java.dir}" + destdir="${build.web.dir}/WEB-INF/classes" debug="${compile.debug}" deprecation="${compile.deprecation}" - optimize="${compile.optimize}"> + optimize="${compile.optimize}" + source="${project.source}" + target="${project.target}"> <classpath refid="compile.classpath" /> </javac> <!-- Copy non-Java Sources --> - <copy todir="${build.home}/${context.path}/WEB-INF/classes"> - <fileset dir="src/java"> + <copy todir="${build.web.dir}/WEB-INF/classes"> + <fileset dir="${src.java.dir}"> <exclude name="**/*.java"/> + <exclude name="**/overview.html"/> + <exclude name="**/package.html"/> </fileset> </copy> @@ -269,91 +276,231 @@ <!-- ===================== Generate Documentation ======================== --> - <target name="docs" depends="compile" + <target name="javadocs" depends="compile" description="Create JavaDocs"> + <mkdir dir="${build.docs.dir}"/> + <javadoc - sourcepath="src/java" - destdir="${dist.home}/docs/api" + sourcepath="${src.java.dir}" + destdir="${build.docs.dir}" author="false" private="true" version="true" - source="${javadoc.source}" - packagenames="org.apache.shale.*" + source="${project.source}" + packagenames="${project.package}.*" windowtitle="${project.name} (Version ${project.version})" doctitle="${project.name} (Version ${project.version})" - bottom="Copyright © 2003-2005 - The Apache Software Foundation"> + bottom="${project.copyright}"> <classpath refid="compile.classpath"/> </javadoc> + <copy todir="${build.docs.dir}"> + <fileset dir="${src.java.dir}" + includes="**/*.gif"/> + </copy> + </target> <!-- ==================== Create Binary Distribution ===================== --> - <target name="dist" depends="docs" + <target name="dist" depends="javadocs" description="Create binary distribution"> - <mkdir dir="${dist.home}"/> - <copy todir="${dist.home}"> - <fileset dir="${basedir}" includes="*.txt build.*" + <mkdir dir="${dist.dir}"/> + + <!-- Copy license and configuration files --> + <copy todir="${dist.dir}"> + <fileset dir="${basedir}" includes="*.txt build.* default.properties" excludes="build.properties"/> </copy> - <jar jarfile="${dist.home}/${context.path}.war" - basedir="${build.home}/${context.path}"/> + <!-- Create a runnable web application archive --> + <jar jarfile="${dist.dir}/${project.path}-${project.version}.war" + basedir="${build.web.dir}" + manifest="${build.dir}/META-INF/MANIFEST.MF"/> + + <!-- Optional: Copy the source directories --> + <mkdir dir="${dist.dir}/src"/> + <copy todir="${dist.dir}/src"> + <fileset dir="src" excludes="**/.svn/** **/CVS/**"/> + </copy> - <mkdir dir="${dist.home}/src"/> - <copy todir="${dist.home}/src"> - <fileset dir="src" excludes="**/.svn/**"/> + <!-- Optional: Create an IDE-friendly zip of the Java sources --> + <zip zipfile="${dist.dir}/${project.path}-${project.version}-src.zip" + basedir="${src.java.dir}"/> + + <!-- Optional: Copy unpacked javadocs --> + <mkdir dir="${dist.dir}/docs"/> + <mkdir dir="${dist.dir}/docs/api"/> + <copy todir="${dist.dir}/docs/api"> + <fileset dir="${build.docs.dir}"/> </copy> + <!-- Optional: Create an IDE-friendly zip of the Javadocs --> + <zip zipfile="${dist.dir}/${project.path}-${project.version}-doc.zip" + basedir="${build.docs.dir}"/> + </target> <!-- ===================== Tomcat Integration ============================ --> - <target name="deploy" depends="compile" - description="Deploy webapp on Tomcat"> - <install url="${url}" username="${username}" password="${password}" - path="/${context.path}" - war="file://${build.home}/${context.path}"/> + <path id="catalina.classpath"> + <path location="${catalina.home}/server/lib/catalina-ant.jar"/> + </path> + + + <target name="install" depends="compile" + description="Install webapp on Tomcat"> + <taskdef name="install" + classname="org.apache.catalina.ant.InstallTask" + classpathref="catalina.classpath"/> + <install url="${catalina.manager}" + username="${catalina.username}" + password="${catalina.password}" + path="/${project.path}" + war="file://${build.web.dir}"/> </target> - <target name="install" depends="compile" - description="Install webapp on Tomcat"> - <install url="${url}" username="${username}" password="${password}" - path="/${context.path}" - war="file://${build.home}/${context.path}"/> + <target name="list" + description="List installed webapps on Tomcat"> + <taskdef name="list" + classname="org.apache.catalina.ant.ListTask" + classpathref="catalina.classpath"/> + <list url="${catalina.manager}" + username="${catalina.username}" + password="${catalina.password}"/> </target> - <target name="list" description="List installed webapps on Tomcat"> - <list url="${url}" username="${username}" password="${password}"/> + <target name="reload" depends="compile" + description="Reload webapp on Tomcat"> + <taskdef name="reload" + classname="org.apache.catalina.ant.ReloadTask" + classpathref="catalina.classpath"/> + <reload url="${catalina.manager}" + username="${catalina.username}" + password="${catalina.password}" + path="/${project.path}"/> </target> - <target name="reload" depends="compile" - description="Reload webapp on Tomcat"> - <reload url="${url}" username="${username}" password="${password}" - path="/${context.path}"/> + <target name="remove" + description="Remove webapp from Tomcat"> + <taskdef name="remove" + classname="org.apache.catalina.ant.RemoveTask" + classpathref="catalina.classpath"/> + <remove url="${catalina.manager}" + username="${catalina.username}" + password="${catalina.password}" + path="/${project.path}"/> </target> - <target name="remove" - description="Remove webapp from Tomcat"> - <remove url="${url}" username="${username}" password="${password}" - path="/${context.path}"/> + <!-- ========================== Unit Tests =============================== --> + + + <target name="test.compile" depends="compile"> + + <mkdir dir="${build.test.dir}"/> + + <!-- Compile Java Sources --> + <javac srcdir="${src.test.dir}" + destdir="${build.test.dir}" + debug="${compile.debug}" + deprecation="${compile.deprecation}" + optimize="${compile.optimize}" + source="${project.source}" + target="${project.target}"> + <classpath refid="test.classpath" /> + </javac> + + <!-- Copy non-Java Sources --> + <copy todir="${build.test.dir}"> + <fileset dir="${src.test.dir}"> + <exclude name="**/*.java"/> + </fileset> + </copy> + + </target> + + + <target name="test" depends="test.compile" + description="Execute unit tests"> + + <mkdir dir="${build.dir}/test-results"/> + + <echo message="Running unit tests ..."/> + <junit printSummary="no" fork="yes" + haltonfailure="yes" haltonerror="yes"> + <classpath refid="test.classpath"/> + <formatter type="plain" + usefile="false"/> + <formatter type="xml" + usefile="true"/> + <batchtest todir="${build.dir}/test-results"> + <fileset dir="${build.test.dir}" + includes="**/*TestCase.class"/> + </batchtest> + </junit> + + </target> + + + <!-- =============== System Integration Tests ============================ --> + + + <target name="systest.compile"> + + <mkdir dir="${build.sys.dir}"/> + + <!-- Compile Java Sources --> + <javac srcdir="${src.sys.dir}" + destdir="${build.sys.dir}" + debug="${compile.debug}" + deprecation="${compile.deprecation}" + optimize="${compile.optimize}" + source="${project.source}" + target="${project.target}"> + <classpath refid="systest.classpath" /> + </javac> + + <!-- Copy non-Java Sources --> + <copy todir="${build.sys.dir}"> + <fileset dir="${src.sys.dir}"> + <exclude name="**/*.java"/> + </fileset> + </copy> + </target> - <target name="undeploy" - description="Undeploy webapp from Tomcat"> - <remove url="${url}" username="${username}" password="${password}" - path="/${context.path}"/> + <target name="systest" depends="systest.compile" + description="Execute system integration tests"> + + <junit fork="yes" + printSummary="yes" + haltonerror="yes" + haltonfailure="yes"> + + <classpath refid="systest.classpath"/> + <formatter type="plain" + usefile="false"/> + <sysproperty key="url" + value="${htmlunit.url}"/> + + <batchtest> + <fileset dir="${build.sys.dir}" + includes="**/*TestCase.class"/> + </batchtest> + + </junit> + </target> Added: struts/shale/trunk/mailreader/default.properties URL: http://svn.apache.org/viewcvs/struts/shale/trunk/mailreader/default.properties?rev=372078&view=auto ============================================================================== --- struts/shale/trunk/mailreader/default.properties (added) +++ struts/shale/trunk/mailreader/default.properties Tue Jan 24 18:23:41 2006 @@ -0,0 +1,163 @@ +# Copyright 2006 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$ + + +# ============================================================================== +# Default Configuration Properties +# ============================================================================== + +# These properties define default values for your application. You can +# override them by supplying a "build.properties" file in the top level +# directory of your project, containing only the property values you wish +# to override. + + +# ------------------------------------------------------------------------------ +# Project Description Information +# ------------------------------------------------------------------------------ + +# Project copyright notice (for Javadoc generation) +project.copyright=Copyright © 2006 - The Apache Software Foundation + +# Project name (should match <project name="xxx"> setting in build.xml) +project.name=Shale MailReader Example + +# Base package name for Java classes in this project (affects Javadoc generation, +# and is included in manifest files) +project.package=org.apache.shale.examples.mailreader + +# Context path for the generated application (will be included in the +# target directory +project.path=shale-mailreader + +# Source JDK platform to compile for +project.source=1.4 + +# Specification vendor (will be placed in manifest files) +project.spec.vendor=The Apache Sofware Foundation + +# Specification version number (will be placed in manifest files) +project.spec.version=1.0 + +# Target JK platform to compile to +project.target=1.4 + +# Implementation vendor (will be placed in manifest files) +project.vendor=The Apache Software Foundation + +# Implementation vendor id (will be placed in manifest files). Should be the +# top level package name for classes produced by your organization +project.vendor.id=org.apache + +# Implementation version (will be placed in manifest files) +project.version=0.1 + + +# ------------------------------------------------------------------------------ +# Compilation Options +# ------------------------------------------------------------------------------ + +# Should compiler generate line numbers for debugging (true or false) +compile.debug=true + +# Should compiler generate detailed warnings for using deprecated APIs (true or false) +compile.deprecation=true + +# Should compiler optimize the generated code (true or false) +compiler.optimize=true + + +# ------------------------------------------------------------------------------ +# Web Application Configuration +# ------------------------------------------------------------------------------ + +# Setting for the JavaServer Faces state saving option (client or server) +webapp.state.saving=client + + +# ------------------------------------------------------------------------------ +# Project Directory Structure +# ------------------------------------------------------------------------------ + +# Source Directory Structure Definitions +conf.dir=${basedir}/conf +src.dir=${basedir}/src +src.conf.dir=${src.dir}/conf +src.java.dir=${src.dir}/java +src.sys.dir=${src.dir}/systest +src.test.dir=${src.dir}/test +src.web.dir=${src.dir}/web +test.dir=${basedir}/test +web.dir=${basedir}/web + + +# Target Directory Structure Definitions +build.dir=${basedir}/target +build.docs.dir=${build.dir}/javadocs +build.sys.dir=${build.dir}/systest-classes +build.test.dir=${build.dir}/test-classes +build.web.dir=${build.dir}/${project.path} +dist.dir=${basedir}/dist + + +# Library directory containing libraries that will be copied into the +# web application. It is legal for the JAR files to be nested inside +# this directory. +lib.dir=${basedir}/../lib + + +# Library directory containing libraries that will be added to the +# compilation classpath, but will not be eopied into the web application +# (presumably because they will be provided by the container already). +# It is legal for the JAR riles to be nested inside this directory. +ext.dir=ext + + +# Directory containing your Shale binary distribution +shale.dir=${basedir}/../target + + +# ------------------------------------------------------------------------------ +# (Optional) Tomcat Integration +# ------------------------------------------------------------------------------ + +# The full pathname to the Tomcat instalation you will be using +catalina.home=/home/${user.name}/jakarta-tomcat-5.0.28 + +# The full URL to the manager application you will be using +catalina.manager=http://localhost:8080/manager + +# The username of a Tomcat user that has the "manager" role +catalina.username=tomcat + +# The password of a Tomcat user that has the "manager" role +catalina.password=tomcat + + +# ------------------------------------------------------------------------------ +# (Optional) System Integration Test Packages +# ------------------------------------------------------------------------------ + + +# The full pathname to the HtmlUnit (version 1.6 or later) binary distribution +# from http://sourceforge.net +htmlunit.dir=/usr/local/htmlunit-1.6 + + +# the full URL to the application to be tested +htmlunit.url=http://localhost:8080/${project.path} + + Propchange: struts/shale/trunk/mailreader/default.properties ------------------------------------------------------------------------------ svn:eol-style = native Propchange: struts/shale/trunk/mailreader/default.properties ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Added: struts/shale/trunk/mailreader/src/conf/MANIFEST.MF URL: http://svn.apache.org/viewcvs/struts/shale/trunk/mailreader/src/conf/MANIFEST.MF?rev=372078&view=auto ============================================================================== --- struts/shale/trunk/mailreader/src/conf/MANIFEST.MF (added) +++ struts/shale/trunk/mailreader/src/conf/MANIFEST.MF Tue Jan 24 18:23:41 2006 @@ -0,0 +1,7 @@ +Extension-Name: @projectPackage@ +Specification-Vendor: @specVendor@ +Specification-Version: @specVersion@ +Implementation-Vendor-Id: @implVendorId@ +Implementation-Vendor: @implVendor@ +Implementation-Version: @implVersion@ + Modified: struts/shale/trunk/mailreader/src/java/org/apache/shale/examples/mailreader/ApplicationListener.java URL: http://svn.apache.org/viewcvs/struts/shale/trunk/mailreader/src/java/org/apache/shale/examples/mailreader/ApplicationListener.java?rev=372078&r1=372077&r2=372078&view=diff ============================================================================== --- struts/shale/trunk/mailreader/src/java/org/apache/shale/examples/mailreader/ApplicationListener.java (original) +++ struts/shale/trunk/mailreader/src/java/org/apache/shale/examples/mailreader/ApplicationListener.java Tue Jan 24 18:23:41 2006 @@ -144,8 +144,7 @@ /** * <p>Initialize and load our initial database from persistent storage.</p> * - * @param servlet The ActionServlet for this web application - * @param config The ApplicationConfig for our owning module + * @param event The context initialization event * * @exception ServletException if we cannot configure ourselves correctly */ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]