You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by jr...@apache.org on 2003/04/18 14:30:05 UTC
cvs commit: jakarta-cactus/samples/jetty/conf/sample/conf web.xml
jruaux 2003/04/18 05:30:05
Modified: . build-common.xml build.properties.sample build.xml
samples/jetty .cvsignore build.properties.sample build.xml
samples/jetty/conf/sample/build build.properties.sample
build.xml
samples/jetty/conf/sample/conf/test jetty.xml
samples/jetty/conf/sample/conf web.xml
Log:
Applied J�r�me's patch for Jetty sample
Revision Changes Path
1.10 +3 -0 jakarta-cactus/build-common.xml
Index: build-common.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/build-common.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- build-common.xml 19 Mar 2003 12:20:14 -0000 1.9
+++ build-common.xml 18 Apr 2003 12:30:04 -0000 1.10
@@ -128,6 +128,9 @@
<!-- The Cactus Eclipse Webapp Integration dist -->
<property name="cactus.eclipse.webapp.bin" value="integration/eclipse/org.apache.cactus.eclipse.webapp/dist/bin/cactus-integration-eclipse-webapp"/>
+
+ <!-- The Sample Servlet dist -->
+ <property name="cactus.samples.servlet.bin" value="samples/servlet/dist-${j2ee.api}/bin/cactus-sample-servlet"/>
</target>
1.56 +20 -5 jakarta-cactus/build.properties.sample
Index: build.properties.sample
===================================================================
RCS file: /home/cvs/jakarta-cactus/build.properties.sample,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- build.properties.sample 3 Apr 2003 12:14:04 -0000 1.55
+++ build.properties.sample 18 Apr 2003 12:30:04 -0000 1.56
@@ -71,6 +71,25 @@
tidy.jar = ${lib.repo}/jtidy/jars/jtidy-4aug2000r7-dev.jar
# -----------------------------------------------------------------------------
+# Mandatory property for the Eclipse plugin ant the sample jetty
+# -----------------------------------------------------------------------------
+# The Jetty container is packaged in the Eclipse plugin and is used as the
+# default container in which to run the Cactus tests.
+
+# The location of the Jetty jar
+jetty.jar = ${lib.repo}/jetty/jars/org.mortbay.jetty-4.2.9.jar
+
+# -----------------------------------------------------------------------------
+# Mandatory property for the sample jetty
+# -----------------------------------------------------------------------------
+
+# The location of the Jasper compiler jar
+jasperc.jar = ${lib.repo}/jetty/jars/jasper-compiler-4.0.4.jar
+
+# The location of the Jasper runtime jar
+jasperr.jar = ${lib.repo}/jetty/jars/jasper-runtime-4.0.4.jar
+
+# -----------------------------------------------------------------------------
# Mandatory properties for the Eclipse plugin only
# -----------------------------------------------------------------------------
@@ -93,10 +112,6 @@
eclipse.jface.jar = ${eclipse.home}/plugins/org.eclipse.jface_2.1.0/jface.jar
eclipse.ant.core.jar = ${eclipse.home}/plugins/org.eclipse.ant.core_2.1.0/antsupport.jar
eclipse.ui.workbench.jar = ${eclipse.home}/plugins/org.eclipse.ui.workbench_2.1.0/workbench.jar
-
-# The Jetty container is packaged in the Eclipse plugin and is used as the
-# default container in which to run the Cactus tests.
-jetty.jar = ${lib.repo}/jetty/jars/org.mortbay.jetty-4.2.9.jar
# -----------------------------------------------------------------------------
# Optional properties for the main Cactus build
1.45 +11 -0 jakarta-cactus/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/build.xml,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- build.xml 15 Mar 2003 20:50:01 -0000 1.44
+++ build.xml 18 Apr 2003 12:30:04 -0000 1.45
@@ -81,6 +81,12 @@
<property name="clover.enable" value="true"/>
</ant>
+ <ant antfile="samples/jetty/build.xml" inheritAll="false"
+ target="release">
+ <property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="clover.enable" value="true"/>
+ </ant>
+
<ant antfile="documentation/build.xml" inheritAll="false"
target="release">
<property name="javadoc.include" value="true"/>
@@ -145,6 +151,11 @@
</ant>
<ant antfile="samples/servlet/build.xml" inheritAll="false"
+ target="clean">
+ <property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ </ant>
+
+ <ant antfile="samples/jetty/build.xml" inheritAll="false"
target="clean">
<property name="j2ee.jar" value="${j2ee.13.jar}"/>
</ant>
1.2 +1 -0 jakarta-cactus/samples/jetty/.cvsignore
Index: .cvsignore
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/jetty/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 3 Feb 2003 08:37:36 -0000 1.1
+++ .cvsignore 18 Apr 2003 12:30:04 -0000 1.2
@@ -3,4 +3,5 @@
dist-13
target-12
target-13
+release-13
ant.bat
1.3 +6 -3 jakarta-cactus/samples/jetty/build.properties.sample
Index: build.properties.sample
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/jetty/build.properties.sample,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.properties.sample 14 Mar 2003 15:14:16 -0000 1.2
+++ build.properties.sample 18 Apr 2003 12:30:04 -0000 1.3
@@ -46,10 +46,13 @@
httpunit.jar = ${lib.repo}/httpunit/jars/httpunit-1.5.jar
# The location of the Jetty jar
-jetty.jar = ${lib.repo}/jetty/jars/org.mortbay.jetty-jdk1.2-4.1.0RC4.jar
+jetty.jar = ${lib.repo}/jetty/jars/org.mortbay.jetty-4.2.9.jar
-# The location of the Jasper jar
-jasper.jar = ${lib.repo}/jetty/jars/org.apache.jasper-4.1.0RC4.jar
+# The location of the Jasper compiler jar
+jasperc.jar = ${lib.repo}/jetty/jars/jasper-compiler-4.0.4.jar
+
+# The location of the Jasper runtime jar
+jasperr.jar = ${lib.repo}/jetty/jars/jasper-runtime-4.0.4.jar
# -----------------------------------------------------------------------------
# Optional properties
1.3 +219 -130 jakarta-cactus/samples/jetty/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/jetty/build.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.xml 4 Apr 2003 08:11:41 -0000 1.2
+++ build.xml 18 Apr 2003 12:30:04 -0000 1.3
@@ -1,4 +1,7 @@
<?xml version="1.0"?>
+<!DOCTYPE project [
+ <!ENTITY common SYSTEM "file:../../build-common.xml">
+]>
<!--
=============================================================================
@@ -27,77 +30,60 @@
relative paths.
=============================================================================
-->
-<project name="Cactus Jetty Sample" default="dist" basedir="..">
-
- <!-- Give user a chance to override without editing this file
- (and without typing -D each time it compiles it) -->
- <property file="sample-jetty/build.properties" />
- <property file="${user.home}/build.properties" />
+<project name="Cactus Jetty Sample" default="dist" basedir="../..">
+ <!-- Base directory for all file related operations -->
+ <property name="base.dir" value="samples/jetty"/>
+
+ <!-- Include properties and targets common to the different subprojects -->
+ &common;
+
<!-- Global project properties -->
<property name="project.name.text" value="Cactus Jetty Sample"/>
- <property name="project.name.file" value="sample-jetty"/>
- <property name="project.version" value="1.5dev"/>
-
- <!-- Prefix to add to all distributable files -->
- <property name="project.prefix" value="jakarta-"/>
-
- <!--
- ========================================================================
- Default values for properties not defined in build.properties or in
- a higher level calling Ant script
- ========================================================================
- -->
- <property name="year" value="2000-2003"/>
- <property name="debug" value="on"/>
- <property name="optimize" value="off"/>
- <property name="deprecation" value="off"/>
-
- <!--
- ========================================================================
- Base directory for all file related operations
- ========================================================================
- -->
- <property name="base.dir" value="sample-jetty"/>
-
+ <property name="project.name.file" value="cactus-sample-jetty"/>
+
<!--
========================================================================
- Set the properties related to the source tree.
- Note: These properties are defined in a target as some need the
- j2ee.api property to be set
+ Initialize source, target and dist properties
========================================================================
-->
- <target name="properties.source">
+ <target name="properties">
<!-- Source locations for the build -->
- <property name="src.dir" value="sample-servlet/src"/>
- <property name="src.sample.dir" value="${src.dir}/sample"/>
- <property name="src.unit.dir" value="${src.dir}/unit"/>
+ <property name="src.dir" value="${cactus.samples.servlet.bin}/src"/>
+ <property name="src.lib.dir" value="${cactus.samples.servlet.bin}/lib"/>
+ <!--property name="src.sample.dir" value="${src.dir}/java"/>
+ <property name="src.unit.dir" value="${src.dir}/test-cactus"/-->
+
<property name="conf.dir" value="${base.dir}/conf"/>
<property name="conf.sample.dir" value="${conf.dir}/sample"/>
<property name="conf.sample.build.dir" value="${conf.sample.dir}/build"/>
<property name="conf.sample.conf.dir" value="${conf.sample.dir}/conf"/>
- <property name="web.dir" value="sample-servlet/web"/>
- <property name="web.sample.dir" value="${web.dir}/sample"/>
-
- <!-- The location of the Cactus framework jar -->
- <property name="cactus.framework.jar"
- value="framework/dist-${j2ee.api}/lib/cactus.jar"/>
-
- <!-- The location of the web files generated by the Cactus framework
- (i.e. the JSP Redirector) -->
- <property name="cactus.framework.web"
- value="framework/dist-${j2ee.api}/web"/>
-
- <!-- Location of the Clover(ed) Cactus framework -->
- <property name="cactus.framework.clover.jar"
- value="framework/dist-${j2ee.api}/lib/cactus-clover.jar"/>
- <echo message="cactus.framework.clover.jar = ${cactus.framework.clover.jar}"/>
-
+
+ <property name="web.dir" value="${src.dir}/webapp"/>
+ <property name="web.sample.dir" value="${web.dir}/test"/>
+
+ <!-- Set the properties related to the target area -->
+ <property name="target.sample.dir" value="${target.dir}/sample"/>
+ <property name="target.sample.src.dir" value="${target.sample.dir}/src"/>
+ <property name="target.sample.lib.dir" value="${target.sample.dir}/lib"/>
+ <property name="target.sample.build.dir" value="${target.sample.dir}/build"/>
+
+ <property name="target.sample.build.integration.dir"
+ value="${target.sample.build.dir}/cactus-integration-ant"/>
+
+ <property name="target.sample.build.integration.dir.lib"
+ value="${target.sample.build.integration.dir}/lib"/>
+
+ <property name="target.sample.conf.dir" value="${target.sample.dir}/conf"/>
+ <property name="target.sample.src.sample.dir" value="${target.sample.src.dir}/java"/>
+ <property name="target.sample.src.unit.dir" value="${target.sample.src.dir}/test-cactus"/>
+ <property name="target.sample.web.dir" value="${target.sample.src.dir}/webapp"/>
+
</target>
<!-- The location of the Cactus custom Ant tasks jar -->
- <property name="cactus.ant.jar" value="anttasks/dist/lib/cactus-ant.jar"/>
+ <property name="cactus.ant.jar" value="anttasks/dist/lib/cactus-anttasks.jar"/>
<!--
========================================================================
@@ -108,18 +94,7 @@
-->
<target name="properties.target">
- <property name="target.dir" value="${base.dir}/target-${j2ee.api}"/>
-
- <!-- Destination locations for the sample application -->
- <property name="target.sample.dir" value="${target.dir}/sample"/>
- <property name="target.sample.build.dir" value="${target.sample.dir}/build"/>
- <property name="target.sample.conf.dir" value="${target.sample.dir}/conf"/>
- <property name="target.sample.src.dir" value="${target.sample.dir}/src"/>
- <property name="target.sample.src.sample.dir"
- value="${target.sample.src.dir}/sample"/>
- <property name="target.sample.src.unit.dir"
- value="${target.sample.src.dir}/unit"/>
- <property name="target.sample.web.dir" value="${target.sample.dir}/web"/>
+
</target>
@@ -178,7 +153,7 @@
<echo message="clover.enable (optional) = ${clover.enable}"/>
<echo message="clover.jar (optional) = ${clover.jar}"/>
<echo message="test.port (optional) = ${test.port}"/>
-
+ <echo message=""/>
</target>
<!--
@@ -206,7 +181,8 @@
<property name="junit.jar" isfile="true"/>
<property name="httpunit.jar" isfile="true"/>
<property name="jetty.jar" isfile="true"/>
- <property name="jasper.jar" isfile="true"/>
+ <property name="jasperc.jar" isfile="true"/>
+ <property name="jasperr.jar" isfile="true"/>
</checkProperty>
</target>
@@ -249,31 +225,22 @@
========================================================================
-->
<target name="load.properties"
- depends="check.j2ee.version,properties.source,properties.target,properties.distribution"/>
+ depends="check.j2ee.version,properties,properties.target,properties.distribution"/>
<!--
========================================================================
Initialize the build. Must be called by all targets
========================================================================
-->
- <target name="init"
- depends="display.properties,check.properties.external,load.properties,check.properties.cactus">
-
- <tstamp/>
-
- <filter token="version" value="${project.version}"/>
- <filter token="year" value="${year}"/>
-
- <!-- Custom Ant task definition used in the test targets below.
- It is used for computing the "-D" parameter list
- for home directories of defined servlet engines. If a given
- property is not defined, it won't be added to the list -->
- <taskdef name="argsList" classname="org.apache.cactus.ant.ArgListTask">
+ <target name="init" depends="init.common,properties">
+ <echo>cactus.port (optional) = ${cactus.port}</echo>
+ <echo>clover.enable (optional) = ${clover.enable}</echo>
+
+ <taskdef name="argsList" classname="org.apache.cactus.ant.ArgListTask">
<classpath>
- <pathelement location="${cactus.ant.jar}"/>
+ <pathelement location="${cactus.anttasks.jar}"/>
</classpath>
</taskdef>
-
</target>
<!--
@@ -281,63 +248,120 @@
Generate the sample application
========================================================================
-->
- <target name="sample" depends="init"
+ <target name="sample.main" depends="init"
description="Generate the sample application">
<!-- Create output directory structure and copy sample files in it -->
<mkdir dir="${target.sample.dir}"/>
+ <mkdir dir="${target.sample.src.dir}"/>
+ <mkdir dir="${target.sample.lib.dir}"/>
<mkdir dir="${target.sample.build.dir}"/>
+ <mkdir dir="${target.sample.build.integration.dir}"/>
+ <mkdir dir="${target.sample.build.integration.dir.lib}"/>
+ <!--mkdir dir="${target.sample.build.dir}"/>
<mkdir dir="${target.sample.conf.dir}/test"/>
<mkdir dir="${target.sample.src.sample.dir}"/>
<mkdir dir="${target.sample.src.unit.dir}"/>
- <mkdir dir="${target.sample.web.dir}/test"/>
+ <mkdir dir="${target.sample.web.dir}/test"/-->
- <!-- Copy build files -->
- <copy todir="${target.sample.build.dir}" filtering="on">
- <fileset dir="${conf.sample.build.dir}"/>
+ <!-- Copy the Ant Integration files -->
+ <copy todir="${target.sample.build.integration.dir.lib}">
+ <fileset dir="${cactus.antintegration.bin}/lib"/>
</copy>
-
+
<!-- Copy src files -->
- <copy todir="${target.sample.src.sample.dir}">
- <fileset dir="${src.sample.dir}/share"/>
- <fileset dir="${src.sample.dir}/j2ee${j2ee.api}"/>
+ <copy todir="${target.sample.src.dir}">
+ <fileset dir="${src.dir}"/>
</copy>
- <copy todir="${target.sample.src.unit.dir}">
- <fileset dir="${src.unit.dir}/share"/>
- <fileset dir="${src.unit.dir}/j2ee${j2ee.api}"/>
+
+ <copy todir="${target.sample.lib.dir}">
+ <fileset dir="${src.lib.dir}"/>
</copy>
+
+ <copy todir="${target.sample.lib.dir}" file="${jetty.jar}"/>
+ <copy todir="${target.sample.lib.dir}" file="${jasperr.jar}"/>
+ <copy todir="${target.sample.lib.dir}" file="${jasperc.jar}"/>
+ <!-- Copy build files -->
+ <basename property="jstl.jar.name" file="${jstl.jar}"/>
+ <filter token="jstl.jar.name" value="${jstl.jar.name}"/>
+ <basename property="standard.jar.name" file="${standard.jar}"/>
+ <filter token="standard.jar.name" value="${standard.jar.name}"/>
+ <basename property="servlet.jar.name" file="${j2ee.jar}"/>
+ <filter token="servlet.jar.name" value="${servlet.jar.name}"/>
+
+ <!-- Be careful with the possible property conflict with build-common.xml -->
+ <property name="cactus.jar.name" value="${cactus.framework.jar.name}-${project.version}.jar"/>
+ <filter token="cactus.jar.name" value="${cactus.jar.name}"/>
+
+ <basename property="junit.jar.name" file="${junit.jar}"/>
+ <filter token="junit.jar.name" value="${junit.jar.name}"/>
+ <basename property="commons.logging.jar.name" file="${commons.logging.jar}"/>
+ <filter token="commons.logging.jar.name" value="${commons.logging.jar.name}"/>
+ <basename property="commons.httpclient.jar.name" file="${commons.httpclient.jar}"/>
+ <filter token="commons.httpclient.jar.name" value="${commons.httpclient.jar.name}"/>
+ <basename property="aspectjrt.jar.name" file="${aspectjrt.jar}"/>
+ <filter token="aspectjrt.jar.name" value="${aspectjrt.jar.name}"/>
+ <basename property="httpunit.jar.name" file="${httpunit.jar}"/>
+ <filter token="httpunit.jar.name" value="${httpunit.jar.name}"/>
+ <basename property="jetty.jar.name" file="${jetty.jar}"/>
+ <filter token="jetty.jar.name" value="${jetty.jar.name}"/>
+ <basename property="jasperc.jar.name" file="${jasperc.jar}"/>
+ <filter token="jasperc.jar.name" value="${jasperc.jar.name}"/>
+ <basename property="jasperr.jar.name" file="${jasperr.jar}"/>
+ <filter token="jasperr.jar.name" value="${jasperr.jar.name}"/>
+
+ <copy todir="${target.sample.dir}" filtering="on">
+ <fileset dir="${conf.sample.build.dir}"/>
+ </copy>
+
<!-- Copy conf files -->
- <copy todir="${target.sample.conf.dir}/test">
+ <copy todir="${target.sample.web.dir}/test">
<fileset dir="${conf.sample.conf.dir}/test"/>
</copy>
- <copy todir="${target.sample.conf.dir}">
+
+ <copy todir="${target.sample.web.dir}/WEB-INF" overwrite="true">
<fileset dir="${conf.sample.conf.dir}">
<include name="web.xml"/>
<include name="manifest"/>
</fileset>
</copy>
-
- <!-- Copy web files -->
- <copy todir="${target.sample.web.dir}/test">
- <fileset dir="${web.sample.dir}/test"/>
- </copy>
+
<!-- Copy the Jsp Redirector -->
<copy todir="${target.sample.web.dir}">
<fileset dir="${cactus.framework.web}"/>
</copy>
+
+
+
+ <!-- Copy conf files -->
+ <!--copy todir="${target.sample.conf.dir}">
+ <fileset dir="${conf.sample.conf.dir}">
+ <include name="web.xml"/>
+ <include name="manifest"/>
+ </fileset>
+ </copy-->
+
<!-- Copy README file -->
- <copy todir="${target.sample.dir}" file="${base.dir}/README"/>
+ <!--copy todir="${target.sample.dir}" file="${base.dir}/README"/-->
</target>
+
+ <target name="sample.clover" if="clover.enable">
+ <copy todir="${target.sample.lib.dir}" file="${clover.jar}"/>
+ </target>
+
+ <target name="sample" depends="init,sample.main,sample.clover"
+ description="Generate the sample application">
+ </target>
<!--
========================================================================
Run the full suite of tests on all defined containers.
========================================================================
-->
- <target name="test.choose.jar.clover" if="clover.enable">
+ <!--target name="test.choose.jar.clover" if="clover.enable">
<property name="cactus.framework.elected.jar"
value="${cactus.framework.clover.jar}"/>
</target>
@@ -348,9 +372,35 @@
</target>
<target name="test.choose.jar"
- depends="test.choose.jar.clover,test.choose.jar.main"/>
+ depends="test.choose.jar.clover,test.choose.jar.main"/-->
+
+ <target name="test.prepare.clover" if="clover.enable">
+
+ <property name="clover.system.parameter"
+ value="-Dcactus.framework.jar=${basedir}/${cactus.framework.clover.jar}"/>
+
+ <replace file="${target.sample.dir}/build.xml"
+ token="@cactus.clover.pathelement@">
+ <replacevalue><![CDATA[
+ <pathelement location="${clover.jar}"/>
+ ]]></replacevalue>
+ </replace>
+
+ </target>
+
+ <target name="test.prepare.noclover" unless="clover.enable">
+
+ <property name="clover.system.parameter" value=""/>
+
+ <replace file="${target.sample.dir}/build.xml"
+ token="@cactus.clover.pathelement@">
+ <replacevalue><![CDATA[]]></replacevalue>
+ </replace>
+
+ </target>
- <target name="test" depends="sample,test.choose.jar"
+ <target name="test"
+ depends="sample,test.prepare.clover,test.prepare.noclover"
description="Run the tests on all defined servers">
<argsList property="test.args.list">
@@ -369,21 +419,26 @@
<!-- Pass all required properties -->
<arg value="-Dservlet.jar=${j2ee.jar}"/>
- <arg value="-Dcactus.framework.jar=${cactus.framework.elected.jar}"/>
+ <arg value="-Dcactus.framework.jar=${cactus.framework.jar}"/>
<arg value="-Djunit.jar=${junit.jar}"/>
<arg value="-Dcommons.logging.jar=${commons.logging.jar}"/>
<arg value="-Dcommons.httpclient.jar=${commons.httpclient.jar}"/>
<arg value="-Daspectjrt.jar=${aspectjrt.jar}"/>
<arg value="-Dhttpunit.jar=${httpunit.jar}"/>
<arg value="-Djetty.jar=${jetty.jar}"/>
- <arg value="-Djasper.jar=${jasper.jar}"/>
+ <arg value="-Djasperr.jar=${jasperr.jar}"/>
+ <arg value="-Djasperc.jar=${jasperc.jar}"/>
<arg value="-Dbase.dir=${target.sample.dir}"/>
<arg value="-Dbasedir=${basedir}"/>
+
+ <!-- Override default cactus jar defined in the called script
+ by the clovered one if clover is enabled -->
+ <!--arg line="${clover.system.parameter}"/-->
<!-- Pass all optional properties -->
<arg line="${test.args.list}"/>
- <arg line="-buildfile ${target.sample.build.dir}/build.xml"/>
+ <arg line="-buildfile ${target.sample.dir}/build.xml"/>
<arg value="test"/>
<classpath>
@@ -404,35 +459,34 @@
not want in the zip -->
<target name="prepare.dist" depends="sample">
- <mkdir dir="${dist.bin.dir}"/>
+ <!--mkdir dir="${dist.bin.dir}"/>
<zip zipfile="${dist.bin.dir}/${sample.zip.name}.zip">
<fileset dir="${target.sample.dir}"/>
- </zip>
+ </zip-->
+
+ <mkdir dir="${dist.bin.dir}"/>
+ <mkdir dir="${dist.bin.dir}/${project.name.file}"/>
+
+ <copy todir="${dist.bin.dir}/${project.name.file}">
+ <fileset dir="${target.sample.dir}"/>
+ </copy>
+
+ <move file="${dist.bin.dir}/${project.name.file}/build.properties.sample"
+ tofile="${dist.bin.dir}/${project.name.file}/build.properties"/>
</target>
- <target name="dist" depends="prepare.dist,test"
- description="Generate the distributable files">
+ <target name="dist" depends="prepare.dist,test" description="Generate the distributable files">
+ <copy todir="${dist.bin.dir}/${project.name.file}">
+ <fileset dir="${target.sample.dir}">
+ <include name="build.xml"/>
+ </fileset>
+ </copy>
</target>
<!--
========================================================================
- Clean generated files (including distributables)
- Note: We don't depend on "init" as the only mandatory property that
- we need is "j2ee.jar".
- ========================================================================
- -->
- <target name="clean" depends="load.properties"
- description="Clean all generated files">
-
- <delete dir="${target.dir}"/>
- <delete dir="${dist.dir}"/>
-
- </target>
-
- <!--
- ========================================================================
Run the Clover swing report
========================================================================
-->
@@ -470,6 +524,41 @@
<property name="j2ee.jar" value="${j2ee.13.jar}"/>
</ant>
+ </target>
+
+ <!--
+ ========================================================================
+ Generate the release
+ ========================================================================
+ -->
+ <target name="release.common" depends="dist">
+
+ <mkdir dir="${release.dir}"/>
+
+ <zip destfile="${release.dir}/${main.release.name}.zip">
+ <zipfileset dir="${dist.bin.dir}/${project.name.file}"
+ prefix="${main.release.name}"/>
+ </zip>
+
+ </target>
+
+ <target name="release" depends="clean,release.common"
+ description="Generate the release files">
+
+ <mkdir dir="${release.dir}"/>
+
+ <zip destfile="${release.dir}/${main.release.name}.zip">
+ <zipfileset dir="${dist.bin.dir}/${project.name.file}"
+ prefix="${main.release.name}"/>
+ </zip>
+
+ </target>
+
+ <!-- Generate the release (for Gump). Does not clean the directories
+ because some class paths that are created by the build need to be
+ added to the Ant classpath before the build starts (because of the
+ use of build.sysclasspath=only by Gump -->
+ <target name="release.gump" depends="release.common">
</target>
<!--
1.2 +27 -18 jakarta-cactus/samples/jetty/conf/sample/build/build.properties.sample
Index: build.properties.sample
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/jetty/conf/sample/build/build.properties.sample,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.properties.sample 3 Feb 2003 08:37:38 -0000 1.1
+++ build.properties.sample 18 Apr 2003 12:30:05 -0000 1.2
@@ -17,39 +17,48 @@
# -----------------------------------------------------------------------------
# The location of the Cactus framework jar
-cactus.framework.jar = ../lib/cactus-@version@.jar
+cactus.framework.jar = build/cactus-integration-ant/lib/common/@cactus.jar.name@
-# The location of the Servlet API 2.3 jar
-servlet.jar = ../lib/servletapi-2.3.jar
-
-# The location of the AspectJ runtime jar
-aspectjrt.jar = ../lib/aspectjrt-1.0.6.jar
+# The location of the Junit jar
+junit.jar = build/cactus-integration-ant/lib/common/@junit.jar.name@
# The location of the Commons Logging jar
-commons.logging.jar = ../lib/commons-logging-1.0.1jar
-
-# The location of the log4j jar (optional). Only needed if you want Cactus to
-# generate logs
-log4j.jar = ../lib/log4j-1.2.6.jar
+commons.logging.jar = build/cactus-integration-ant/lib/common/@commons.logging.jar.name@
# The location of the Commons Httpclient jar
-commons.httpclient.jar = ../lib/commons-httpclient-2.0alpha2-20030125.jar
+commons.httpclient.jar = build/cactus-integration-ant/lib/client/@commons.httpclient.jar.name@
-# The location of the Junit jar
-junit.jar = ../lib/junit-3.8.1.jar
+# The location of the AspectJ runtime jar
+aspectjrt.jar = build/cactus-integration-ant/lib/common/@aspectjrt.jar.name@
# The location of the Httpunit jar
-httpunit.jar = ../lib/httpunit-1.4.5.jar
+httpunit.jar = build/cactus-integration-ant/lib/common/@httpunit.jar.name@
+
+# The location of the Servlet API 2.3 jar
+servlet.jar = lib/@servlet.jar.name@
+
+# The location of the JSTL jar
+jstl.jar = lib/@jstl.jar.name@
+
+# The location of the JSTL jar
+standard.jar = lib/@standard.jar.name@
# The location of the Jetty jar
-jetty.jar = ../lib/org.mortbay.jetty-jdk1.2-4.1.0RC4.jar
+jetty.jar = lib/@jetty.jar.name@
-# The location of the Jasper jar
-jasper.jar = ../lib/org.apache.jasper-4.1.0RC4.jar
+# The location of the Jasper compiler jar
+jasperc.jar = lib/@jasperc.jar.name@
+
+# The location of the Jasper runtime jar
+jasperr.jar = lib/@jasperr.jar.name@
# -----------------------------------------------------------------------------
# Optional properties
# -----------------------------------------------------------------------------
+
+# The location of the log4j jar (optional). Only needed if you want Cactus to
+# generate logs
+log4j.jar = build/cactus-integration-ant/lib/common/log4j-1.2.7.jar
# The port to use for starting the servers during unit testing. If not
# sepcified, it defaults to port 8080.
1.2 +44 -29 jakarta-cactus/samples/jetty/conf/sample/build/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/jetty/conf/sample/build/build.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.xml 3 Feb 2003 08:37:38 -0000 1.1
+++ build.xml 18 Apr 2003 12:30:05 -0000 1.2
@@ -23,11 +23,11 @@
target is "dist"
=============================================================================
-->
-<project name="Cactus Jetty Sample" default="dist" basedir="..">
+<project name="Cactus Jetty Sample" default="test" basedir=".">
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it) -->
- <property file="build/build.properties" />
+ <property file="build.properties"/>
<property file="${user.home}/build.properties" />
<!-- Global project properties -->
@@ -57,13 +57,15 @@
========================================================================
-->
<property name="src.dir" value="${base.dir}/src"/>
- <property name="src.sample.dir" value="${src.dir}/sample"/>
- <property name="src.unit.dir" value="${src.dir}/unit"/>
+ <property name="src.java.dir" value="${src.dir}/java"/>
+ <property name="src.cactus.dir" value="${src.dir}/test-cactus"/>
+ <property name="src.webapp.dir" value="${src.dir}/webapp"/>
+
<property name="build.dir" value="${base.dir}/build"/>
+ <property name="web.dir" value="${base.dir}/web"/>
<property name="conf.dir" value="${base.dir}/conf"/>
<property name="conf.test.dir" value="${conf.dir}/test"/>
- <property name="web.dir" value="${base.dir}/web"/>
-
+
<!--
========================================================================
Set the properties related to the target area
@@ -72,10 +74,8 @@
<!-- Destination locations for the build -->
<property name="target.dir" value="${base.dir}/target"/>
<property name="target.classes.dir" value="${target.dir}/classes"/>
- <property name="target.classes.sample.dir"
- value="${target.classes.dir}/sample"/>
- <property name="target.classes.unit.dir"
- value="${target.classes.dir}/unit"/>
+ <property name="target.classes.java.dir" value="${target.classes.dir}/java"/>
+ <property name="target.classes.unit.dir" value="${target.dir}/cactus"/>
<property name="target.conf.dir" value="${target.dir}/conf"/>
<property name="target.conf.client.dir" value="${target.conf.dir}/client"/>
<property name="target.conf.server.dir" value="${target.conf.dir}/server"/>
@@ -112,7 +112,7 @@
Useful patterns for targets
========================================================================
-->
- <path id="project.class.path">
+ <path id="project.classpath">
<pathelement location="${cactus.framework.jar}"/>
<pathelement location="${servlet.jar}"/>
@@ -123,12 +123,23 @@
<pathelement location="${junit.jar}"/>
<pathelement location="${aspectjrt.jar}"/>
<pathelement location="${jetty.jar}"/>
- <pathelement location="${jasper.jar}"/>
+ <pathelement location="${jasperc.jar}"/>
+ <pathelement location="${jasperr.jar}"/>
+ <pathelement location="${jstl.jar}"/>
+ <pathelement location="${standard.jar}"/>
<!-- Includes system classpath for jars that are in ANT_HOME/lib such
as aspectrt.jar, etc -->
<pathelement path="${java.class.path}"/>
</path>
+
+ <path id="cactus.classpath">
+ <pathelement location="${target.classes.java.dir}"/>
+
+ @cactus.clover.pathelement@
+
+ <path refid="project.classpath"/>
+ </path>
<!--
========================================================================
@@ -153,7 +164,10 @@
<echo message="httpunit.jar = ${httpunit.jar}"/>
<echo message="junit.jar = ${junit.jar}"/>
<echo message="jetty.jar = ${jetty.jar}"/>
- <echo message="jasper.jar = ${jasper.jar}"/>
+ <echo message="jasperr.jar = ${jasperr.jar}"/>
+ <echo message="jasperc.jar = ${jasperc.jar}"/>
+ <echo message="jstl.jar = ${jstl.jar}"/>
+ <echo message="standard.jar = ${standard.jar}"/>
<echo message=""/>
<echo message="log4j.jar (optional) = ${log4j.jar}"/>
<echo message="clover.jar (optional) = ${clover.jar}"/>
@@ -183,7 +197,8 @@
<available file="${httpunit.jar}"/>
<available file="${junit.jar}"/>
<available file="${jetty.jar}"/>
- <available file="${jasper.jar}"/>
+ <available file="${jasperc.jar}"/>
+ <available file="${jasperr.jar}"/>
</and>
</condition>
@@ -220,15 +235,15 @@
<!-- Compiles the sample sources -->
<target name="compile.sample" depends="init">
- <mkdir dir="${target.classes.sample.dir}"/>
+ <mkdir dir="${target.classes.java.dir}"/>
- <javac destdir="${target.classes.sample.dir}"
+ <javac destdir="${target.classes.java.dir}"
deprecation="${deprecation}" optimize="${optimize}">
- <src path="${src.sample.dir}"/>
+ <src path="${src.java.dir}"/>
<classpath>
- <path refid="project.class.path"/>
+ <path refid="project.classpath"/>
</classpath>
</javac>
@@ -243,10 +258,10 @@
<javac destdir="${target.classes.unit.dir}"
deprecation="${deprecation}" optimize="${optimize}">
- <src path="${src.unit.dir}"/>
+ <src path="${src.cactus.dir}"/>
<classpath>
- <path refid="project.class.path"/>
+ <path refid="cactus.classpath"/>
</classpath>
</javac>
@@ -277,7 +292,7 @@
webxml="${conf.dir}/web.xml"
manifest="${target.conf.client.dir}/manifest">
- <classes dir="${target.classes.sample.dir}">
+ <classes dir="${target.classes.java.dir}">
<!-- Do not include test files in the runtime war -->
<exclude name="**/Test*.*"/>
</classes>
@@ -314,7 +329,7 @@
<pathelement location="${src.unit.dir}"/>
</sourcepath>
- <classpath refid="project.class.path"/>
+ <classpath refid="project.classpath"/>
</javadoc>
@@ -359,8 +374,8 @@
<target name="prepare.test" depends="init">
<!-- Copy log_client.properties so that it is in the classpath -->
- <copy tofile="${target.conf.client.dir}/log4j.properties"
- file="${conf.test.dir}/log_client.properties"/>
+ <!--copy tofile="${target.conf.client.dir}/log4j.properties"
+ file="${conf.test.dir}/log_client.properties"/-->
</target>
@@ -370,24 +385,24 @@
fork="yes">
<jvmarg value="-Dcactus.contextURL=http://localhost:${test.port}/test"/>
+ <jvmarg value="-Dcactus.jetty.resourceDir=${src.webapp.dir}"/>
<jvmarg value="-Dcactus.initializer=org.apache.cactus.extension.jetty.JettyInitializer"/>
- <jvmarg value="-Dcactus.jetty.config=${conf.test.dir}/jetty.xml"/>
- <jvmarg value="-Dcactus.jetty.resourceDir=${web.dir}"/>
+ <jvmarg value="-Dcactus.jetty.config=${src.webapp.dir}/test/jetty.xml"/>
<classpath>
<!-- Cactus.propertie and log_client.properties need to be in
the classpath -->
<pathelement location="${target.conf.client.dir}"/>
- <pathelement location="${target.classes.sample.dir}"/>
<pathelement location="${target.classes.unit.dir}"/>
- <path refid="project.class.path"/>
+ <pathelement location="${target.classes.java.dir}"/>
+ <path refid="project.classpath"/>
</classpath>
<formatter type="plain" usefile="false"/>
<!-- Note: The unit tests must be run first. See
org.apache.cactus.unit.TestAll for details -->
- <test name="org.apache.cactus.unit.TestAll"/>
+ <!--test name="org.apache.cactus.sample.unit.TestAll"/-->
<test name="org.apache.cactus.sample.TestAll"/>
</junit>
1.2 +26 -3 jakarta-cactus/samples/jetty/conf/sample/conf/test/jetty.xml
Index: jetty.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/jetty/conf/sample/conf/test/jetty.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jetty.xml 3 Feb 2003 08:37:38 -0000 1.1
+++ jetty.xml 18 Apr 2003 12:30:05 -0000 1.2
@@ -42,7 +42,30 @@
<Arg>value2 used for testing</Arg>
</Call>
</Call>
-
+
+ <Call name="addServlet">
+ <Arg>/ServletRedirectorSecure</Arg>
+ <Arg>org.apache.cactus.server.ServletTestRedirector</Arg>
+ </Call>
+
+ <Call name="setRealm">
+ <Arg>
+ <New class="org.mortbay.http.HashUserRealm"/>
+ </Arg>
+ </Call>
+
+ <Call name="getRealm">
+ <Call name="put">
+ <Arg>testuser</Arg>
+ <Arg>testpassword</Arg>
+ </Call>
+ <Call name="addUserToRole">
+ <Arg>testuser</Arg>
+ <Arg>test</Arg>
+ </Call>
+ </Call>
</Call>
-
-</Configure>
\ No newline at end of file
+</Configure>
+
+
+
\ No newline at end of file
1.2 +31 -0 jakarta-cactus/samples/jetty/conf/sample/conf/web.xml
Index: web.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/jetty/conf/sample/conf/web.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- web.xml 3 Feb 2003 08:37:37 -0000 1.1
+++ web.xml 18 Apr 2003 12:30:05 -0000 1.2
@@ -6,4 +6,35 @@
<web-app>
+ <!-- Authentication -->
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>SecurityRestriction</web-resource-name>
+ <description>Protect the Cactus redirector servlet.</description>
+ <url-pattern>/ServletRedirectorSecure</url-pattern>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <description>Authorized Users Group</description>
+ <role-name>test</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>NONE</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>Sample Cactus Servlet Application</realm-name>
+ </login-config>
+
+ <security-role>
+ <description>Test role</description>
+ <role-name>test</role-name>
+ </security-role>
+
+ <!-- End Authentication -->
+
</web-app>
---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org