WARNING: Full plugin rewrite! Version 3.0 of the Cactus plugin now relies on the newest Cactus/Ant integration which has completely changed since version 2.0 (and 2.1-SNAPSHOT, which by the way has never been released, and never will). Thanks to the new Cactus/Ant, some features have also been added. The plugin now uses the new <cactifywar> and <cactus> Ant tasks (see http://jakarta.apache.org/cactus/integration/ant/index.html for more details).

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113436 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol 2003-05-23 21:05:56 +00:00
parent fa22f63625
commit eef02557cb
16 changed files with 527 additions and 224 deletions

View File

@ -1,31 +0,0 @@
<project default="plugin:install">
<!--
=============================================================================
Unzip the Cactus Ant Integration zip to the plugin output directory. Make
sure to exclude the jars which are packaged in the Ant Integration as we
will use the Maven auto-download feature for them (the main reason is to
prevent putting jars in a plugin - the canonical location for jars it the
Maven repository).
=============================================================================
-->
<postGoal name="java:jar-resources">
<unzip src="${maven.cactus.antintegration.zip}"
dest="${maven.build.dest}/plugin-resources">
<patternset>
<include name="**/*.*"/>
<exclude name="**/*.jar"/>
</patternset>
</unzip>
<!-- Rename the ant integration directory to remove the version in the
name. This it to make it easy to refer to it from the plugin.jelly
file -->
<move todir="${maven.build.dest}/plugin-resources/jakarta-cactus-integration-ant">
<fileset dir="${maven.build.dest}/plugin-resources/${maven.cactus.antintegration.name}"/>
</move>
</postGoal>
</project>

View File

@ -2,15 +2,15 @@
<!--
=============================================================================
Cactus plugin for Maven. It uses the Cactus Ant Integration from the
Cactus plugin for Maven. It uses the Cactus/Ant Integration from the
Cactus project.
=============================================================================
-->
<project xmlns:j="jelly:core" xmlns:doc="doc">
<!-- Global properties -->
<property name="maven.cactus.antintegration.dir"
value="${plugin.resources}/jakarta-cactus-integration-ant"/>
<project
xmlns:j="jelly:core"
xmlns:doc="doc"
xmlns:util="jelly:util"
xmlns:ant="jelly:ant">
<!--
========================================================================
@ -18,7 +18,7 @@
========================================================================
-->
<goal name="cactus" description="Run all Cactus Test Cases"
prereqs="cactus:test"/>
prereqs="cactus:test"/>
<!--
========================================================================
@ -27,43 +27,129 @@
-->
<goal name="cactus:init" prereqs="war:war">
<path id="cactus.classpath">
<pathelement location="${maven.build.dest}"/>
<pathelement path="${pom.getDependencyClasspath()}"/>
</path>
<ant:path id="cactus.classpath">
<pathelement location="${plugin.getDependencyPath('cactus:cactus-ant')}"/>
<pathelement location="${plugin.getDependencyPath('cactus:cactus')}"/>
<pathelement location="${plugin.getDependencyPath('commons-logging')}"/>
<pathelement location="${plugin.getDependencyPath('junit')}"/>
<pathelement location="${plugin.getDependencyPath('commons-httpclient')}"/>
<pathelement location="${plugin.getDependencyPath('aspectj:aspectjrt')}"/>
<pathelement location="${plugin.getDependencyPath('httpunit')}"/>
<pathelement location="${plugin.getDependencyPath('nekohtml')}"/>
<pathelement location="${plugin.getDependencyPath('xerces:xercesImpl')}"/>
<pathelement location="${plugin.getDependencyPath('xerces:xmlParserAPIs')}"/>
</ant:path>
<ant:taskdef resource="cactus.tasks" classpathref="cactus.classpath"/>
<ant:taskdef name="junit"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
<ant:property name="cactus.target.classes.dir"
value="${maven.build.dir}/test-cactus-classes"/>
<j:set var="warBuildDir"
value="${pom.getPluginContext('maven-war-plugin').getVariable('maven.war.build.dir')}"/>
<property name="cactus.war"
value="${warBuildDir}/${pom.artifactId}.war"/>
value="${pom.getPluginContext('maven-war-plugin').getVariable('maven.war.build.dir')}"/>
<ant:property name="cactus.src.war"
value="${warBuildDir}/${pom.artifactId}.war"/>
<!-- TODO: Verify here that the war or webapp exists -->
<util:available file="${cactus.src.dir}">
<j:set var="cactusSourcePresent" value="true"/>
</util:available>
</goal>
<!--
========================================================================
Compiles the Cactus tests.
========================================================================
-->
<goal name="cactus:compile" prereqs="cactus:init"
description="Compiles the cactus tests">
<mkdir dir="${cactus.target.classes.dir}"/>
<property name="cactus.antintegration.jar"
value="${plugin.getDependencyPath('cactus:cactus-integration-ant')}"/>
<property name="cactus.framework.jar"
value="${plugin.getDependencyPath('cactus:cactus-framework')}"/>
<property name="cactus.log4j.jar"
value="${plugin.getDependencyPath('log4j')}"/>
<property name="cactus.aspectjrt.jar"
value="${plugin.getDependencyPath('aspectj:aspectjrt')}"/>
<property name="cactus.commons.logging.jar"
value="${plugin.getDependencyPath('commons-logging')}"/>
<property name="cactus.junit.jar"
value="${plugin.getDependencyPath('junit')}"/>
<property name="cactus.commons.httpclient.jar"
value="${plugin.getDependencyPath('commons-httpclient')}"/>
<property name="cactus.httpunit.jar"
value="${plugin.getDependencyPath('httpunit')}"/>
<property name="cactus.nekohtml.jar"
value="${plugin.getDependencyPath('nekohtml')}"/>
<property name="cactus.xerces.jar"
value="${plugin.getDependencyPath('xerces:xercesImpl')}"/>
<property name="cactus.xmlapis.jar"
value="${plugin.getDependencyPath('xerces:xmlParserAPIs')}"/>
<j:choose>
<j:when test="${cactusSourcePresent == 'true'}">
<ant:javac destdir="${cactus.target.classes.dir}"
excludes="**/package.html"
debug="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.debug')}"
deprecation="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.deprecation')}"
target="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.target')}"
optimize="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.optimize')}">
<taskdef name="junit"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
<ant:src path="${cactus.src.dir}"/>
<ant:classpath>
<ant:path refid="maven.dependency.classpath"/>
<ant:path refid="cactus.classpath"/>
<ant:pathelement path="${maven.build.dest}"/>
</ant:classpath>
<j:if test="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.compilerargs')}">
<ant:compilerarg line="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.compilerargs')}"/>
</j:if>
<j:if test="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.encoding')}">
<ant:setProperty name="encoding" value="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.encoding')}"/>
</j:if>
<j:if test="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.executable')}">
<ant:setProperty name="executable" value="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.executable')}"/>
</j:if>
<j:if test="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.fork')}">
<ant:setProperty name="fork" value="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.fork')}"/>
</j:if>
<j:if test="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.source')}">
<ant:setProperty name="source" value="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.source')}"/>
</j:if>
<j:if test="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.verbose')}">
<ant:setProperty name="verbose" value="${pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.verbose')}"/>
</j:if>
</ant:javac>
</j:when>
<j:otherwise>
<ant:echo>No Cactus source files to compile.</ant:echo>
</j:otherwise>
</j:choose>
</goal>
<!--
========================================================================
Cactify an application war.
========================================================================
-->
<goal name="cactus:cactifywar" prereqs="cactus:compile"
description="Cactify the application war">
<cactifywar srcfile="${cactus.src.war}"
destfile="${maven.build.dir}/${pom.artifactId}-cactus.war">
<!-- Add the mergewebxml attribute if it has been defined by the
user -->
<j:if test="${context.getVariable('cactus.src.mergewebxml') != null}">
<ant:setProperty name="mergewebxml" value="${cactus.src.mergewebxml}"/>
</j:if>
<ant:classes dir="${cactus.target.classes.dir}"/>
<!-- Orion fails on a servlet filter that is not mapped to an actual
resource, to trick it -->
<filterredirector mapping="/test/filterRedirector.jsp"/>
<!-- Files needed for JBoss -->
<ant:classes dir="${plugin.resources}/jboss3x">
<ant:include name="*.properties" if="cactus.home.jboss3x"/>
</ant:classes>
<ant:webinf dir="${plugin.resources}/jboss3x">
<ant:include name="jboss-web.xml" if="cactus.home.jboss3x"/>
</ant:webinf>
</cactifywar>
</goal>
@ -74,58 +160,159 @@
defined.
========================================================================
-->
<goal name="cactus:test" prereqs="cactus:init"
description="Run all Cactus Test Cases">
<goal name="cactus:test" prereqs="cactus:init,cactus:cactifywar"
description="Run all Cactus Test Cases">
<!-- 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 -->
<!-- Prepare the directories for the JUnit reports -->
<ant:mkdir dir="${cactus.reports.dir}"/>
<j:if test="${context.getVariable('cactus.home.jboss3x') != null}">
<ant:mkdir dir="${cactus.reports.dir}/jboss3x"/>
</j:if>
<j:if test="${context.getVariable('cactus.home.orion1x') != null}">
<ant:mkdir dir="${cactus.reports.dir}/orion1x"/>
</j:if>
<j:if test="${context.getVariable('cactus.home.orion2x') != null}">
<ant:mkdir dir="${cactus.reports.dir}/orion2x"/>
</j:if>
<j:if test="${context.getVariable('cactus.home.resin2x') != null}">
<ant:mkdir dir="${cactus.reports.dir}/resin2x"/>
</j:if>
<j:if test="${context.getVariable('cactus.home.tomcat4x') != null}">
<ant:mkdir dir="${cactus.reports.dir}/tomcat4x"/>
</j:if>
<j:if test="${context.getVariable('cactus.home.tomcat5x') != null}">
<ant:mkdir dir="${cactus.reports.dir}/tomcat5x"/>
</j:if>
<fileScanner var="scanner">
<fileset dir="${maven.cactus.antintegration.dir}/scripts"
includes="build-tests-*.xml"/>
</fileScanner>
<cactus warfile="${maven.build.dir}/${pom.artifactId}-cactus.war"
fork="yes" errorproperty="cactustests.error"
failureproperty="cactustests.failure">
<ant:classpath>
<ant:pathelement path="${maven.build.dest}"/>
<ant:pathelement location="${cactus.target.classes.dir}"/>
<ant:path refid="maven.dependency.classpath"/>
<ant:path refid="cactus.classpath"/>
</ant:classpath>
<containerset>
<!-- TODO: Find how to set the port for JBoss 3x -->
<jboss3x if="cactus.home.jboss3x"
dir="${cactus.home.jboss3x}"
output="${cactus.cactus.reports.dir}/jboss3x.out"
todir="${cactus.cactus.reports.dir}/jboss3x"
config="${cactus.jboss3x.config.name}"/>
<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'}">
<orion1x if="cactus.home.orion1x"
dir="${cactus.home.orion1x}" port="${cactus.port}"
output="${cactus.reports.dir}/orion1x.out"
todir="${cactus.reports.dir}/orion1x"/>
<echo message="Running Cactus tests on ${scriptName} ..."/>
<orion2x if="cactus.home.orion2x"
dir="${cactus.home.orion2x}" port="${cactus.port}"
output="${cactus.reports.dir}/orion2x.out"
todir="${cactus.reports.dir}/orion2x"/>
<ant dir="${maven.cactus.antintegration.dir}"
target="cactus.run.${scriptName}">
<resin2x if="cactus.home.resin2x"
dir="${cactus.home.resin2x}" port="${cactus.port}"
output="${cactus.reports.dir}/resin2x.out"
todir="${cactus.reports.dir}/resin2x">
<j:if test="${context.getVariable('cactus.resin2x.config') != null}">
<ant:setProperty name="resinconf" value="${cactus.resin2x.config}"/>
</j:if>
</resin2x>
<tomcat4x if="cactus.home.tomcat4x"
dir="${cactus.home.tomcat4x}" port="${cactus.port}"
output="${cactus.reports.dir}/tomcat4x.out"
todir="${cactus.reports.dir}/tomcat4x">
<j:if test="${context.getVariable('cactus.tomcat4x.config') != null}">
<ant:setProperty name="serverxml" value="${cactus.tomcat4x.config}"/>
</j:if>
<j:if test="${context.getVariable('cactus.tomcat4x.conf.dir') != null}">
<conf dir="${cactus.tomcat4x.conf.dir}">
<ant:include name="${cactus.tomcat4x.conf.includes}"/>
<ant:exclude name="${cactus.tomcat4x.conf.excludes}"/>
</conf>
</j:if>
</tomcat4x>
<reference refid="cactus.classpath"/>
<tomcat5x if="cactus.home.tomcat5x"
dir="${cactus.home.tomcat5x}" port="${cactus.port}"
output="${cactus.reports.dir}/tomcat5x.out"
todir="${cactus.reports.dir}/tomcat5x">
<j:if test="${context.getVariable('cactus.tomcat5x.config') != null}">
<ant:setProperty name="serverxml" value="${cactus.tomcat5x.config}"/>
</j:if>
<j:if test="${context.getVariable('cactus.tomcat5x.conf.dir') != null}">
<conf dir="${cactus.tomcat5x.conf.dir}">
<ant:include name="${cactus.tomcat5x.conf.includes}"/>
<ant:exclude name="${cactus.tomcat5x.conf.excludes}"/>
</conf>
</j:if>
</tomcat5x>
<!-- 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}"/>
</containerset>
<ant:formatter type="brief" usefile="${cactus.junit.usefile}"/>
<ant:formatter type="xml"/>
<ant:batchtest>
<ant:fileset dir="${cactus.src.dir}">
<ant:include name="${cactus.src.includes}"/>
<ant:exclude name="${cactus.src.excludes}"/>
</ant:fileset>
</ant:batchtest>
</cactus>
<property name="cactus.jboss3x.config.dir"
value="${cactus.jboss3x.config.dir}"/>
<property name="cactus.jboss3x.config.name"
value="${cactus.jboss3x.config.name}"/>
</ant>
<!-- TODO: Change the Cactus stylesheet (cactus.jsl) to handle reports
for several containers -->
<!-- Consolidate the reports into a single -->
<ant:junitreport todir="${maven.build.dir}"
tofile="TESTS-TestSuites-Cactus.xml">
<j:set var="containerFound" value="true"/>
<j:if test="${context.getVariable('cactus.home.jboss3x') != null}">
<ant:fileset dir="${cactus.reports.dir}/jboss3x">
<ant:include name="TEST-*.xml"/>
</ant:fileset>
</j:if>
</j:forEach>
<j:if test="${context.getVariable('cactus.home.orion1x') != null}">
<ant:fileset dir="${cactus.reports.dir}/orion1x">
<ant:include name="TEST-*.xml"/>
</ant:fileset>
</j:if>
<!-- If no container was defined, display a warning message -->
<j:if test="${containerFound != 'true'}">
<echo>WARNING: You need to define at least one container property of the form cactus.home.[container name]. See the plugin documentation.</echo>
</j:if>
<j:if test="${context.getVariable('cactus.home.orion2x') != null}">
<ant:fileset dir="${cactus.reports.dir}/orion2x">
<ant:include name="TEST-*.xml"/>
</ant:fileset>
</j:if>
<j:if test="${context.getVariable('cactus.home.resin2x') != null}">
<ant:fileset dir="${cactus.reports.dir}/resin2x">
<ant:include name="TEST-*.xml"/>
</ant:fileset>
</j:if>
<j:if test="${context.getVariable('cactus.home.tomcat4x') != null}">
<ant:fileset dir="${cactus.reports.dir}/tomcat4x">
<ant:include name="TEST-*.xml"/>
</ant:fileset>
</j:if>
<j:if test="${context.getVariable('cactus.home.tomcat5x') != null}">
<ant:fileset dir="${cactus.reports.dir}/tomcat5x">
<ant:include name="TEST-*.xml"/>
</ant:fileset>
</j:if>
</ant:junitreport>
<j:if test="${cactus.halt.on.failure}">
<ant:fail if="cactustests.failure">At least one test had a failure!</ant:fail>
</j:if>
<j:if test="${cactus.halt.on.error}">
<ant:fail if="cactustests.error">At least one test had an error!</ant:fail>
</j:if>
</goal>
@ -159,21 +346,13 @@
<goal name="cactus:report"
description="Generate a report from the test results">
<!-- Consolidate the reports into a single -->
<junitreport todir="${cactus.target.dir}">
<fileset dir="${cactus.reports.dir}">
<include name="TEST-*.xml"/>
</fileset>
</junitreport>
<doc:jsl
input="${cactus.target.dir}/TESTS-TestSuites.xml"
input="${maven.build.dir}/TESTS-TestSuites-Cactus.xml"
output="cactus-report.xml"
stylesheet="${plugin.resources}/cactus.jsl"
omitXmlDeclaration="true"
outputMode="xml"
prettyPrint="true"
/>
prettyPrint="true"/>
</goal>

View File

@ -8,38 +8,71 @@
#
# Examples:
#
# cactus.home.jboss3x = c:/apps/jboss-3.0.4
# cactus.home.tomcat4x = c:/apps/tomcat-4.1.10
# cactus.home.resin2x = C:/Apps/resin-2.1.4
# cactus.home.weblogic7x = C:/bea
#
# Supported container names: jboss3x, tomcat4x, resin2x, orion1x,
# orion2x, tomcat5x
# Location of Cactus tests in project sources
cactus.src.dir = ${basedir}/src/test-cactus
# Location where the plugins puts temporary Cactus build-generated files
cactus.target.dir = ${maven.build.dir}/cactus
# Default port on which to start the containers
cactus.port = 8080
# Default Cactus test files to include in the test
cactus.src.includes = **/*Test*.java
# Default Cactus test files to exclude from the test
cactus.src.excludes = **/AllTests.java,**/Test*All.java
# Default webapp context
cactus.context = cactustest
# (optional). Location of a test-specific web.xml file that will be
# merged with the application web.xml, during the War cactification.
# Note that by default the cactification already adds the Cactus
# redirector definitions.
#cactus.src.mergewebxml = ${basedir}/src/conf/cactus-web.xml
# Default port on which to start the containers
cactus.port = 8080
# Decides whether the test result will be printed to the console or
# not. Default is true
cactus.junit.usefile = false
# Location of junit test reports for the Cactus tests
cactus.reports.dir = ${cactus.target.dir}/test-cactus-reports
cactus.reports.dir = ${maven.build.dir}/test-cactus-reports
# Location of the JBoss server configuration directory.
cactus.jboss3x.config.dir = ${cactus.home.jboss3x}/server
# Shall we stop the build in case of test failures?
cactus.halt.on.failure = true
# Name of the JBoss server configuration to use
# Shall we stop the build in case of test errors?
cactus.halt.on.error = true
# -------------------------------------------------------------------
# Container-related properties
# -------------------------------------------------------------------
# Name of the JBoss server configuration to use.
cactus.jboss3x.config.name = default
# (optional). Resin 2.x configuration file if you don't want to use the
# cactus-provided one
#cactus.resin2x.config =
# (optional). Tomcat 4.x configuration file if you don't want to use the
# cactus-provided one
#cactus.tomcat4x.config =
# (optional). List of custom Tomcat 4.x configuration files that will be
# included/excluded in the Tomcat conf/ directory (will overwrite the
# default cactus-provided conf files).
#cactus.tomcat4x.conf.dir =
#cactus.tomcat4x.conf.includes =
#cactus.tomcat4x.conf.excludes =
# (optional). Tomcat 5.x configuration file if you don't want to use the
# cactus-provided one
#cactus.tomcat5x.config =
# (optional). List of custom Tomcat 5.x configuration files that will be
# included/excluded in the Tomcat conf/ directory (will overwrite the
# default cactus-provided conf files).
#cactus.tomcat5x.conf.dir =
#cactus.tomcat5x.conf.includes =
#cactus.tomcat5x.conf.excludes =

View File

@ -5,13 +5,3 @@ maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}
maven.checkstyle.format = turbine
maven.license.licenseFile=${basedir}/../../../LICENSE.txt
# Properties specific to the plugin
# Note: These should be removed once Maven artifacts dependencies
# mechanism is finalized.
maven.cactus.artifacts.zips.dir = ${maven.repo.local}/cactus/zips
maven.cactus.antintegration.version = 13-1.5dev-20030426
maven.cactus.antintegration.name = jakarta-cactus-integration-ant-${maven.cactus.antintegration.version}
maven.cactus.antintegration.zip = ${maven.cactus.artifacts.zips.dir}/${maven.cactus.antintegration.name}.zip

View File

@ -5,7 +5,7 @@
<pomVersion>3</pomVersion>
<id>maven-cactus-plugin</id>
<name>Maven Cactus Plug-in</name>
<currentVersion>2.1-SNAPSHOT</currentVersion>
<currentVersion>3.0-SNAPSHOT</currentVersion>
<description>Plugin for Cactus (http://jakarta.apache.org/cactus) that allows to automatically start containers, run Cactus tests and stop the containers.</description>
<shortDescription>Cactus plugin</shortDescription>
<url>http://maven.apache.org/reference/plugins/cactus/</url>
@ -36,8 +36,8 @@
<tag>MAVEN_CACTUS_2_0</tag>
</version>
<version>
<id>2.1</id>
<name>2.1</name>
<id>3.0</id>
<name>3.0</name>
<tag>HEAD</tag>
</version>
</versions>
@ -65,34 +65,25 @@
</developers>
<contributors/>
<dependencies>
<!-- Build time dependencies -->
<dependency>
<groupId>cactus</groupId>
<artifactId>jakarta-cactus-integration-ant</artifactId>
<version>13-1.5dev-20030426</version>
<type>zip</type>
</dependency>
<!-- Runtime dependencies -->
<dependency>
<groupId>cactus</groupId>
<artifactId>cactus-framework</artifactId>&gt;
<version>13-1.5dev-20030407</version>
<artifactId>cactus</artifactId>
<version>13-1.5dev-20030522</version>
</dependency>
<dependency>
<groupId>cactus</groupId>
<artifactId>cactus-integration-ant</artifactId>&gt;
<version>1.5dev-20030407</version>
<artifactId>cactus-ant</artifactId>
<version>13-1.5dev-20030522</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>&gt;
<artifactId>commons-httpclient</artifactId>
<version>2.0-alpha3</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>&gt;
<artifactId>commons-logging</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
@ -100,23 +91,19 @@
<artifactId>aspectjrt</artifactId>
<version>1.0.6</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.7</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
<!-- Note: Dependencies below are needed by HttpUnit -->
<dependency>
<groupId>httpunit</groupId>
<artifactId>httpunit</artifactId>
<version>1.5.1</version>
</dependency>
<!-- Note: NekoHTML and Xerces are needed by HttpUnit -->
<dependency>
<groupId>nekohtml</groupId>
<artifactId>nekohtml</artifactId>
@ -132,5 +119,6 @@
<artifactId>xmlParserAPIs</artifactId>
<version>2.2.1</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,4 @@
# Please specify your path to your container
cactus.home.tomcat4x = C:/Apps/jakarta-tomcat-4.1.24
cactus.home.resin2x = C:/Apps/resin-2.1.6

View File

@ -12,7 +12,7 @@
<!-- The version of the project under development, e.g.
1.1, 1.2, 2.0-dev -->
<currentVersion>1.0-SNAPSHOT</currentVersion>
<currentVersion>3.0-SNAPSHOT</currentVersion>
<!-- details about the organization that 'owns' the project -->
<organization>
@ -64,4 +64,12 @@
<sourceDirectory>src/java</sourceDirectory>
</build>
<reports>
<report>maven-cactus-plugin</report>
<report>maven-changelog-plugin</report>
<report>maven-file-activity-plugin</report>
<report>maven-developer-activity-plugin</report>
<report>maven-tasklist-plugin</report>
</reports>
</project>

View File

@ -70,9 +70,10 @@ import org.apache.cactus.WebResponse;
*
* @author <a href="mailto:nick@eblox.com">Nciholas Lesiecki</a>
*
* @version $Id: TestSampleBodyTag.java,v 1.1 2003/03/22 16:39:09 vmassol Exp $
* @version $Id: TestSampleBodyTag.java,v 1.2 2003/05/23 21:05:56 vmassol Exp $
*/
public class TestSampleBodyTag extends JspTestCase {
public class TestSampleBodyTag extends JspTestCase
{
private SampleBodyTag tag;
private BodyContent tagContent;
@ -91,7 +92,8 @@ public class TestSampleBodyTag extends JspTestCase {
*
* @param theArgs the arguments. Not used
*/
public static void main(String[] theArgs) {
public static void main(String[] theArgs)
{
junit.swingui.TestRunner.main(
new String[] { TestSampleBodyTag.class.getName() });
}
@ -100,7 +102,8 @@ public class TestSampleBodyTag extends JspTestCase {
* @return a test suite (<code>TestSuite</code>) that includes all methods
* starting with "test"
*/
public static Test suite() {
public static Test suite()
{
// All methods starting with "test" will be executed in the test suite.
return new TestSuite(TestSampleBodyTag.class);
}
@ -109,7 +112,8 @@ public class TestSampleBodyTag extends JspTestCase {
* In addition to creating the tag instance and adding the pageContext to
* it, this method creates a BodyContent object and passes it to the tag.
*/
public void setUp() {
public void setUp()
{
this.tag = new SampleBodyTag();
this.tag.setPageContext(this.pageContext);

View File

@ -0,0 +1,3 @@
<jboss-web>
<security-domain>java:/jaas/other</security-domain>
</jboss-web>

View File

@ -0,0 +1,2 @@
testuser=test
admin=JBossAdmin

View File

@ -0,0 +1,2 @@
testuser=testpassword
admin=admin

View File

@ -7,15 +7,12 @@
<body>
<release version="2.1" date="in CVS">
<release version="3.0" date="in CVS">
<action dev="vmassol" type="update">
Updated to use the Cactus/Ant integration built on 26th of April 2003.
This makes the <code>web.xml</code> merge works.
Major change: updated to use the Cactus/Ant integration built on
23rd of May 2003 (it is completely different from the Cactus/Ant
integration used in version 2.0.
</action>
<action dev="bwalding" type="fix">
Fix bug where generation of the Cactus report was failing in some
cases.
</action>
</release>
<release version="2.0" date="2003-04-08">

View File

@ -8,6 +8,19 @@
</properties>
<body>
<goals>
<goal>
<name>cactus:compile</name>
<description>
Compiles the Cactus tests.
</description>
</goal>
<goal>
<name>cactus:cactifywar</name>
<description>
Creates a Cactus-ready war from the application war (depends
on <code>war:war</code>).
</description>
</goal>
<goal>
<name>cactus:test</name>
<description>

View File

@ -21,9 +21,9 @@
<p>
Home directory of where you have installed the container on
which you wish to run the Cactus tests. Valid container
names are: <code>tomcat4x</code>, <code>resin2x</code>,
<code>orion1x</code>, <code>weblogic6x</code>,
<code>weblogic7x</code> and <code>jboss3x</code>.
names are: <code>tomcat4x</code>, <code>tomcat5x</code>,
<code>resin2x</code>, <code>orion1x</code>,
<code>orion2x</code> and <code>jboss3x</code>.
</p>
</td>
</tr>
@ -47,16 +47,6 @@
</p>
</td>
</tr>
<tr>
<td>cactus.target.dir</td>
<td>Yes</td>
<td>
<p>
Location where the plugins puts temporary build-generated
files. Default value is <code>${maven.build.dir}/cactus</code>.
</p>
</td>
</tr>
<tr>
<td>cactus.src.includes</td>
<td>Yes</td>
@ -77,17 +67,6 @@
</p>
</td>
</tr>
<tr>
<td>cactus.context</td>
<td>Yes</td>
<td>
<p>
Name of the webapp context under which the application will be
deployed for executing the Cactus tests. Default
value is <code>cactustest</code>.
</p>
</td>
</tr>
<tr>
<td>cactus.junit.usefile</td>
<td>Yes</td>
@ -130,6 +109,22 @@
</p>
</td>
</tr>
<tr>
<td>cactus.src.mergewebxml</td>
<td>Yes</td>
<td>
<p>
Location of a test-specific web.xml file that will be merged with
the application web.xml, during the War cactification. Note that
by default the cactification already adds the Cactus redirector
definitions.Decides whether to stop the build on test failures.
Example:
<code>cactus.src.mergewebxml = ${basedir}/src/conf/cactus-web.xml</code>.
</p>
</td>
</tr>
<!--
<tr>
<td>cactus.runner</td>
<td>Yes</td>
@ -140,26 +135,17 @@
</p>
</td>
</tr>
-->
</table>
</section>
<section name="Cactus/JBoss Settings">
<section name="Cactus/JBoss 3.x Settings">
<table>
<tr>
<th>Property</th>
<th>Optional?</th>
<th>Description</th>
</tr>
<tr>
<td>cactus.jboss3x.config.dir</td>
<td>Yes</td>
<td>
<p>
Location of the JBoss server configuration directory.
Default value is <code>${cactus.home.jboss3x}</code>.
</p>
</td>
</tr>
<tr>
<td>cactus.jboss3x.config.name</td>
<td>Yes</td>
@ -172,6 +158,130 @@
</tr>
</table>
</section>
<section name="Cactus/Resin 2.x Settings">
<table>
<tr>
<th>Property</th>
<th>Optional?</th>
<th>Description</th>
</tr>
<tr>
<td>cactus.resin2x.config</td>
<td>Yes</td>
<td>
<p>
Location of the Resin 2.x configuration file if you don't want
to use the cactus-provided one.
</p>
</td>
</tr>
</table>
</section>
<section name="Cactus/Tomcat 4.x Settings">
<table>
<tr>
<th>Property</th>
<th>Optional?</th>
<th>Description</th>
</tr>
<tr>
<td>cactus.tomcat4x.config</td>
<td>Yes</td>
<td>
<p>
Location of the Tomcat 4.x configuration file if you don't want
to use the cactus-provided one.
</p>
</td>
</tr>
<tr>
<td>cactus.tomcat4x.conf.dir</td>
<td>Yes</td>
<td>
<p>
Location of custom Tomcat 4.x configuration file that will be
copied, overwriting the Cactus-provided configuration files.
</p>
</td>
</tr>
<tr>
<td>cactus.tomcat4x.conf.includes</td>
<td>Yes</td>
<td>
<p>
Configuration files located at
<code>${cactus.tomcat4x.conf.dir</code> that should be included
in the Tomcat 4.x container set up by Cactus.
</p>
</td>
</tr>
<tr>
<td>cactus.tomcat4x.conf.excludes</td>
<td>Yes</td>
<td>
<p>
Configuration files located at
<code>${cactus.tomcat4x.conf.dir</code> that should not be
included in the Tomcat 4.x container set up by Cactus.
</p>
</td>
</tr>
</table>
</section>
<section name="Cactus/Tomcat 5.x Settings">
<table>
<tr>
<th>Property</th>
<th>Optional?</th>
<th>Description</th>
</tr>
<tr>
<td>cactus.tomcat5x.config</td>
<td>Yes</td>
<td>
<p>
Location of the Tomcat 5.x configuration file if you don't want
to use the cactus-provided one.
</p>
</td>
</tr>
<tr>
<td>cactus.tomcat5x.conf.dir</td>
<td>Yes</td>
<td>
<p>
Location of custom Tomcat 5.x configuration file that will be
copied, overwriting the Cactus-provided configuration files.
</p>
</td>
</tr>
<tr>
<td>cactus.tomcat5x.conf.includes</td>
<td>Yes</td>
<td>
<p>
Configuration files located at
<code>${cactus.tomcat5x.conf.dir</code> that should be included
in the Tomcat 5.x container set up by Cactus.
</p>
</td>
</tr>
<tr>
<td>cactus.tomcat5x.conf.excludes</td>
<td>Yes</td>
<td>
<p>
Configuration files located at
<code>${cactus.tomcat5x.conf.dir</code> that should not be
included in the Tomcat 5.x container set up by Cactus.
</p>
</td>
</tr>
</table>
</section>
</body>
</document>

View File

@ -12,7 +12,7 @@
Lists of todos and ideas for future versions.
</p>
<subsection name="2.1">
<subsection name="3.1">
<p>
<ul>
<li>

View File

@ -19,17 +19,18 @@
Create a <code>build.properties</code> file in your project root
directory (where <code>project.xml</code> is located) and define in
it the location of the container you wish to use for the tests. For
example, if you wish to run the Cactus tests on Tomcat 4.1.10 and on
Resin 2.4, you will write:
example, if you wish to run the Cactus tests on Tomcat 4.1.24 and on
Resin 2.6, you will write:
</li>
<source><![CDATA[
cactus.home.tomcat4x = C:/Apps/jakarta-tomcat-4.1.10
cactus.home.resin2x = C:/Apps/resin-2.1.4
cactus.home.tomcat4x = C:/Apps/jakarta-tomcat-4.1.24
cactus.home.resin2x = C:/Apps/resin-2.1.6
]]></source>
<li>
Then, simply type <code>maven cactus:test</code> to run the Cactus
Then, simply type <code>maven cactus:test</code> (or
<code>maven cactus</code> for short) to run the Cactus
tests.
</li>
</ol>