Generic support for any container defined in the Cactus/Ant Integration module.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113179 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol
2003-03-22 21:25:28 +00:00
parent d4b5b795c9
commit d4d29a5fe7

View File

@@ -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"/>
<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'}">
<!-- 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}"/>
<echo message="Running Cactus tests on ${scriptName} ..."/>
</ant>
</j:if>
<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>