vmassol 2003/10/23 05:27:43
Modified: . build-common.xml build.properties.sample build.xml
integration/ant/src/java/org/apache/cactus/integration/ant/container/jboss
JBoss3xContainer.java
integration/ant/src/test/org/apache/cactus/integration/ant/container
MockContainer.java TestContainerRunner.java
samples/ejb/src/scripts/share build.xml
samples/servlet build.properties.sample build.xml
samples/ejb/src/scripts/j2ee13 build.properties
integration/ant/src/java/org/apache/cactus/integration/ant/container
AbstractContainer.java Container.java
ContainerWrapper.java ContainerRunner.java
samples/jetty build.xml build.properties.sample
samples/servlet/src/scripts/share build.xml
integration/ant/src/java/org/apache/cactus/integration/ant
CactusTask.java
samples/ejb/src/application/j2ee13/cactus application.xml
samples/ejb/src/application/j2ee12/cactus application.xml
samples/ejb/src/scripts/j2ee12 build.properties
Log:
- made sure to not package the J2EE jars in the Cactus distribution (as they are not
redistributables)
- separated j2ee jars from servlet jars for all projects.
- exposed a new startUpWait attribute for nested <container> in the <cactus> Ant
task. This is a temporary hack while waiting for a good solution to know when a JBoss
container has completely finished starting
- increased startUpWait to 2 seconds for the ejb sample project (default was 1
second) as I've had problems with 1 second.
- gave better names to deployed cactified files (instead of test.ear and test.war,
which BTW was causing conflicts when using jboss as both the servlet sample and the
ejb sample were using the /test servlet context and we do not have yet a specific
jboss deployment per project)
Revision Changes Path
1.33 +6 -1 jakarta-cactus/build-common.xml
Index: build-common.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/build-common.xml,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- build-common.xml 13 Sep 2003 13:06:36 -0000 1.32
+++ build-common.xml 23 Oct 2003 12:27:42 -0000 1.33
@@ -74,10 +74,14 @@
<target name="init.j2ee"
if="j2ee.dependant">
+ <!-- TODO: Improve this. We really need to split j2ee and servlet
+ verifications now that we have an EJB sample project. -->
+
<condition property="j2ee.api" value="13">
<available classname="javax.servlet.Filter">
<classpath>
<pathelement location="${j2ee.jar}"/>
+ <pathelement location="${servlet.jar}"/>
</classpath>
</available>
</condition>
@@ -85,6 +89,7 @@
<available classname="javax.servlet.Servlet">
<classpath>
<pathelement location="${j2ee.jar}"/>
+ <pathelement location="${servlet.jar}"/>
</classpath>
</available>
</condition>
1.87 +14 -2 jakarta-cactus/build.properties.sample
Index: build.properties.sample
===================================================================
RCS file: /home/cvs/jakarta-cactus/build.properties.sample,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- build.properties.sample 20 Oct 2003 21:26:21 -0000 1.86
+++ build.properties.sample 23 Oct 2003 12:27:42 -0000 1.87
@@ -64,6 +64,14 @@
xmlapis.jar = ${lib.repo}/xerces/jars/xmlParserAPIs-2.2.1.jar
# -----------------------------------------------------------------------------
+# Mandatory properties for the Sample Servlet project.
+# -----------------------------------------------------------------------------
+
+# Location of the Servlet API jar.
+servlet.jar = ${lib.repo}/servletapi/jars/servletapi-2.3.jar
+#servlet.jar = ${lib.repo}/servletapi/jars/servletapi-2.2.jar
+
+# -----------------------------------------------------------------------------
# Mandatory properties for the Eclipse plugin ant the Jetty Sample
# -----------------------------------------------------------------------------
# The Jetty container is packaged in the Eclipse plugin and is used as the
@@ -111,9 +119,13 @@
# Optional properties for the main Cactus build
# -----------------------------------------------------------------------------
-# Locations J2EE APIs for the "*.all" targets
+# Location of J2EE API jars for the "*.all" targets
j2ee.12.jar = ${lib.repo}/j2ee/jars/j2ee-1.2.jar
j2ee.13.jar = ${lib.repo}/j2ee/jars/j2ee-1.3.jar
+
+# Location of Servlet API jars for the "*.all" targets
+servlet.22.jar = ${lib.repo}/servletapi/jars/servletapi-2.2.jar
+servlet.23.jar = ${lib.repo}/servletapi/jars/servletapi-2.3.jar
# -----------------------------------------------------------------------------
# Optional properties share by several subprojects
1.65 +35 -10 jakarta-cactus/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/build.xml,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- build.xml 13 Sep 2003 13:06:36 -0000 1.64
+++ build.xml 23 Oct 2003 12:27:42 -0000 1.65
@@ -46,21 +46,25 @@
<ant antfile="framework/build.xml" inheritAll="false"
target="dist">
<property name="j2ee.jar" value="${j2ee.12.jar}"/>
+ <property name="servlet.jar" value=""/>
<property name="clover.enable" value="true"/>
</ant>
<ant antfile="framework/build.xml" inheritAll="false"
target="dist">
<property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="servlet.jar" value=""/>
<property name="clover.enable" value="true"/>
</ant>
<ant antfile="integration/ant/build.xml" inheritAll="false"
target="dist">
<property name="j2ee.jar" value="${j2ee.12.jar}"/>
+ <property name="servlet.jar" value=""/>
<property name="clover.enable" value="true"/>
</ant>
<ant antfile="integration/ant/build.xml" inheritAll="false"
target="dist">
<property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="servlet.jar" value=""/>
<property name="clover.enable" value="true"/>
</ant>
<ant antfile="integration/eclipse/org.apache.cactus.eclipse.webapp/build.xml"
@@ -69,29 +73,35 @@
<ant antfile="integration/eclipse/org.apache.cactus.eclipse.runner/build.xml"
inheritAll="false" target="dist">
<property name="j2ee.jar" value="${j2ee.12.jar}"/>
+ <property name="servlet.jar" value=""/>
</ant>
<ant antfile="integration/eclipse/org.apache.cactus.eclipse.runner/build.xml"
inheritAll="false" target="dist">
<property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="servlet.jar" value=""/>
</ant>
<ant antfile="samples/servlet/build.xml" inheritAll="false"
target="dist">
- <property name="j2ee.jar" value="${j2ee.12.jar}"/>
+ <property name="servlet.jar" value="${servlet.22.jar}"/>
+ <property name="j2ee.jar" value=""/>
<property name="clover.enable" value="true"/>
</ant>
<ant antfile="samples/servlet/build.xml" inheritAll="false"
target="dist">
- <property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="servlet.jar" value="${servlet.23.jar}"/>
+ <property name="j2ee.jar" value=""/>
<property name="clover.enable" value="true"/>
</ant>
<ant antfile="samples/jetty/build.xml" inheritAll="false"
target="dist">
- <property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="servlet.jar" value="${servlet.23.jar}"/>
+ <property name="j2ee.jar" value=""/>
<property name="clover.enable" value="true"/>
</ant>
<ant antfile="samples/ejb/build.xml" inheritAll="false"
target="dist">
<property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="servlet.jar" value=""/>
<property name="clover.enable" value="true"/>
</ant>
<ant antfile="documentation/build.xml" inheritAll="false"
@@ -113,12 +123,14 @@
<antcall target="release.j2ee12" inheritall="no">
<param name="j2ee.dependant" value="true"/>
- <param name="j2ee.jar" location="${j2ee.12.jar}"/>
+ <param name="servlet.jar" location="${servlet.22.jar}"/>
+ <param name="j2ee.jar" location=""/>
<param name="release.dir" location="release"/>
</antcall>
<antcall target="release.j2ee13" inheritall="no">
<param name="j2ee.dependant" value="true"/>
- <param name="j2ee.jar" location="${j2ee.13.jar}"/>
+ <param name="servlet.jar" location="${servlet.23.jar}"/>
+ <param name="j2ee.jar" location=""/>
<param name="release.dir" location="release"/>
</antcall>
<antcall target="release.src"/>
@@ -135,6 +147,9 @@
<target name="release.shared"
depends="init.properties, release.prepare">
+ <!-- Note: We don't bundle the J2EE jar as its license does not
+ allow it to be redistributable -->
+
<zip destfile="${release.dir}/tmp.zip">
<zipfileset dir="documentation/dist/doc"
prefix="${main.release.name}/doc">
@@ -158,7 +173,7 @@
prefix="${main.release.name}/lib"/>
<zipfileset file="${nekohtml.jar}"
prefix="${main.release.name}/lib"/>
- <zipfileset file="${j2ee.jar}"
+ <zipfileset file="${servlet.jar}"
prefix="${main.release.name}/lib"/>
<zipfileset dir="${cactus.samples.servlet.bin}"
prefix="${main.release.name}/samples/servlet">
@@ -244,18 +259,22 @@
<ant antfile="framework/build.xml" inheritAll="false"
target="clean">
<property name="j2ee.jar" value="${j2ee.12.jar}"/>
+ <property name="servlet.jar" value=""/>
</ant>
<ant antfile="framework/build.xml" inheritAll="false"
target="clean">
<property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="servlet.jar" value=""/>
</ant>
<ant antfile="integration/ant/build.xml" inheritAll="false"
target="clean">
<property name="j2ee.jar" value="${j2ee.12.jar}"/>
+ <property name="servlet.jar" value=""/>
</ant>
<ant antfile="integration/ant/build.xml" inheritAll="false"
target="clean">
<property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="servlet.jar" value=""/>
</ant>
<ant antfile="integration/eclipse/org.apache.cactus.eclipse.webapp/build.xml"
inheritAll="false" target="clean">
@@ -263,26 +282,32 @@
<ant antfile="integration/eclipse/org.apache.cactus.eclipse.runner/build.xml"
inheritAll="false" target="clean">
<property name="j2ee.jar" value="${j2ee.12.jar}"/>
+ <property name="servlet.jar" value=""/>
</ant>
<ant antfile="integration/eclipse/org.apache.cactus.eclipse.runner/build.xml"
inheritAll="false" target="clean">
<property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="servlet.jar" value=""/>
</ant>
<ant antfile="samples/servlet/build.xml" inheritAll="false"
target="clean">
- <property name="j2ee.jar" value="${j2ee.12.jar}"/>
+ <property name="servlet.jar" value="${servlet.22.jar}"/>
+ <property name="j2ee.jar" value=""/>
</ant>
<ant antfile="samples/servlet/build.xml" inheritAll="false"
target="clean">
- <property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="servlet.jar" value="${servlet.23.jar}"/>
+ <property name="j2ee.jar" value=""/>
</ant>
<ant antfile="samples/jetty/build.xml" inheritAll="false"
target="clean">
- <property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="servlet.jar" value="${servlet.23.jar}"/>
+ <property name="j2ee.jar" value=""/>
</ant>
<ant antfile="samples/ejb/build.xml" inheritAll="false"
target="clean">
<property name="j2ee.jar" value="${j2ee.13.jar}"/>
+ <property name="servlet.jar" value=""/>
</ant>
<ant antfile="documentation/build.xml" inheritAll="false"
target="clean"/>
1.9 +2 -3
jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/jboss/JBoss3xContainer.java
Index: JBoss3xContainer.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/jboss/JBoss3xContainer.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- JBoss3xContainer.java 7 Sep 2003 19:54:37 -0000 1.8
+++ JBoss3xContainer.java 23 Oct 2003 12:27:42 -0000 1.9
@@ -78,7 +78,6 @@
*/
public class JBoss3xContainer extends AbstractJavaContainer
{
-
// Instance Variables ------------------------------------------------------
/**
@@ -164,7 +163,7 @@
{
return this.port;
}
-
+
/**
* @see org.apache.cactus.integration.ant.container.Container#init
*/
1.9 +9 -2
jakarta-cactus/integration/ant/src/test/org/apache/cactus/integration/ant/container/MockContainer.java
Index: MockContainer.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/integration/ant/src/test/org/apache/cactus/integration/ant/container/MockContainer.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- MockContainer.java 19 Oct 2003 18:08:43 -0000 1.8
+++ MockContainer.java 23 Oct 2003 12:27:42 -0000 1.9
@@ -73,7 +73,6 @@
*/
public final class MockContainer implements Container
{
-
// Instance Variables ------------------------------------------------------
/**
@@ -132,6 +131,14 @@
return null;
}
+ /**
+ * @see Container#getStartUpWait()
+ */
+ public long getStartUpWait()
+ {
+ return 0;
+ }
+
/**
* @see Container#getPort()
*/
1.4 +1 -5
jakarta-cactus/integration/ant/src/test/org/apache/cactus/integration/ant/container/TestContainerRunner.java
Index: TestContainerRunner.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/integration/ant/src/test/org/apache/cactus/integration/ant/container/TestContainerRunner.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestContainerRunner.java 26 May 2003 13:27:20 -0000 1.3
+++ TestContainerRunner.java 23 Oct 2003 12:27:42 -0000 1.4
@@ -179,7 +179,6 @@
new URL("http", "localhost", this.server.getPort(), "/test"));
runner.setTimeout(0);
runner.setCheckInterval(250);
- runner.setStartUpWait(0);
runner.setShutDownWait(0);
runner.startUpContainer();
runner.shutDownContainer();
@@ -204,7 +203,6 @@
new URL("http", "localhost", this.server.getPort(), "/test"));
runner.setTimeout(0);
runner.setCheckInterval(250);
- runner.setStartUpWait(0);
runner.setShutDownWait(0);
try
{
@@ -238,7 +236,6 @@
new URL("http", "localhost", this.server.getPort(), "/test"));
runner.setTimeout(5000);
runner.setCheckInterval(250);
- runner.setStartUpWait(0);
runner.setShutDownWait(0);
long startTime = System.currentTimeMillis();
try
@@ -283,7 +280,6 @@
new URL("http", "localhost", this.server.getPort(), "/test"));
runner.setTimeout(0);
runner.setCheckInterval(250);
- runner.setStartUpWait(0);
runner.setShutDownWait(0);
runner.startUpContainer();
runner.shutDownContainer();
1.4 +9 -7 jakarta-cactus/samples/ejb/src/scripts/share/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/ejb/src/scripts/share/build.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- build.xml 21 Oct 2003 20:03:22 -0000 1.3
+++ build.xml 23 Oct 2003 12:27:43 -0000 1.4
@@ -30,7 +30,7 @@
<!-- Global project properties -->
<property name="project.name.text" value="Cactus EJB Sample"/>
- <property name="project.name.file" value="sample-ejb"/>
+ <property name="project.name.file" value="cactus-sample-ejb"/>
<property name="project.version" value="@version@"/>
<!-- Prefix to add to all distributable files -->
@@ -44,7 +44,8 @@
<!-- Properties for the Cactus tests -->
<property name="cactus.port" value="8080"/>
-
+ <property name="cactus.jboss.startUpWait" value="2000"/>
+
<!--
========================================================================
Set the properties related to the source tree.
@@ -241,7 +242,7 @@
<!-- Cactify the web-app archive -->
<cactifywar srcfile="${target.dir}/${project.name.file}.war"
- destfile="${target.dir}/test.war"
+ destfile="${target.dir}/${project.name.file}-cactified.war"
mergewebxml="${src.webapp.dir}/WEB-INF/cactus-web.xml">
<classes dir="${target.classes.cactus.dir}"/>
<!-- Needed for Clover coverage reports -->
@@ -249,11 +250,11 @@
</cactifywar>
<!-- Cactify the EAR -->
- <ear earfile="${target.dir}/test.ear"
+ <ear earfile="${target.dir}/${project.name.file}-cactified.ear"
appxml="${src.application.dir}/cactus/application.xml">
<zipfileset excludes="META-INF/application.xml"
src="${target.dir}/${project.name.file}.ear"/>
- <fileset file="${target.dir}/test.war"/>
+ <fileset file="${target.dir}/${project.name.file}-cactified.war"/>
</ear>
</target>
@@ -278,8 +279,8 @@
description="Run the tests on the defined containers">
<!-- Run the tests -->
- <cactus earfile="${target.dir}/test.ear" fork="yes"
- failureproperty="tests.failed">
+ <cactus earfile="${target.dir}/${project.name.file}-cactified.ear"
+ fork="yes" failureproperty="tests.failed">
<classpath>
<path refid="project.classpath"/>
<@[EMAIL PROTECTED] location="${clover.jar}"[EMAIL PROTECTED]@>
@@ -288,6 +289,7 @@
</classpath>
<containerset>
<@[EMAIL PROTECTED] if="cactus.home.jboss3x"
+ startUpWait="${cactus.jboss.startUpWait}"
dir="${cactus.home.jboss3x}"
output="${target.testreports.dir}/jboss3x.out"
todir="${target.testreports.dir}/jboss3x"[EMAIL PROTECTED]@>
1.16 +9 -5 jakarta-cactus/samples/servlet/build.properties.sample
Index: build.properties.sample
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/servlet/build.properties.sample,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- build.properties.sample 20 Oct 2003 21:26:22 -0000 1.15
+++ build.properties.sample 23 Oct 2003 12:27:43 -0000 1.16
@@ -21,10 +21,6 @@
# below. You do not have to put all the external jars in a single location.
lib.repo = c:/apps/maven/repository
-# The location of the J2EE API jar. Depending on the version (1.2 or 1.3) of
-# it, the corresponding Cactus Sample will be built.
-j2ee.jar = ${lib.repo}/servletapi/jars/servletapi-2.3.jar
-
# The location of the JSTL jar
jstl.jar = ${lib.repo}/jstl/jars/jstl-1.0.2.jar
@@ -33,6 +29,14 @@
# The location of the log4j jar
log4j.jar = ${lib.repo}/log4j/jars/log4j-1.2.8.jar
+
+# -----------------------------------------------------------------------------
+# Mandatory properties for the Sample Servlet project.
+# -----------------------------------------------------------------------------
+
+# Location of the Servlet API jar.
+servlet.jar = ${lib.repo}/servletapi/jars/servletapi-2.3.jar
+#servlet.jar = ${lib.repo}/servletapi/jars/servletapi-2.2.jar
# -----------------------------------------------------------------------------
# Optional properties
1.39 +5 -5 jakarta-cactus/samples/servlet/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/servlet/build.xml,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- build.xml 20 Oct 2003 21:16:13 -0000 1.38
+++ build.xml 23 Oct 2003 12:27:43 -0000 1.39
@@ -127,7 +127,7 @@
<!-- Copy scripts -->
<basename property="jstl.jar.name" file="${jstl.jar}"/>
<basename property="standard.jar.name" file="${standard.jar}"/>
- <basename property="servlet.jar.name" file="${j2ee.jar}"/>
+ <basename property="servlet.jar.name" file="${servlet.jar}"/>
<basename property="aspectjrt.jar.name" file="${aspectjrt.jar}"/>
<basename property="commons.httpclient.jar.name"
file="${commons.httpclient.jar}"/>
@@ -172,7 +172,7 @@
<echo> commons.httpclient.jar = [${commons.httpclient.jar}]</echo>
<echo> commons.logging.jar = [${commons.logging.jar}]</echo>
<echo> httpunit.jar = [${httpunit.jar}]</echo>
- <echo> j2ee.jar = [${j2ee.jar}]</echo>
+ <echo> servlet.jar = [${servlet.jar}]</echo>
<echo> junit.jar = [${junit.jar}]</echo>
<echo> log4j.jar = [${log4j.jar}]</echo>
<echo> nekohtml.jar = [${nekohtml.jar}]</echo>
@@ -194,7 +194,7 @@
<available file="${commons.httpclient.jar}"/>
<available file="${commons.logging.jar}"/>
<available file="${httpunit.jar}"/>
- <available file="${j2ee.jar}"/>
+ <available file="${servlet.jar}"/>
<available file="${log4j.jar}"/>
<or>
<not>
@@ -348,7 +348,7 @@
location="${target.test.dir}/test-reports"/>
<property name="cactus.jar" location="${test.cactus.jar}"/>
<property name="cactus.ant.jar" location="${test.cactus.ant.jar}"/>
- <property name="servlet.jar" value="${j2ee.jar}"/>
+ <property name="servlet.jar" value="${servlet.jar}"/>
<property name="clover.jar" value="${clover.jar}"/>
</ant>
1.3 +5 -3 jakarta-cactus/samples/ejb/src/scripts/j2ee13/build.properties
Index: build.properties
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/ejb/src/scripts/j2ee13/build.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.properties 13 Sep 2003 12:24:11 -0000 1.2
+++ build.properties 23 Oct 2003 12:27:43 -0000 1.3
@@ -16,8 +16,10 @@
# Mandatory properties
# -----------------------------------------------------------------------------
-# The location of the J2EE 1.3 jar
-j2ee.jar = [EMAIL PROTECTED]@
+# The location of the J2EE 1.3 jar. Note: The J2EE jar from Sun is not
+# redistributable. Hence the reason we're not providing it in the Cactus
+# distribution. You'll need to download it manually and put it in
+# [EMAIL PROTECTED]@
# -----------------------------------------------------------------------------
# Optional properties
1.10 +33 -2
jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/AbstractContainer.java
Index: AbstractContainer.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/AbstractContainer.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- AbstractContainer.java 19 Oct 2003 18:08:43 -0000 1.9
+++ AbstractContainer.java 23 Oct 2003 12:27:43 -0000 1.10
@@ -136,10 +136,33 @@
* List of system properties to set in the container JVM.
*/
private Variable[] systemProperties;
-
+
+ /**
+ * The time to sleep after the container has started up.
+ */
+ private long startUpWait = 1000;
+
// Public Methods ----------------------------------------------------------
/**
+ * Sets the time to wait after the container has been started up.
+ *
+ * The default time is 1 second.
+ *
+ * Note: This is a hack while waiting for container specific solutions
+ * that tell exactly when the server is started or not. ATM, the only known
+ * issue is with JBoss, where the servlet engine is started before the full
+ * JBoss is started and thus it may happen that we try to shutdown JBoss
+ * before it has finished starting, leading to an exception.
+ *
+ * @param theStartUpWait The time to wait in milliseconds
+ */
+ public void setStartUpWait(long theStartUpWait)
+ {
+ this.startUpWait = theStartUpWait;
+ }
+
+ /**
* Creates a nested exclude element that is added to the pattern set.
*
* @return The created exclude element
@@ -192,6 +215,14 @@
}
// Container Implementation ------------------------------------------------
+
+ /**
+ * @see Container#getStartUpWait
+ */
+ public long getStartUpWait()
+ {
+ return this.startUpWait;
+ }
/**
* @see Container#getToDir
1.7 +6 -1
jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/Container.java
Index: Container.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/Container.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Container.java 19 Oct 2003 18:08:43 -0000 1.6
+++ Container.java 23 Oct 2003 12:27:43 -0000 1.7
@@ -91,6 +91,11 @@
int getPort();
/**
+ * @return the time to wait after the container has been started up.
+ */
+ long getStartUpWait();
+
+ /**
* Returns the value of the 'todir' attribute.
*
* @return The output directory
1.8 +9 -1
jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/ContainerWrapper.java
Index: ContainerWrapper.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/ContainerWrapper.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ContainerWrapper.java 19 Oct 2003 18:08:43 -0000 1.7
+++ ContainerWrapper.java 23 Oct 2003 12:27:43 -0000 1.8
@@ -107,6 +107,14 @@
}
/**
+ * @see Container#getStartUpWait()
+ */
+ public long getStartUpWait()
+ {
+ return container.getStartUpWait();
+ }
+
+ /**
* @see Container#getPort
*/
public int getPort()
1.6 +3 -20
jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/ContainerRunner.java
Index: ContainerRunner.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/ContainerRunner.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ContainerRunner.java 19 Oct 2003 18:08:43 -0000 1.5
+++ ContainerRunner.java 23 Oct 2003 12:27:43 -0000 1.6
@@ -99,11 +99,6 @@
private long checkInterval = 500;
/**
- * The time to sleep after the container has started up.
- */
- private long startUpWait = 1000;
-
- /**
* The time to sleep after the container has shut down.
*/
private long shutDownWait = 2000;
@@ -206,7 +201,7 @@
} while (!isAvailable(responseCode));
// Wait a few ms more (just to be sure !)
- sleep(this.startUpWait);
+ sleep(this.container.getStartUpWait());
this.serverName = retrieveServerName(this.url);
this.log.trace("Server '" + this.serverName + "' started");
@@ -239,7 +234,7 @@
return;
}
- // Call the target that starts the server, in another thread. The called
+ // Call the target that stops the server, in another thread. The called
// target must be blocking.
Thread thread = new Thread(new Runnable()
{
@@ -294,18 +289,6 @@
public void setShutDownWait(long theShutDownWait)
{
this.shutDownWait = theShutDownWait;
- }
-
- /**
- * Sets the time to wait after the container has been started up.
- *
- * The default time is 1 second.
- *
- * @param theStartUpWait The time to wait in milliseconds
- */
- public void setStartUpWait(long theStartUpWait)
- {
- this.startUpWait = theStartUpWait;
}
/**
1.17 +4 -5 jakarta-cactus/samples/jetty/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/jetty/build.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- build.xml 14 Jul 2003 10:10:36 -0000 1.16
+++ build.xml 23 Oct 2003 12:27:43 -0000 1.17
@@ -84,7 +84,7 @@
<echo> commons.httpclient.jar = [${commons.httpclient.jar}]</echo>
<echo> commons.logging.jar = [${commons.logging.jar}]</echo>
<echo> httpunit.jar = [${httpunit.jar}]</echo>
- <echo> j2ee.jar = [${j2ee.jar}]</echo>
+ <echo> servlet.jar = [${servlet.jar}]</echo>
<echo> junit.jar = [${junit.jar}]</echo>
<echo> nekohtml.jar = [${nekohtml.jar}]</echo>
<echo> jetty.jar = [${jetty.jar}]</echo>
@@ -104,7 +104,7 @@
<available file="${commons.httpclient.jar}"/>
<available file="${commons.logging.jar}"/>
<available file="${httpunit.jar}"/>
- <available file="${j2ee.jar}"/>
+ <available file="${servlet.jar}"/>
<available file="${jetty.jar}"/>
<available file="${jasper-compiler.jar}"/>
<available file="${jasper-runtime.jar}"/>
@@ -178,7 +178,7 @@
<!-- Copy build file -->
<filter token="cactus.jar.name" value="${cactus.jar.name}.jar"/>
- <basename property="servlet.jar.name" file="${j2ee.jar}"/>
+ <basename property="servlet.jar.name" file="${servlet.jar}"/>
<filter token="servlet.jar.name" value="${servlet.jar.name}"/>
<basename property="junit.jar.name" file="${junit.jar}"/>
<filter token="junit.jar.name" value="${junit.jar.name}"/>
@@ -227,7 +227,6 @@
location="${target.sample.src.cactus.dir}"/>
<property name="src.webapp.dir"
location="${target.sample.src.webapp.dir}"/>
- <property name="servlet.jar" value="${j2ee.jar}"/>
</ant>
</target>
1.15 +6 -8 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.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- build.properties.sample 20 Oct 2003 21:26:22 -0000 1.14
+++ build.properties.sample 23 Oct 2003 12:27:43 -0000 1.15
@@ -21,12 +21,6 @@
# below. You do not have to put all the external jars in a single location.
lib.repo = c:/apps/maven/repository
-# The location of the J2EE API jar. Depending on the version (1.2 or 1.3) of
-# it, the corresponding Cactus Framework will be built. For example if you use
-# J2EE 1.3 jar, then the Cactus jar will contain the Filter Redirector which is
-# only available for Servlet 2.3 (part of J2EE 1.3).
-j2ee.jar = ${lib.repo}/servletapi/jars/servletapi-2.3.jar
-
# The location of the AspectJ runtime jar
aspectjrt.jar = ${lib.repo}/aspectj/jars/aspectjrt-1.0.6.jar
@@ -46,8 +40,12 @@
httpunit.jar = ${lib.repo}/httpunit/jars/httpunit-1.5.3.jar
# -----------------------------------------------------------------------------
-# Mandatory properties for the Jetty Sample
+# Mandatory properties for the Sample Jetty project.
# -----------------------------------------------------------------------------
+
+# Location of the Servlet API jar.
+servlet.jar = ${lib.repo}/servletapi/jars/servletapi-2.3.jar
+#servlet.jar = ${lib.repo}/servletapi/jars/servletapi-2.2.jar
# The location of the Jetty jar
jetty.jar = ${lib.repo}/jetty/jars/org.mortbay.jetty-4.2.11.jar
1.26 +4 -4 jakarta-cactus/samples/servlet/src/scripts/share/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/servlet/src/scripts/share/build.xml,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- build.xml 19 Oct 2003 18:15:31 -0000 1.25
+++ build.xml 23 Oct 2003 12:27:43 -0000 1.26
@@ -30,7 +30,7 @@
<!-- Global project properties -->
<property name="project.name.text" value="Cactus Servlet Sample"/>
- <property name="project.name.file" value="sample-servlet"/>
+ <property name="project.name.file" value="cactus-sample-servlet"/>
<property name="project.version" value="@version@"/>
<!-- Prefix to add to all distributable files -->
@@ -271,7 +271,7 @@
<!-- Cactify the web-app archive -->
<cactifywar srcfile="${target.dir}/${project.name.file}.war"
- destfile="${target.dir}/test.war"
+ destfile="${target.dir}/${project.name.file}-cactified.war"
mergewebxml="${src.webapp.dir}/WEB-INF/cactus-web.xml">
<classes dir="${target.classes.cactus.dir}"/>
<lib file="${httpunit.jar}"/>
@@ -312,8 +312,8 @@
description="Run the tests on the defined containers">
<!-- Run the tests -->
- <cactus warfile="${target.dir}/test.war" fork="yes"
- failureproperty="tests.failed" haltonerror="true">
+ <cactus warfile="${target.dir}/${project.name.file}-cactified.war"
+ fork="yes" failureproperty="tests.failed" haltonerror="true">
<!-- Configure the cactus task for logging -->
<cactusproperty server="false"
1.24 +2 -2
jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/CactusTask.java
Index: CactusTask.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/CactusTask.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- CactusTask.java 19 Oct 2003 18:08:43 -0000 1.23
+++ CactusTask.java 23 Oct 2003 12:27:43 -0000 1.24
@@ -329,7 +329,7 @@
}
}
}
-
+
// Private Methods ---------------------------------------------------------
/**
1.2 +2 -2
jakarta-cactus/samples/ejb/src/application/j2ee13/cactus/application.xml
Index: application.xml
===================================================================
RCS file:
/home/cvs/jakarta-cactus/samples/ejb/src/application/j2ee13/cactus/application.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- application.xml 13 Sep 2003 12:11:43 -0000 1.1
+++ application.xml 23 Oct 2003 12:27:43 -0000 1.2
@@ -16,8 +16,8 @@
</module>
<module>
<web>
- <web-uri>test.war</web-uri>
- <context-root>/test</context-root>
+ <web-uri>@[EMAIL PROTECTED]</web-uri>
+ <context-root>[EMAIL PROTECTED]@</context-root>
</web>
</module>
</application>
1.2 +2 -2
jakarta-cactus/samples/ejb/src/application/j2ee12/cactus/application.xml
Index: application.xml
===================================================================
RCS file:
/home/cvs/jakarta-cactus/samples/ejb/src/application/j2ee12/cactus/application.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- application.xml 13 Sep 2003 12:11:43 -0000 1.1
+++ application.xml 23 Oct 2003 12:27:43 -0000 1.2
@@ -16,8 +16,8 @@
</module>
<module>
<web>
- <web-uri>test.war</web-uri>
- <context-root>test</context-root>
+ <web-uri>@[EMAIL PROTECTED]</web-uri>
+ <context-root>[EMAIL PROTECTED]@</context-root>
</web>
</module>
</application>
1.3 +5 -2 jakarta-cactus/samples/ejb/src/scripts/j2ee12/build.properties
Index: build.properties
===================================================================
RCS file: /home/cvs/jakarta-cactus/samples/ejb/src/scripts/j2ee12/build.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.properties 13 Sep 2003 12:24:11 -0000 1.2
+++ build.properties 23 Oct 2003 12:27:43 -0000 1.3
@@ -16,7 +16,10 @@
# Mandatory properties
# -----------------------------------------------------------------------------
-# The location of the J2EE 1.2 jar
+# The location of the J2EE 1.2 jar. Note: The J2EE jar from Sun is not
+# redistributable. Hence the reason we're not providing it in the Cactus
+# distribution. You'll need to download it manually and put it in
+# [EMAIL PROTECTED]@
j2ee.jar = [EMAIL PROTECTED]@
# -----------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]