You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ni...@apache.org on 2005/05/06 04:47:11 UTC

svn commit: r168502 - /struts/core/branches/STRUTS_1_2_BRANCH/build-tests.xml /struts/core/branches/STRUTS_1_2_BRANCH/build.properties.sample /struts/core/branches/STRUTS_1_2_BRANCH/build.xml

Author: niallp
Date: Thu May  5 19:47:10 2005
New Revision: 168502

URL: http://svn.apache.org/viewcvs?rev=168502&view=rev
Log:
Simlify Cactus test properties

* change build-tests.xml so that jars are copied from ${cactus.home} automatically without having to specify individual version numbers/names in the properties file.
* Add junit to the automatic download (all Cactus versions need to be run with junit 3.8.1 minimum).
* add a new (simplified) sample properties file for using the automatic jar download


Modified:
    struts/core/branches/STRUTS_1_2_BRANCH/build-tests.xml
    struts/core/branches/STRUTS_1_2_BRANCH/build.properties.sample
    struts/core/branches/STRUTS_1_2_BRANCH/build.xml

Modified: struts/core/branches/STRUTS_1_2_BRANCH/build-tests.xml
URL: http://svn.apache.org/viewcvs/struts/core/branches/STRUTS_1_2_BRANCH/build-tests.xml?rev=168502&r1=168501&r2=168502&view=diff
==============================================================================
--- struts/core/branches/STRUTS_1_2_BRANCH/build-tests.xml (original)
+++ struts/core/branches/STRUTS_1_2_BRANCH/build-tests.xml Thu May  5 19:47:10 2005
@@ -93,6 +93,21 @@
     <!-- Output directory for tests -->
     <property name="out.test.dir" value="${build.home}/test"/>
 
+    <!-- cactus lib -->
+    <property name="cactus.lib" value="${cactus.home}/lib"/>
+
+    <!-- Default Cactus Context Scheme -->
+    <property name="cactus.contextScheme" value="http" />
+
+    <!-- Default Cactus Context Host -->
+    <property name="cactus.contextHost"   value="localhost" />
+
+    <!-- Default Cactus Context Port -->
+    <property name="cactus.contextPort"   value="8080" />
+
+    <!-- Default Cactus Context Application -->
+    <property name="cactus.contextApp"    value="test" />
+
     <!-- Context test is taking place on -->
     <property name="cactus.contextURL" value="${cactus.contextScheme}://${cactus.contextHost}:${cactus.contextPort}/${cactus.contextApp}"/>
 
@@ -100,7 +115,11 @@
     <property name="libdir" value="lib" />
 
     <!-- Cactus Test Runner -->
-    <property name="cactus.servertest.class" value="org.apache.cactus.ant.RunServerTestsTask" />
+    <property name="cactus.servertest.class" value="org.apache.cactus.integration.ant.RunServerTestsTask" />
+
+    <!-- Cactus jspRedirector.jsp -->
+    <!-- N.B. The one in cactus home works except for cactus 1.3 (because session="false") -->
+    <property name="cactus.jspRedirector" value="${cactus.home}/web/jspRedirector.jsp" />
     	
     <path id="downloaded.lib.classpath">
       <fileset dir="${libdir}">
@@ -108,6 +127,23 @@
       </fileset>
     </path>
 
+    <path id="cactus.ant.classpath">
+      <fileset dir="${cactus.lib}">
+        <include name="cactus-ant*.jar"/>
+      </fileset>
+    </path>
+
+
+    <path id="cactus.lib.classpath">
+      <fileset dir="${cactus.lib}">
+        <include name="cactus*.jar"/>
+        <exclude name="cactus-ant*.jar"/>
+        <include name="aspectjrt*.jar"/>
+        <include name="httpunit*.jar"/>
+        <include name="commons-httpclient*.jar"/>
+      </fileset>
+    </path>
+
     <!-- Compilation Classpath -->
     <path id="compile.classpath">
       <pathelement location="${build.home}/library/${app.name}.jar"/>
@@ -115,17 +151,16 @@
       <pathelement location="${commons-beanutils.jar}"/>
       <pathelement location="${commons-digester.jar}"/>
       <pathelement location="${commons-fileupload.jar}"/>
-      <pathelement location="${commons-httpclient.jar}"/>
       <pathelement location="${commons-logging.jar}"/>
       <pathelement location="${commons-validator.jar}"/>
-      <pathelement location="${httpunit.jar}"/>
-      <pathelement location="${aspectjrt.jar}"/>
       <pathelement location="${jakarta-oro.jar}"/>
-      <pathelement location="${cactus.jar}"/>
       <pathelement location="${junit.jar}"/>
       <pathelement location="${servlet.jar}"/>
       <pathelement location="${struts.jar}"/>
       <pathelement location="${antlr.jar}"/>
+
+      <!-- cactus lib jars -->
+      <path refid="cactus.lib.classpath"/>
       
 		<!-- this is harmless if not used -->
 		<path refid="downloaded.lib.classpath"/>
@@ -144,7 +179,7 @@
             classname="${cactus.servertest.class}">
 
             <classpath>
-                <pathelement location="${cactus.ant.jar}"/>
+                <path refid="cactus.ant.classpath"/>
                 <pathelement path="${java.class.path}"/>
             </classpath>
         </taskdef>
@@ -208,12 +243,8 @@
         <!-- Copy needed libs in /lib -->
         <copy file="${build.home}/library/${app.name}.jar"
             todir="${out.test.dir}/lib"/>
-        <copy file="${aspectjrt.jar}" todir="${out.test.dir}/lib"/>
-        <copy file="${httpunit.jar}"  todir="${out.test.dir}/lib"/>
         <copy file="${junit.jar}"     todir="${out.test.dir}/lib"/>
         <copy file="${jakarta-oro.jar}"     todir="${out.test.dir}/lib"/>
-        <copy file="${log4j.jar}"     todir="${out.test.dir}/lib"/>
-        <copy file="${cactus.jar}"    todir="${out.test.dir}/lib"/>
         <copy file="${commons-beanutils.jar}"
                                       todir="${out.test.dir}/lib"/>
         <copy file="${commons-digester.jar}"
@@ -222,11 +253,23 @@
                                       todir="${out.test.dir}/lib"/>
         <copy file="${commons-validator.jar}"
                                       todir="${out.test.dir}/lib"/>
+
+        <!-- copy cactus jars -->
+        <copy todir="${out.test.dir}/lib">
+            <fileset dir="${cactus.lib}">
+                <include name="cactus*.jar"/>
+                <exclude name="cactus-ant*.jar"/>
+                <include name="aspectjrt*.jar"/>
+                <include name="httpunit*.jar"/>
+                <include name="log4j*.jar"/>
+            </fileset>
+        </copy>
+
         <war warfile="${out.test.dir}/test.war"
              webxml="${conf.test.dir}/web.xml">
 
-            <!-- copy JspRedirector.jsp from cactus home -->
-            <fileset file="${cactus.home}/web/jspRedirector.jsp"/>
+            <!-- copy JspRedirector.jsp  -->
+            <fileset file="${cactus.jspRedirector}"/>
 
             <!-- copy jsps (except JspRedirector.jsp) -->
             <fileset dir="${web.dir}/test" >

Modified: struts/core/branches/STRUTS_1_2_BRANCH/build.properties.sample
URL: http://svn.apache.org/viewcvs/struts/core/branches/STRUTS_1_2_BRANCH/build.properties.sample?rev=168502&r1=168501&r2=168502&view=diff
==============================================================================
--- struts/core/branches/STRUTS_1_2_BRANCH/build.properties.sample (original)
+++ struts/core/branches/STRUTS_1_2_BRANCH/build.properties.sample Thu May  5 19:47:10 2005
@@ -113,219 +113,66 @@
 struts.home			=../../
 
 # Properties related to Struts unit testing
-# Choose your Cactus!
-# (Uncomment only one set of properties)
 #
 # In order for the Cactus tests to work, you must have a copy of
 # junit.jar in ANT_HOME/lib (See Ant docs on JUnit task)
-#
-# -----------------------------------------
-# Cactus 12-1.3 home
-#cactus.home=${apache.home}/jakarta-cactus-12-1.3
-#cactus.lib=${cactus.home}/lib
-
-# Cactus jar for the Servlet API corresponding to the servlet.jar file
-# selected above (either 2.2 or 2.3)
-#cactus.jar = ${cactus.lib}/cactus.jar
-
-# Cactus Ant custom tasks jar
-#cactus.ant.jar = ${cactus.lib}/cactus-ant.jar
-
-# AspectJ from Cactus distribution
-#aspectjrt.jar = ${cactus.lib}/aspectjrt.jar
-
-# The httpunit runtime jar
-#httpunit.jar = ${cactus.lib}/httpunit.jar
 
-# Log4J from Jakarta-Commons
-#log4j.jar = ${cactus.lib}/log4j-1.2rc1.jar
-
-# JUnit jar file, version 3.81 or newer required.
-#junit.jar = ${apache.home}/junit3.8.1/junit.jar
-
-# Httpclient from Jakarta-Commons
-#commons-httpclient.jar = ${cactus.lib}/commons-httpclient-20020421.jar
+# ==========================================
+# Choose your Cactus!
+# (un-comment only one set of cacuts properties)
+# ==========================================
 
 # -----------------------------------------
-# Cactus 12-1.4 home
-#cactus.home=${apache.home}/jakarta-cactus-12-1.4
-#cactus.lib=${cactus.home}/lib
-
-# Cactus jar for the Servlet API corresponding to the servlet.jar file
-# selected above (either 2.2 or 2.3)
-#cactus.jar = ${cactus.lib}/cactus-1.4.jar
-
-# Cactus Ant custom tasks jar
-#cactus.ant.jar = ${cactus.lib}/cactus-ant-1.4.jar
-
-# AspectJ from Cactus distribution
-#aspectjrt.jar = ${cactus.lib}/aspectjrt-1.0.5.jar
-
-# The httpunit runtime jar
-#httpunit.jar = ${cactus.lib}/httpunit-1.4.1.jar
-
-# Log4J from Jakarta-Commons
-#log4j.jar = ${cactus.lib}/log4j-1.2.5.jar
-
-# JUnit jar file, version 3.81 or newer required.
-#junit.jar = ${apache.home}/junit3.8.1/junit.jar
-
-# Httpclient from Jakarta-Commons
-#commons-httpclient.jar = ${cactus.lib}/commons-httpclient-2.0alpha1-20020606.jar
-
+# junit - 3.8.1 or later
 # -----------------------------------------
-# Cactus 12-1.4.1 home
-#cactus.home=${apache.home}/jakarta-cactus-12-1.4.1
-#cactus.lib=${cactus.home}/lib
-
-# Cactus jar for the Servlet API corresponding to the servlet.jar file
-# selected above (either 2.2 or 2.3)
-#cactus.jar = ${cactus.lib}/cactus-1.4.1.jar
-
-# Cactus Ant custom tasks jar
-#cactus.ant.jar = ${cactus.lib}/cactus-ant-1.4.1.jar
-
-# AspectJ from Cactus distribution
-#aspectjrt.jar = ${cactus.lib}/aspectjrt-1.0.5.jar
-
-# The httpunit runtime jar
-#httpunit.jar = ${cactus.lib}/httpunit-1.4.1.jar
-
-# Log4J from Jakarta-Commons
-#log4j.jar = ${cactus.lib}/log4j-1.2.5.jar
-
-# JUnit jar file, version 3.81 or newer required.
-#junit.jar = ${apache.home}/junit3.8.1/junit.jar
-
-# Httpclient from Jakarta-Commons
-#commons-httpclient.jar = ${cactus.lib}/commons-httpclient-2.0alpha1-20020606.jar
+junit.jar = ${apache.home}/junit3.8.1/junit.jar
 
 # -----------------------------------------
-# Cactus 13-1.3 home
-#cactus.home=${apache.home}/jakarta-cactus-13-1.3
-#cactus.lib=${cactus.home}/lib
-
-# Cactus jar for the Servlet API corresponding to the servlet.jar file
-# selected above (either 2.2 or 2.3)
-#cactus.jar = ${cactus.lib}/cactus.jar
-
-# Cactus Ant custom tasks jar
-#cactus.ant.jar = ${cactus.lib}/cactus-ant.jar
-
-# AspectJ from Cactus distribution
-#aspectjrt.jar = ${cactus.lib}/aspectjrt.jar
-
-# The httpunit runtime jar
-#httpunit.jar = ${cactus.lib}/httpunit.jar
-
-# Log4J from Jakarta-Commons
-#log4j.jar = ${cactus.lib}/log4j-1.2rc1.jar
-
-# JUnit jar file, version 3.81 or newer required.
-#junit.jar = ${cactus.lib}/junit.jar
-
-# Httpclient from Jakarta-Commons
-#commons-httpclient.jar = ${cactus.lib}/commons-httpclient.jar
-
+# J2EE 1.2 (Servlet 2.2)
 # -----------------------------------------
-# Cactus 13-1.4 home
-#cactus.home=${apache.home}/jakarta-cactus-13-1.4
-#cactus.lib=${cactus.home}/lib
+# --- Cactus 12-1.3 ---
+# cactus.home=${apache.home}/jakarta-cactus-12-1.3
+# cactus.jspRedirector=web/test/jspRedirector.jsp
+# cactus.servertest.class=org.apache.cactus.ant.RunServerTestsTask
 
-# Cactus jar for the Servlet API corresponding to the servlet.jar file
-# selected above (either 2.2 or 2.3)
-#cactus.jar = ${cactus.lib}/cactus-1.4.jar
+# --- Cactus 12-1.4 ---
+# cactus.home=${apache.home}/jakarta-cactus-12-1.4
+# cactus.servertest.class=org.apache.cactus.ant.RunServerTestsTask
 
-# Cactus Ant custom tasks jar
-#cactus.ant.jar = ${cactus.lib}/cactus-ant-1.4.jar
+# --- Cactus 12-1.4.1 ---
+# cactus.home=${apache.home}/jakarta-cactus-12-1.4.1
+# cactus.servertest.class=org.apache.cactus.ant.RunServerTestsTask
 
-# AspectJ from Cactus distribution
-#aspectjrt.jar = ${cactus.lib}/aspectjrt-1.0.5.jar
+# --- Cactus 12-1.6.1 ---
+# cactus.home=${apache.home}/jakarta-cactus-12-1.6.1
 
-# The httpunit runtime jar
-#httpunit.jar = ${cactus.lib}/httpunit-1.4.1.jar
-
-# Log4J from Jakarta-Commons
-#log4j.jar = ${cactus.lib}/log4j-1.2.5.jar
-
-# JUnit jar file, version 3.81 or newer required.
-#junit.jar = ${apache.home}/junit3.8.1/junit.jar
-
-# Httpclient from Jakarta-Commons
-#commons-httpclient.jar = ${cactus.lib}/commons-httpclient-2.0alpha1-20020606.jar
+# --- Cactus 12-1.7 ---
+# cactus.home=${apache.home}/jakarta-cactus-12-1.7
 
 # -----------------------------------------
-# Cactus 13-1.4.1 home
-cactus.home=${apache.home}/jakarta-cactus-13-1.4.1
-cactus.lib=${cactus.home}/lib
-
-# Cactus jar for the Servlet API corresponding to the servlet.jar file
-# selected above (either 2.2 or 2.3)
-cactus.jar = ${cactus.lib}/cactus-1.4.1.jar
-
-# Cactus Ant custom tasks jar
-cactus.ant.jar = ${cactus.lib}/cactus-ant-1.4.1.jar
-
-# AspectJ from Cactus distribution
-aspectjrt.jar = ${cactus.lib}/aspectjrt-1.0.5.jar
-
-# The httpunit runtime jar
-httpunit.jar = ${cactus.lib}/httpunit-1.4.1.jar
-
-# Log4J from Jakarta-Commons
-log4j.jar = ${cactus.lib}/log4j-1.2.5.jar
-
-# JUnit jar file, version 3.8.1 or newer required.
-junit.jar = ${apache.home}/junit3.8.1/junit.jar
-
-# Httpclient from Jakarta-Commons
-commons-httpclient.jar = ${cactus.lib}/commons-httpclient-2.0alpha1-20020606.jar
-
+# J2EE 1.3 (Servlet 2.3)
 # -----------------------------------------
-# Cactus 13-1.7 home
-# cactus.home=${apache.home}/jakarta-cactus-13-1.7
-# cactus.lib=${cactus.home}/lib
-
-# Server Test Task class name
-# cactus.servertest.class=org.apache.cactus.integration.ant.RunServerTestsTask
+# --- Cactus 13-1.3 ---
+# cactus.home=${apache.home}/jakarta-cactus-13-1.3
+# cactus.jspRedirector=web/test/jspRedirector.jsp
+# cactus.servertest.class=org.apache.cactus.ant.RunServerTestsTask
 
-# Cactus jar for the Servlet API corresponding to the servlet.jar file
-# selected above (either 2.2 or 2.3)
-# cactus.jar = ${cactus.lib}/cactus-1.7.jar
+# --- Cactus 13-1.4 ---
+# cactus.home=${apache.home}/jakarta-cactus-13-1.4
+# cactus.servertest.class=org.apache.cactus.ant.RunServerTestsTask
 
-# Cactus Ant custom tasks jar
-# cactus.ant.jar = ${cactus.lib}/cactus-ant-1.7.jar
+# --- Cactus 13-1.4.1 ---
+# cactus.home=${apache.home}/jakarta-cactus-13-1.4.1
+# cactus.servertest.class=org.apache.cactus.ant.RunServerTestsTask
 
-# AspectJ from Cactus distribution
-aspectjrt.jar = ${cactus.lib}/aspectjrt-1.2.1.jar
+# --- Cactus 13-1.6.1 ---
+# cactus.home=${apache.home}/jakarta-cactus-13-1.6.1
 
-# The httpunit runtime jar
-# httpunit.jar = ${cactus.lib}/httpunit-1.6.jar
-
-# Log4J has been replaced by commons logging in cactus
-# log4j.jar = ${commons-logging.jar}
-
-# JUnit jar file, version 3.81 or newer required.
-# junit.jar = ${cactus.lib}/junit-3.8.1.jar
-
-# Httpclient from Jakarta-Commons
-# commons-httpclient.jar = ${cactus.lib}/commons-httpclient-2.0.2.jar
+# --- Cactus 13-1.7 ---
+# cactus.home=${apache.home}/jakarta-cactus-13-1.7
 
 # -----------------------------------------
 
-
-# Scheme used to run tests for cactus, http, https.
-cactus.contextScheme = http
-# Host used to run tests for cactus, localhost.
-cactus.contextHost = localhost
-# Port used to run tests for cactus, change to non standard port
-# if container is already running on that port.
-cactus.contextPort = 8080
-# Application(context) used to run tests for cactus.
-cactus.contextApp = test
-
-# Ant Optional Jars for Junit task
-ant.optional.jar = ${apache.home}/apache-ant-1.5.3-1/lib/optional.jar
 
 # Ant Jar for optional taglib documentation task
 ant.jar=${apache.home}/apache-ant-1.5.3-1/lib/ant.jar

Modified: struts/core/branches/STRUTS_1_2_BRANCH/build.xml
URL: http://svn.apache.org/viewcvs/struts/core/branches/STRUTS_1_2_BRANCH/build.xml?rev=168502&r1=168501&r2=168502&view=diff
==============================================================================
--- struts/core/branches/STRUTS_1_2_BRANCH/build.xml (original)
+++ struts/core/branches/STRUTS_1_2_BRANCH/build.xml Thu May  5 19:47:10 2005
@@ -321,6 +321,10 @@
             usetimestamp="true" ignoreerrors="true"
             src="http://www.ibiblio.org/maven/taglibs/jars/standard-1.0.6.jar"/>
 
+        <get dest="${libdir}/junit-3.8.1.jar"
+            usetimestamp="true" ignoreerrors="true"
+            src="http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar"/>
+
         <property name="commons-beanutils.jar"  value="${libdir}/commons-beanutils.jar"/>
         <property name="commons-digester.jar"   value="${libdir}/commons-digester.jar"/>
         <property name="commons-fileupload.jar" value="${libdir}/commons-fileupload.jar"/>
@@ -332,6 +336,7 @@
         <property name="servlet.jar"            value="${libdir}/servlet.jar"/>
         <property name="jstl.jar"               value="${libdir}/jstl-1.0.6.jar"/>
         <property name="jstl-standard.jar"      value="${libdir}/standard-1.0.6.jar"/>
+        <property name="junit.jar"              value="${libdir}/junit-3.8.1.jar"/>
 
 
     </target>
@@ -968,6 +973,7 @@
      description="Run Cactus-based unit tests on Tomcat 3.2">
         <echo message="tomcat.home.32 = ${tomcat.home.32}"/>
         <ant antfile="build-tests.xml" target="test.tomcat.32"/>
+        <echo message="test.tomcat.32 complete using ${cactus.home}"/>
     </target>
 
 
@@ -984,6 +990,7 @@
      description="Run Cactus-based unit tests on Tomcat 3.3">
         <echo message="tomcat.home.33 = ${tomcat.home.33}"/>
         <ant antfile="build-tests.xml" target="test.tomcat.33"/>
+        <echo message="test.tomcat.33 complete using ${cactus.home}"/>
     </target>
 
     <target name="skip.tomcat.40" unless="tomcat.home.40">
@@ -999,6 +1006,7 @@
      description="Run Cactus-based unit tests on Tomcat 4.0">
         <echo message="tomcat.home.40 = ${tomcat.home.40}"/>
         <ant antfile="build-tests.xml" target="test.tomcat.40"/>
+        <echo message="test.tomcat.40 complete using ${cactus.home}"/>
     </target>
 
 
@@ -1015,6 +1023,7 @@
      description="Run unit tests on Tomcat 4.1">
         <echo message="tomcat.home.41 = ${tomcat.home.41}"/>
         <ant antfile="build-tests.xml" target="test.tomcat.41"/>
+        <echo message="test.tomcat.41 complete using ${cactus.home}"/>
     </target>
 
 
@@ -1031,6 +1040,7 @@
      description="Run unit tests on Tomcat 5.0">
         <echo message="tomcat.home.50 = ${tomcat.home.50}"/>
         <ant antfile="build-tests.xml" target="test.tomcat.50"/>
+        <echo message="test.tomcat.50 complete using ${cactus.home}"/>
     </target>
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org