You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by vm...@apache.org on 2003/05/23 23:05:56 UTC

cvs commit: maven/src/plugins-build/cactus/sample build.properties.sample project.xml

vmassol     2003/05/23 14:05:56

  Modified:    src/plugins-build/cactus project.xml project.properties
                        plugin.properties plugin.jelly
               src/plugins-build/cactus/xdocs properties.xml tasks.xml
                        changes.xml using.xml goals.xml
               src/plugins-build/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample
                        TestSampleBodyTag.java
               src/plugins-build/cactus/sample project.xml
  Added:       src/plugins-build/cactus/src/plugin-resources/jboss3x
                        users.properties jboss-web.xml roles.properties
               src/plugins-build/cactus/sample build.properties.sample
  Removed:     src/plugins-build/cactus maven.xml
  Log:
  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).
  
  Revision  Changes    Path
  1.23      +13 -25    maven/src/plugins-build/cactus/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/cactus/project.xml,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- project.xml	9 May 2003 10:59:26 -0000	1.22
  +++ project.xml	23 May 2003 21:05:56 -0000	1.23
  @@ -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>
  +      <artifactId>cactus</artifactId>
  +      <version>13-1.5dev-20030522</version>
       </dependency>
  -    <!-- Runtime dependencies -->
  -
       <dependency>
         <groupId>cactus</groupId>
  -      <artifactId>cactus-framework</artifactId>&gt;
  -      <version>13-1.5dev-20030407</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>
  @@ -101,22 +92,18 @@
         <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>
  
  
  
  1.9       +0 -10     maven/src/plugins-build/cactus/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/cactus/project.properties,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- project.properties	9 May 2003 10:59:27 -0000	1.8
  +++ project.properties	23 May 2003 21:05:56 -0000	1.9
  @@ -5,13 +5,3 @@
   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
  
  
  
  1.9       +48 -15    maven/src/plugins-build/cactus/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/cactus/plugin.properties,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- plugin.properties	7 Apr 2003 10:34:18 -0000	1.8
  +++ plugin.properties	23 May 2003 21:05:56 -0000	1.9
  @@ -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
  +
  +# Shall we stop the build in case of test failures?
  +cactus.halt.on.failure = true
   
  -# Location of the JBoss server configuration directory.
  -cactus.jboss3x.config.dir = ${cactus.home.jboss3x}/server
  +# Shall we stop the build in case of test errors?
  +cactus.halt.on.error = true
   
  -# Name of the JBoss server configuration to use
  +# -------------------------------------------------------------------
  +# 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 =
  
  
  
  1.14      +279 -100  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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- plugin.jelly	30 Mar 2003 16:18:05 -0000	1.13
  +++ plugin.jelly	23 May 2003 21:05:56 -0000	1.14
  @@ -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"/>
  +
  +    <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">
   
  -    <!-- TODO: Verify here that the war or webapp exists -->
  +    <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')}">
  +
  +          <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}"/>
   
  -    <taskdef name="junit"
  -      classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
  +        <!-- 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">
  +
  +    <!-- 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>
  +
  +    <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}"/>
  +
  +        <orion1x if="cactus.home.orion1x"
  +            dir="${cactus.home.orion1x}" port="${cactus.port}"
  +            output="${cactus.reports.dir}/orion1x.out"
  +            todir="${cactus.reports.dir}/orion1x"/>
  +
  +        <orion2x if="cactus.home.orion2x"
  +            dir="${cactus.home.orion2x}" port="${cactus.port}"
  +            output="${cactus.reports.dir}/orion2x.out"
  +            todir="${cactus.reports.dir}/orion2x"/>
  +
  +        <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>
  +
  +        <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>
  +
  +      </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>
  +
  +    <!-- 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: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:if test="${context.getVariable('cactus.home.orion1x') != null}">
  +        <ant:fileset dir="${cactus.reports.dir}/orion1x">
  +          <ant:include name="TEST-*.xml"/>
  +        </ant:fileset>
  +      </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>
   
  -    <!-- 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 -->
  -
  -    <fileScanner var="scanner">
  -      <fileset dir="${maven.cactus.antintegration.dir}/scripts" 
  -        includes="build-tests-*.xml"/>
  -    </fileScanner>
  -
  -    <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'}">
  -
  -        <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}"/>
  -
  -          <property name="cactus.jboss3x.config.dir" 
  -            value="${cactus.jboss3x.config.dir}"/>
  -          <property name="cactus.jboss3x.config.name" 
  -            value="${cactus.jboss3x.config.name}"/>
  -        </ant>
  -
  -        <j:set var="containerFound" value="true"/>
  -      </j:if>
  -
  -    </j:forEach>       
  -
  -    <!-- 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.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>
   
  
  
  
  1.8       +141 -31   maven/src/plugins-build/cactus/xdocs/properties.xml
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/cactus/xdocs/properties.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- properties.xml	8 Apr 2003 21:40:20 -0000	1.7
  +++ properties.xml	23 May 2003 21:05:56 -0000	1.8
  @@ -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>
  @@ -48,16 +48,6 @@
             </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>
             <td>
  @@ -78,17 +68,6 @@
             </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>
             <td>
  @@ -131,6 +110,22 @@
             </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>
             <td>
  @@ -140,10 +135,11 @@
               </p>
             </td>
           </tr>
  +-->
         </table>
       </section>
   
  -    <section name="Cactus/JBoss Settings">
  +    <section name="Cactus/JBoss 3.x Settings">
         <table>
           <tr>
             <th>Property</th>
  @@ -151,27 +147,141 @@
             <th>Description</th>
           </tr>
           <tr>
  -          <td>cactus.jboss3x.config.dir</td>
  +          <td>cactus.jboss3x.config.name</td>
             <td>Yes</td>
             <td>
               <p>
  -              Location of the JBoss server configuration directory.
  -              Default value is <code>${cactus.home.jboss3x}</code>.
  +              Name of the JBoss server configuration to use.
  +              Default value is <code>default</code>.
               </p>
             </td>
           </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.jboss3x.config.name</td>
  +          <td>cactus.resin2x.config</td>
             <td>Yes</td>
             <td>
               <p>
  -              Name of the JBoss server configuration to use.
  -              Default value is <code>default</code>.
  +              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>
  
  
  
  1.6       +1 -1      maven/src/plugins-build/cactus/xdocs/tasks.xml
  
  Index: tasks.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/cactus/xdocs/tasks.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- tasks.xml	8 Apr 2003 22:26:48 -0000	1.5
  +++ tasks.xml	23 May 2003 21:05:56 -0000	1.6
  @@ -12,7 +12,7 @@
         	Lists of todos and ideas for future versions.
         </p>
   
  -      <subsection name="2.1">
  +      <subsection name="3.1">
           <p>
             <ul>
               <li>
  
  
  
  1.8       +4 -7      maven/src/plugins-build/cactus/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/cactus/xdocs/changes.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- changes.xml	9 May 2003 10:59:27 -0000	1.7
  +++ changes.xml	23 May 2003 21:05:56 -0000	1.8
  @@ -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">
  
  
  
  1.5       +6 -5      maven/src/plugins-build/cactus/xdocs/using.xml
  
  Index: using.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/cactus/xdocs/using.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- using.xml	8 Apr 2003 21:40:20 -0000	1.4
  +++ using.xml	23 May 2003 21:05:56 -0000	1.5
  @@ -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>
  
  
  
  1.5       +13 -0     maven/src/plugins-build/cactus/xdocs/goals.xml
  
  Index: goals.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/cactus/xdocs/goals.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- goals.xml	8 Apr 2003 21:40:20 -0000	1.4
  +++ goals.xml	23 May 2003 21:05:56 -0000	1.5
  @@ -9,6 +9,19 @@
     <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>
             Run the Cactus tests on the containers for which you have defined
  
  
  
  1.1                  maven/src/plugins-build/cactus/src/plugin-resources/jboss3x/users.properties
  
  Index: users.properties
  ===================================================================
  testuser=testpassword
  admin=admin
  
  
  
  1.1                  maven/src/plugins-build/cactus/src/plugin-resources/jboss3x/jboss-web.xml
  
  Index: jboss-web.xml
  ===================================================================
  <jboss-web>
    <security-domain>java:/jaas/other</security-domain>
  </jboss-web>
  
  
  
  1.1                  maven/src/plugins-build/cactus/src/plugin-resources/jboss3x/roles.properties
  
  Index: roles.properties
  ===================================================================
  testuser=test
  admin=JBossAdmin
  
  
  
  1.2       +9 -5      maven/src/plugins-build/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestSampleBodyTag.java
  
  Index: TestSampleBodyTag.java
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestSampleBodyTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestSampleBodyTag.java	22 Mar 2003 16:39:09 -0000	1.1
  +++ TestSampleBodyTag.java	23 May 2003 21:05:56 -0000	1.2
  @@ -72,7 +72,8 @@
    *
    * @version $Id$
    */
  -public class TestSampleBodyTag extends JspTestCase {
  +public class TestSampleBodyTag extends JspTestCase
  +{
       private SampleBodyTag tag;
       private BodyContent tagContent;
   
  @@ -91,7 +92,8 @@
        *
        * @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 @@
        * @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 @@
        * 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);
   
  
  
  
  1.2       +9 -1      maven/src/plugins-build/cactus/sample/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/cactus/sample/project.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.xml	22 Mar 2003 16:39:10 -0000	1.1
  +++ project.xml	23 May 2003 21:05:56 -0000	1.2
  @@ -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>
  @@ -63,5 +63,13 @@
     <build>
       <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>
  
  
  
  1.1                  maven/src/plugins-build/cactus/sample/build.properties.sample
  
  Index: build.properties.sample
  ===================================================================
  # 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
  
  
  
  

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