vmassol 2003/03/22 13:25:28
Modified: src/plugins-build/cactus plugin.jelly
Log:
Generic support for any container defined in the Cactus/Ant Integration module.
Revision Changes Path
1.8 +34 -17 maven/src/plugins-build/cactus/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/cactus/plugin.jelly,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- plugin.jelly 22 Mar 2003 16:47:15 -0000 1.7
+++ plugin.jelly 22 Mar 2003 21:25:28 -0000 1.8
@@ -63,26 +63,43 @@
<goal name="cactus:test" prereqs="cactus:init"
description="Run all Cactus Test Cases">
- <j:set var="containerHomeX" value="${cactus.home.tomcat4x}X"/>
- <j:if test="${containerHomeX != 'X'}">
+ <!-- Find all the scripts in ${maven.cactus.antintegration.dir}/scripts
+ and try to start the tests for all the corresponding containers
+ which have a home directory set -->
- <echo message="Running Cactus tests on Tomcat 4.x ..."/>
+ <fileScanner var="scanner">
+ <fileset dir="${maven.cactus.antintegration.dir}/scripts"
+ includes="build-tests-*.xml"/>
+ </fileScanner>
- <ant dir="${maven.cactus.antintegration.dir}"
- target="cactus.run.tomcat4x">
- <reference refid="cactus.classpath"/>
-
- <!-- It seems there is a bug when the properties are defined in
- plugin.properties and we need to redefine them -->
- <property name="cactus.target.dir" value="${cactus.target.dir}"/>
- <property name="cactus.src.dir" value="${cactus.src.dir}"/>
- <property name="cactus.port" value="${cactus.port}"/>
- <property name="cactus.src.includes" value="${cactus.src.includes}"/>
- <property name="cactus.src.excludes" value="${cactus.src.excludes}"/>
- <property name="cactus.context" value="${cactus.context}"/>
+ <j:forEach var="script" items="${scanner.iterator()}">
+ <j:set var="scriptName"
+ value="${script.name.substring(12, script.name.indexOf('.'))}"/>
+ <j:set var="containerHomeName" value="cactus.home.${scriptName}"/>
+ <j:set var="containerHome"
value="${context.findVariable(containerHomeName)}"/>
+
+ <j:set var="containerHomeX" value="${containerHome}X"/>
+ <j:if test="${containerHomeX != 'X'}">
- </ant>
- </j:if>
+ <echo message="Running Cactus tests on ${scriptName} ..."/>
+
+ <ant dir="${maven.cactus.antintegration.dir}"
+ target="cactus.run.${scriptName}">
+ <reference refid="cactus.classpath"/>
+
+ <!-- It seems there is a bug when the properties are defined in
+ plugin.properties and we need to redefine them -->
+ <property name="cactus.target.dir" value="${cactus.target.dir}"/>
+ <property name="cactus.src.dir" value="${cactus.src.dir}"/>
+ <property name="cactus.port" value="${cactus.port}"/>
+ <property name="cactus.src.includes" value="${cactus.src.includes}"/>
+ <property name="cactus.src.excludes" value="${cactus.src.excludes}"/>
+ <property name="cactus.context" value="${cactus.context}"/>
+ </ant>
+
+ </j:if>
+
+ </j:forEach>
</goal>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]