diff --git a/cactus/.cvsignore b/cactus/.cvsignore deleted file mode 100644 index f7c90c3b..00000000 --- a/cactus/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -target -maven.log -velocity.log -build.properties -.classpath -.project diff --git a/cactus/announcements/1.0.ann b/cactus/announcements/1.0.ann deleted file mode 100644 index fbe2c091..00000000 --- a/cactus/announcements/1.0.ann +++ /dev/null @@ -1,29 +0,0 @@ -The Maven team is pleased to announce the Cactus plugin 1.0 release! - -http://jakarta.apache.org/turbine/maven/reference/plugins/cactus - -The Maven Cactus plugin is a plugin for Cactus -(http://jakarta.apache.org/cactus) that allows to automatically start -containers, run Cactus tests and stop the containers. - -Features in this version includes: - -o Support for Tomcat 4.x - -o Support for Resin 2.x - -o HTML report generation (integrated with Maven reports) - -o Support for keeping the server running between redeployments - -Limitations: - -o Bug when overriding the cactus web.xml in one's project - -o Supports only the Servlet API 2.3 - -You can download the Cactus Maven plugin here: -http://www.ibiblio.org/maven/maven/jars/maven-cactus-plugin-1.0.jar - -Have fun! --Vincent \ No newline at end of file diff --git a/cactus/announcements/1.1.ann b/cactus/announcements/1.1.ann deleted file mode 100644 index 49513864..00000000 --- a/cactus/announcements/1.1.ann +++ /dev/null @@ -1,34 +0,0 @@ -The Maven team is pleased to announce the Cactus plugin 1.1 release! - -http://jakarta.apache.org/turbine/maven/reference/plugins/cactus - -The Maven Cactus plugin is a plugin for Cactus -(http://jakarta.apache.org/cactus) that allows to automatically start -containers, run Cactus tests and stop the containers. - -Changes in this version: - -o Added support for HttpUnit integration out of the box (i.e. the - HttpUnit jars are automatically added by the Cactus plugin). -o Ability to exclude Cactus tests (for long running tests for example, - in debug period). -o The web.xml elements required for Cactus are now automatically added to the - user project web.xml. -o Added support for running the tests using the JUnit Swing Test Runner. - Simply create the following Maven property - "maven.cactus.testrunner = swing" to use the Swing Test Runner. -o Added automatic discovery of Cactus Test Cases and ignore test support - classes. -o Creation of the project war/webapp is now left to the Maven War plugin. - Cactus repackages it by adding the Cactus tests, the Cactus - configuration files and the Cactus external jars. Thus, the Cactus - plugin now supports the "war:webapp" goal. -o Improved documentation: "news" section on front page and improved - "Quick Start" page. -o Support for WebLogic 7.x. - -You can download the Cactus Maven plugin here: -http://www.ibiblio.org/maven/maven/jars/maven-cactus-plugin-1.1.jar - -Have fun! --Vincent \ No newline at end of file diff --git a/cactus/announcements/1.2.ann b/cactus/announcements/1.2.ann deleted file mode 100644 index 59978a4a..00000000 --- a/cactus/announcements/1.2.ann +++ /dev/null @@ -1,32 +0,0 @@ -The Maven team is pleased to announce the Cactus plugin 1.2 release! - -http://maven.apache.org/reference/plugins/cactus - -The Maven Cactus plugin is a plugin for Cactus -(http://jakarta.apache.org/cactus) that allows to automatically start -containers, run Cactus tests and stop the containers. - -Changes in this version: - -o Update the plugin to make it work in Maven beta 8 -o Checkstyle fixes for included Sample webapp. -o Add new target cactus:test that runs tests for all containers with a - maven.cactus.[container].home property set. -o cactus:single now builds all the code and then runs the testcase specified - by the property mavencactustestcase. - Example: maven cactus:single -Dmavencactustestcase=com.my.company.EasyTest -o Commented out dvsl merging of web.xml due to changes in Maven. Instead uses - either included default web.xml or one provided by maven.cactus.webxml. -o Added Checkstyle report to Cactus plugin web site. -o The plugin now works even if not connected to the internet. -o Fixed problem when the web.xml of the application to - test was defining security configuration. The Cactus was adding its - own but the web.xml DTD only supports one. The new implementation - discards the application security information which is replaced by - the Cactus definition. - -You can download the Cactus Maven plugin here: -http://www.ibiblio.org/maven/maven/jars/maven-cactus-plugin-1.2.jar - -Have fun! --Vincent \ No newline at end of file diff --git a/cactus/announcements/2.0.ann b/cactus/announcements/2.0.ann deleted file mode 100644 index 759e0061..00000000 --- a/cactus/announcements/2.0.ann +++ /dev/null @@ -1,23 +0,0 @@ -The Maven team is pleased to announce the Cactus plugin 2.0 release! - -http://maven.apache.org/reference/plugins/cactus - -The Maven Cactus plugin is a plugin for Cactus -(http://jakarta.apache.org/cactus) that allows to automatically start -containers, run Cactus tests and stop the containers. - -Changes in this version: - -o Complete rework of the plugin to use the Cactus/Ant Integration - module from the Cactus project. Now using Cactus 1.5dev for J2EE - 1.3, built from CVS on 7th of April 2003. Thus the Plugin feature - are now those of the Cactus/Ant Integration module. - -Note that this plugin has been tested with Maven beta 9. Using it with -another version of Maven is at your own risks! :-) - -You can download the Cactus Maven plugin here: -http://www.ibiblio.org/maven/maven/jars/maven-cactus-plugin-2.0.jar - -Have fun! --Vincent \ No newline at end of file diff --git a/cactus/announcements/3.0.ann b/cactus/announcements/3.0.ann deleted file mode 100644 index bcc35bad..00000000 --- a/cactus/announcements/3.0.ann +++ /dev/null @@ -1,40 +0,0 @@ -The Maven team is pleased to announce the Cactus plugin 3.0 release! - -http://maven.apache.org/reference/plugins/cactus - -The Maven Cactus plugin is a plugin for Cactus -(http://jakarta.apache.org/cactus) that allows to automatically start -containers, run Cactus tests and stop the containers. - -User-visible changes in this version: - -o New goal cactus:match added that allows you to run just matching testcases. - Pass the testcase in using -Dtestmatch=MyTestCase. This brings to parity the - cactus plugin with the test plugin for running types of tests. -o New goal cactus:single added that allows you to run just a single testcase. - Pass the testcase in using -Dtestcase=my.single.TestCase. -o Add xml declaration to generated report. Fixed for character encoding. -o Ability to optionally specify for Tomcat 4x and 5x a directory to which - the container will be installed for the tests. -o Add all user jars that have been marked to be included in the cactus - test (with the true property - in dependencies). For example, DBUnit would be a jar you would - include in a Cactus test but not in a runtime war. -o Updated to Cactus/Ant of 19th of June 2003 which fixes a bug - preventing JBoss to start correctly on unix machines (caused by - an invalid URL file format on unix. Thanks to Chris Lenz for - fixing it. -o The cactus:compile goal now correctly copy the non java files to the target - class directory. -o Major change: updated to use the Cactus/Ant integration built after - 23rd of May 2003 (it is completely different from the Cactus/Ant - integration used in version 2.0. - -Note that this plugin has been tested with Maven beta 10. Using it with -another version of Maven is at your own risks! :-) - -You can download the Cactus Maven plugin here: -http://www.ibiblio.org/maven/maven/jars/maven-cactus-plugin-3.0.jar - -Have fun! --Vincent \ No newline at end of file diff --git a/cactus/announcements/3.1.ann b/cactus/announcements/3.1.ann deleted file mode 100644 index 8bd940e4..00000000 --- a/cactus/announcements/3.1.ann +++ /dev/null @@ -1,36 +0,0 @@ -The Maven team is pleased to announce the Cactus plugin 3.1 release! - -http://maven.apache.org/reference/plugins/cactus - -The Maven Cactus plugin is a plugin for Cactus -(http://jakarta.apache.org/cactus) that allows to automatically start -containers, run Cactus tests and stop the containers. - -User-visible changes in this version: - -o New cactus:jar-install goal to install the Cactus jar in the local Maven - repository. This is useful if you wish to put Cactus test classes in one - Maven project and execute the Cactus tests in another project. -o New cactus:jar goal to generate a jar containing the Cactus test classes. -o Added new cactus.tmp.dir optional property to specify a location where - Cactus will put its temporary files (mostly where it setup containers for - execution). Defaults to [java.io.tmpdir]/[containername]. -o Generate the Cactus test reports in the Cactus reports directory - instead of directly in the Maven build directory. This fixes bug MAVEN-669 -o Updated commons-httpclient dependency to 2.0 rc1, httpunit to 1.5.3 and - nekohtml to 0.7.7. -o Added new optional property cactus.weblogic7x.beahome to configure the - location of BEA HOME for the WebLogic 7.x container. It is only needed if - the BEA HOME location is not the parent directory of cactus.home.weblogic7x. -o Added back support for WebLogic 7.x (it had somehow been dropped - when we moved to the new Cactus/Ant integration in version 3.0). -o Updated to Cactus 1.6dev-20030830 which has fixes for WebLogic 7.x support. - -Note that this plugin has been tested with Maven 1.0 rc1. -Using it with another version of Maven is at your own risks! :-) - -You can download the Cactus Maven plugin here: -http://www.ibiblio.org/maven/maven/jars/maven-cactus-plugin-3.1.jar - -Have fun! --Vincent \ No newline at end of file diff --git a/cactus/announcements/3.2.ann b/cactus/announcements/3.2.ann deleted file mode 100644 index e0c992c6..00000000 --- a/cactus/announcements/3.2.ann +++ /dev/null @@ -1,22 +0,0 @@ -The Maven team is pleased to announce the Cactus plugin 3.2 release! - -http://maven.apache.org/reference/plugins/cactus - -The Maven Cactus plugin is a plugin for Cactus -(http://jakarta.apache.org/cactus) that allows to automatically start -containers, run Cactus tests and stop the containers. - -User-visible changes in this version: - -o Added documentation for cactus.bundle property that can be used in POM - dependency list. This fixes bug MAVEN-901. -o Updated to use Cactus 1.5-rc1, HttpClient 2.0 rc2 and AspectJ 1.1.1. - -Note that this plugin has been tested with Maven 1.0 rc1. -Using it with another version of Maven is at your own risks! :-) - -You can download the Cactus Maven plugin here: -http://www.ibiblio.org/maven/maven/plugins/maven-cactus-plugin-3.2.jar - -Have fun! --Vincent \ No newline at end of file diff --git a/cactus/plugin.jelly b/cactus/plugin.jelly deleted file mode 100644 index c22c79a9..00000000 --- a/cactus/plugin.jelly +++ /dev/null @@ -1,779 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No Cactus source files to compile. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - At least one test had a failure! - - - At least one test had an error! - - - - - - - - - - - You must define the test case to run via -Dtestcase=classname - Example: maven -Dtestcase=MyTest cactus:single - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - You must define the test case to match via -Dtestmatch=classname - Example: maven -Dtestmatch=MyTest cactus:match - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id = '${pom.artifactId}' - groupId = '${pom.groupId}' - artifactDirectory = '${pom.artifactDirectory}' - - - - - - - - diff --git a/cactus/plugin.properties b/cactus/plugin.properties deleted file mode 100644 index 4c8f5076..00000000 --- a/cactus/plugin.properties +++ /dev/null @@ -1,99 +0,0 @@ -# ------------------------------------------------------------------- -# Default properties for the Cactus Plugin -# ------------------------------------------------------------------- - -# Location of containers. These properties need to be put in your -# local project.properties as they depend on where you installed -# your containers on your local machine. -# -# Examples: -# -# cactus.home.tomcat4x = c:/apps/tomcat-4.1.10 -# -# Supported container names: jboss3x, tomcat4x, resin2x, orion1x, -# orion2x, tomcat5x - -# Location of Cactus tests in project sources -cactus.src.dir = ${basedir}/src/test-cactus - -# 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 - -# (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 false -cactus.junit.usefile = false - -# Location of junit test reports for the Cactus tests -cactus.reports.dir = ${maven.build.dir}/test-cactus-reports - -# Shall we stop the build in case of test failures? -cactus.halt.on.failure = true - -# Shall we stop the build in case of test errors? -cactus.halt.on.error = true - -# How summary information on test should be printed (see the -# "printsummary" attribute of the JUnit Ant task. -maven.cactus.printsummary = withOutAndErr - -# (optional) Temporary directory where the containers are setup/executed -#cactus.tmp.dir = - -# ------------------------------------------------------------------- -# 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 4.x directory to which the container will be installed for the tests. -# By default the system temporary directory is used -#cactus.tomcat4x.tmpdir = - -# (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 = - -# (optional). Tomcat 5.x directory to which the container will be installed for the tests. -# By default the system temporary directory is used -#cactus.tomcat5x.tmpdir = - -# (optional). Location of BEA HOME. If not specified it defaults to -# the parent directory of cactus.home.weblogic7x -#cactus.weblogic7x.beahome = - - diff --git a/cactus/project.properties b/cactus/project.properties deleted file mode 100644 index f8c80219..00000000 --- a/cactus/project.properties +++ /dev/null @@ -1,7 +0,0 @@ -# ------------------------------------------------------------------- -# P R O J E C T P R O P E R T I E S -# ------------------------------------------------------------------- -maven.xdoc.date=left -maven.xdoc.version=${pom.currentVersion} -maven.checkstyle.format = turbine -maven.license.licenseFile=${basedir}/../LICENSE.txt diff --git a/cactus/project.xml b/cactus/project.xml deleted file mode 100644 index d77b59a0..00000000 --- a/cactus/project.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - ../project.xml - 3 - maven-cactus-plugin - Maven Cactus Plug-in - 3.2 - Plugin for Cactus (http://jakarta.apache.org/cactus) that allows to automatically start containers, run Cactus tests and stop the containers. - Cactus plugin - http://maven.apache.org/reference/plugins/cactus/ - /www/maven.apache.org/reference/plugins/cactus/ - - scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/cactus/ - http://cvs.apache.org/viewcvs/maven-plugins/cactus/ - - - - 1.0 - 1.0 - MAVEN_CACTUS_1_0 - - - 1.1 - 1.1 - MAVEN_CACTUS_1_1 - - - 1.2 - 1.2 - MAVEN_CACTUS_1_2 - - - 2.0 - 2.0 - MAVEN_CACTUS_2_0 - - - 3.0 - 3.0 - MAVEN_CACTUS_3_0 - - - 3.1 - 3.1 - MAVEN_CACTUS_3_1 - - - 3.2 - 3.2 - MAVEN_CACTUS_3_2 - - - - - Vincent Massol - vmassol - vmassol@pivolis.com - Pivolis - - Creator - Java Developer - Release Manager - - - - Eric Pugh - epugh - EPugh@upstate.com - - - Java Developer - - - - - - - cactus - cactus - 13-1.5-rc1 - - - cactus - cactus-ant - 13-1.5-rc1 - - - commons-httpclient - commons-httpclient - 2.0-rc2 - - - commons-logging - commons-logging - 1.0.3 - - - aspectj - aspectjrt - 1.1.1 - - - junit - junit - 3.8.1 - - - - - httpunit - httpunit - 1.5.3 - - - nekohtml - nekohtml - 0.7.7 - - - xerces - xerces - 2.4.0 - - - xml-apis - xml-apis - 1.0.b2 - - - rhino - js - 1.5R4-RC3 - - - - maven-changes-plugin - maven-changelog-plugin - maven-file-activity-plugin - maven-developer-activity-plugin - maven-file-activity-plugin - maven-license-plugin - maven-linkcheck-plugin - - diff --git a/cactus/sample/.cvsignore b/cactus/sample/.cvsignore deleted file mode 100644 index 5ba1bbde..00000000 --- a/cactus/sample/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -target -cactus_client.log -maven.log -build.properties -velocity.log \ No newline at end of file diff --git a/cactus/sample/build.properties.sample b/cactus/sample/build.properties.sample deleted file mode 100644 index b906c2e4..00000000 --- a/cactus/sample/build.properties.sample +++ /dev/null @@ -1,4 +0,0 @@ -# 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 - diff --git a/cactus/sample/project.xml b/cactus/sample/project.xml deleted file mode 100644 index fe49ebab..00000000 --- a/cactus/sample/project.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - 3 - - - maven-cactus-sample - - - Cactus Sample - - - 1.0 - - - - Apache Software Foundation - http://jakarta.apache.org/ - - - - 2002-2003 - - - org.apache.maven.cactus.sample - - - A sample project using the Cactus plugin for Maven - - - http://maven.apache.org/ - - - - scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven - http://cvs.apache.org/viewcvs/maven/ - - - - - - - - - - - - servletapi> - servletapi> - 2.3 - - - - - - src/java - - - - maven-cactus-plugin - maven-checkstyle-plugin - maven-changelog-plugin - maven-file-activity-plugin - maven-developer-activity-plugin - maven-tasklist-plugin - maven-jxr-plugin - - - \ No newline at end of file diff --git a/cactus/sample/src/java/org/apache/maven/cactus/sample/SampleBodyTag.java b/cactus/sample/src/java/org/apache/maven/cactus/sample/SampleBodyTag.java deleted file mode 100644 index 4eb18af8..00000000 --- a/cactus/sample/src/java/org/apache/maven/cactus/sample/SampleBodyTag.java +++ /dev/null @@ -1,141 +0,0 @@ -package org.apache.maven.cactus.sample; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Maven" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Maven", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -import java.io.IOException; - -import javax.servlet.jsp.JspTagException; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.tagext.BodyTagSupport; - -/** - * Sample tag that interacts with its body. The tag acts as a filter for its - * body. "Target" and "Replacement" Strings are defined by the tag's attributes - * and each "occurrence" of the target is replaced by the "replacement". - * - * @author Nicholas Lesiecki - * - * @version $Id: SampleBodyTag.java,v 1.2 2003/08/19 04:45:06 dion Exp $ - */ -public class SampleBodyTag extends BodyTagSupport { - /** - * The substring to be replaced in the body. - */ - private String target; - - /** - * The substring that will replace the target in the body. - */ - private String replacement; - - /** - * Sets the substring to be replaced in the body. - * - * @param theTarget the substring to be replaced in the body - */ - public void setTarget(String theTarget) { - this.target = theTarget; - } - - /** - * Sets the substring that will replace the target in the body. - * - * @param theReplacement the replacement string - */ - public void setReplacement(String theReplacement) { - this.replacement = theReplacement; - } - - /** - * @see BodyTagSupport#doAfterBody() - */ - public int doAfterBody() throws JspTagException { - String contentString = this.bodyContent.getString(); - StringBuffer contentBuffer = new StringBuffer(contentString); - - int beginIndex = -1; - int targetLength = this.target.length(); - - // while instances of target still exist - while ((beginIndex = contentString.indexOf(this.target)) > -1) { - int endIndex = beginIndex + targetLength; - - contentBuffer.replace(beginIndex, endIndex, this.replacement); - - contentString = contentBuffer.toString(); - } - - // write out the changed body - JspWriter pageWriter = this.bodyContent.getEnclosingWriter(); - - try { - pageWriter.write(contentString); - } catch (IOException e) { - throw new JspTagException(e.getMessage()); - } - - return SKIP_BODY; - } - - /** - * @see BodyTagSupport#release() - */ - public void release() { - this.target = null; - this.replacement = null; - } -} \ No newline at end of file diff --git a/cactus/sample/src/java/org/apache/maven/cactus/sample/SampleFilter.java b/cactus/sample/src/java/org/apache/maven/cactus/sample/SampleFilter.java deleted file mode 100644 index 2a56693c..00000000 --- a/cactus/sample/src/java/org/apache/maven/cactus/sample/SampleFilter.java +++ /dev/null @@ -1,173 +0,0 @@ -package org.apache.maven.cactus.sample; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Maven" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Maven", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -import java.io.IOException; -import java.io.OutputStream; - -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletResponse; - -import org.apache.maven.cactus.sample.util.GenericResponseWrapper; - -/** - * Sample filter that implements some very simple business logic. The goal is - * to provide some functional tests for Cactus and examples for Cactus users. - * This filter simply adds a header and a footer to the returned HTML. - * - * @author Vincent Massol - * - * @version $Id: SampleFilter.java,v 1.2 2003/08/19 04:45:06 dion Exp $ - */ -public class SampleFilter implements Filter { - /** - * We need to save the filter config as the Fitler API does not offer - * a means to get the filter config ... except in the init() - */ - private FilterConfig config; - - /** - * Filter initialisation. Called by the servlet engine during the life - * cycle of the filter. - * - * @param theConfig the filter config - * - * @exception ServletException on failure - */ - public void init(FilterConfig theConfig) throws ServletException { - this.config = theConfig; - } - - /** - * Perform the filter function. Called by the container upon a request - * matching the filter pattern defined in web.xml. - * - * @param theRequest the incmoing HTTP request - * @param theResponse the returned HTTP response - * @param theChain the chain of filters extracted from the definition - * given in web.xml by the container. - * - * @exception ServletException on failure - * @exception IOException on failure - */ - public void doFilter(ServletRequest theRequest, - ServletResponse theResponse, FilterChain theChain) throws IOException, - ServletException { - OutputStream out = theResponse.getOutputStream(); - - addHeader(out); - - // Create a wrapper of the response so that we can later write to - // the response (add the footer). If we did not do this, we would - // get an error saying that the response has already been - // committed. - GenericResponseWrapper wrapper = - new GenericResponseWrapper((HttpServletResponse) theResponse); - - theChain.doFilter(theRequest, wrapper); - - out.write(wrapper.getData()); - addFooter(out); - out.close(); - } - - /** - * Write the header to the output stream. The header text is extracted - * from a filter initialisation parameter (defined in - * web.xml). Don't write anything if no parameter is defined. - * - * @param theOutputStream the output stream - * - * @exception IOException on failure - */ - protected void addHeader(OutputStream theOutputStream) throws IOException { - String header = this.config.getInitParameter("header"); - - if (header != null) { - theOutputStream.write(header.getBytes()); - } - } - - /** - * Write the footer to the output stream. The footer text is extracted - * from a filter initialisation parameter (defined in - * web.xml). Don't write anything if no parameter is defined. - * - * @param theOutputStream the output stream - * - * @exception IOException on failure - */ - protected void addFooter(OutputStream theOutputStream) throws IOException { - String footer = this.config.getInitParameter("footer"); - - if (footer != null) { - theOutputStream.write(footer.getBytes()); - } - } - - /** - * Filter un-initialisation. Called by the servlet engine during the life - * cycle of the filter. - */ - public void destroy() { - } -} \ No newline at end of file diff --git a/cactus/sample/src/java/org/apache/maven/cactus/sample/SampleServlet.java b/cactus/sample/src/java/org/apache/maven/cactus/sample/SampleServlet.java deleted file mode 100644 index 16bd8e9e..00000000 --- a/cactus/sample/src/java/org/apache/maven/cactus/sample/SampleServlet.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.apache.maven.cactus.sample; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Maven" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Maven", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -/** - * Sample servlet that implements some very simple business logic. The goal is - * to provide some functional tests for Cactus and examples for Cactus users. - * This servlet simply checks is a user is authenticated - * - * @author Vincent Massol - * @author Eric Pugh - * - * @version $Id: SampleServlet.java,v 1.2 2003/08/19 04:45:06 dion Exp $ - */ - -public class SampleServlet extends HttpServlet { - - /** - *Take a request object and return whether the user is authenticated o not. - * - * @param request the HttpServletRequest object - * - * @return boolean whether the request is by an authenticated user or not - * - */ - public boolean isAuthenticated(HttpServletRequest request) { - HttpSession session = request.getSession(false); - - if (session == null) { - return false; - } - - String authenticationAttribute = - (String) session.getAttribute("authenticated"); - - return new Boolean(authenticationAttribute).booleanValue(); - } -} diff --git a/cactus/sample/src/java/org/apache/maven/cactus/sample/util/FilterServletOutputStream.java b/cactus/sample/src/java/org/apache/maven/cactus/sample/util/FilterServletOutputStream.java deleted file mode 100644 index 5b993511..00000000 --- a/cactus/sample/src/java/org/apache/maven/cactus/sample/util/FilterServletOutputStream.java +++ /dev/null @@ -1,118 +0,0 @@ -package org.apache.maven.cactus.sample.util; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Maven" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Maven", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -import java.io.DataOutputStream; -import java.io.IOException; -import java.io.OutputStream; - -import javax.servlet.ServletOutputStream; - -/** - * Helper class to help write filters that manipulates the output stream. This - * is because normally, the ServletOutputStream cannot be - * modified after a resource has committed it. - * - * Note: This code was adapted from the Filter tutorial found - * {@link - * here} - * - * @author Vincent Massol - * - * @version $Id: FilterServletOutputStream.java,v 1.2 2003/08/19 04:45:07 dion Exp $ - * - * @see GenericResponseWrapper - */ -public class FilterServletOutputStream extends ServletOutputStream { - /** - * The stream where all the data will get written to - */ - private DataOutputStream stream; - - /** - * Constructor. - * - * @param theOutput the output stream that we wrap in a - * DataOutputStream in order to hold the data - */ - public FilterServletOutputStream(OutputStream theOutput) { - stream = new DataOutputStream(theOutput); - } - - // Overriden methods from ServletOutputStream ---------------------------- - - /** - * @see ServletOutputStream#write(int) - */ - public void write(int b) throws IOException { - stream.write(b); - } - - /** - * @see ServletOutputStream#write(byte[]) - */ - public void write(byte[] b) throws IOException { - stream.write(b); - } - - /** - * @see ServletOutputStream#write(byte[], int, int) - */ - public void write(byte[] b, int off, int len) throws IOException { - stream.write(b, off, len); - } -} \ No newline at end of file diff --git a/cactus/sample/src/java/org/apache/maven/cactus/sample/util/GenericResponseWrapper.java b/cactus/sample/src/java/org/apache/maven/cactus/sample/util/GenericResponseWrapper.java deleted file mode 100644 index c6c4ef19..00000000 --- a/cactus/sample/src/java/org/apache/maven/cactus/sample/util/GenericResponseWrapper.java +++ /dev/null @@ -1,170 +0,0 @@ -package org.apache.maven.cactus.sample.util; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Maven" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Maven", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -import java.io.ByteArrayOutputStream; -import java.io.PrintWriter; - -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpServletResponseWrapper; - -/** - * Wrapper around a HttpServletResponse that we use to easily - * write filters that manipulate the output stream. Indeed, we cannot pass - * the output stream of our filter direectly to the next filter in the chain - * because then we won't be able to write to it (the response will have been - * committed). Instead, we pass this wrapper class and then copy its data - * to our filter output stream. - * - * Note: This code was adapted from the Filter tutorial found - * {@link - * here} - * - * @author Vincent Massol - * - * @version $Id: GenericResponseWrapper.java,v 1.2 2003/08/19 04:45:07 dion Exp $ - * - * @see FilterServletOutputStream - */ -public class GenericResponseWrapper extends HttpServletResponseWrapper { - /** - * Holder for the output data - */ - private ByteArrayOutputStream output; - - /** - * Save the content length so that we can query it at a later time - * (otherwise it would not be possible as - * HttpServletResponseWrapper does not have a method to get - * the content length). - */ - private int contentLength; - - /** - * Save the content type so that we can query it at a later time - * (otherwise it would not be possible as - * HttpServletResponseWrapper does not have a method to get - * the content type). - */ - private String contentType; - - // Constructors ---------------------------------------------------------- - - /** - * @param theResponse the wrapped response object - */ - public GenericResponseWrapper(HttpServletResponse theResponse) { - super(theResponse); - this.output = new ByteArrayOutputStream(); - } - - // New methods ----------------------------------------------------------- - - /** - * @return the data sent to the output stream - */ - public byte[] getData() { - return output.toByteArray(); - } - - // Overridden methods ---------------------------------------------------- - - /** - * @see HttpServletResponseWrapper#getOutputStream() - */ - public ServletOutputStream getOutputStream() { - return new FilterServletOutputStream(this.output); - } - - /** - * @see HttpServletResponseWrapper#setContentLength(int) - */ - public void setContentLength(int theLength) { - this.contentLength = theLength; - super.setContentLength(theLength); - } - - /** - * @see HttpServletResponseWrapper#getContentLength() - */ - public int getContentLength() { - return this.contentLength; - } - - /** - * @see HttpServletResponseWrapper#setContentType(String) - */ - public void setContentType(String theType) { - this.contentType = theType; - super.setContentType(theType); - } - - /** - * @see HttpServletResponseWrapper#getContentType() - */ - public String getContentType() { - return this.contentType; - } - - /** - * @see HttpServletResponseWrapper#getWriter() - */ - public PrintWriter getWriter() { - return new PrintWriter(getOutputStream(), true); - } -} \ No newline at end of file diff --git a/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestHttpUnitIntegration.java b/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestHttpUnitIntegration.java deleted file mode 100644 index 4ed8797b..00000000 --- a/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestHttpUnitIntegration.java +++ /dev/null @@ -1,127 +0,0 @@ -package org.apache.maven.cactus.sample; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Maven" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Maven", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -import java.io.IOException; -import java.io.PrintWriter; - -import org.apache.cactus.ServletTestCase; - -/** - * Test the HtppUnit integration. - * - * @author Vincent Massol - * - * @version $Id: TestHttpUnitIntegration.java,v 1.2 2003/08/19 04:45:06 dion Exp $ - */ -public class TestHttpUnitIntegration extends ServletTestCase -{ - /** - * Verify that the HttpUnit integration works. - * - * @exception IOException on test failure - */ - public void testHttpUnitGetText() throws IOException - { - PrintWriter pw = response.getWriter(); - - pw.print("something to return for the test"); - } - - /** - * Verify that HttpUnit integration works - * - * @param theResponse the response from the server side. - * - * @exception IOException on test failure - */ - public void endHttpUnitGetText( - com.meterware.httpunit.WebResponse theResponse) throws IOException - { - String text = theResponse.getText(); - - assertEquals("something to return for the test", text); - } - - //------------------------------------------------------------------------- - - /** - * Verify that we can set several headers in the response and - * assert them in endXXX(). - */ - public void testResponseAddHeadersHttpUnit() - { - response.addHeader("X-Access-Header1", "value1"); - response.addHeader("X-Access-Header2", "value2"); - } - - /** - * Verify that we can set several headers in the response and - * assert them in endXXX(). - * - * @param theResponse the response from the server side. - */ - public void endResponseAddHeadersHttpUnit( - com.meterware.httpunit.WebResponse theResponse) - { - String value1 = theResponse.getHeaderField("X-Access-Header1"); - String value2 = theResponse.getHeaderField("X-Access-Header2"); - - assertEquals("value1", value1); - assertEquals("value2", value2); - } -} diff --git a/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestSampleBodyTag.java b/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestSampleBodyTag.java deleted file mode 100644 index 637dca3d..00000000 --- a/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestSampleBodyTag.java +++ /dev/null @@ -1,170 +0,0 @@ -package org.apache.maven.cactus.sample; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Maven" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Maven", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -import javax.servlet.jsp.tagext.BodyContent; -import javax.servlet.jsp.tagext.BodyTag; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.apache.cactus.JspTestCase; -import org.apache.cactus.WebResponse; - -/** - * Tests of the SampleBodyTag class. - * - * @author Nciholas Lesiecki - * - * @version $Id: TestSampleBodyTag.java,v 1.3 2003/08/19 04:45:06 dion Exp $ - */ -public class TestSampleBodyTag extends JspTestCase -{ - private SampleBodyTag tag; - private BodyContent tagContent; - - /** - * Defines the testcase name for JUnit. - * - * @param theName the testcase's name. - */ - public TestSampleBodyTag(String theName) - { - super(theName); - } - - /** - * Start the tests. - * - * @param theArgs the arguments. Not used - */ - public static void main(String[] theArgs) - { - junit.swingui.TestRunner.main( - new String[] { TestSampleBodyTag.class.getName() }); - } - - /** - * @return a test suite (TestSuite) that includes all methods - * starting with "test" - */ - public static Test suite() - { - // All methods starting with "test" will be executed in the test suite. - return new TestSuite(TestSampleBodyTag.class); - } - - /** - * 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() - { - this.tag = new SampleBodyTag(); - this.tag.setPageContext(this.pageContext); - - //create the BodyContent object and call the setter on the tag instance - this.tagContent = this.pageContext.pushBody(); - this.tag.setBodyContent(this.tagContent); - } - - //------------------------------------------------------------------------- - - /** - * Sets the replacement target and replacement String on the tag, then calls - * doAfterBody(). Most of the assertion work is done in endReplacement(). - */ - public void testReplacement() throws Exception - { - //set the target and the String to replace it with - this.tag.setTarget("@target@"); - this.tag.setReplacement("replacement"); - - //add the tag's body by writing to the BodyContent object created in - //setUp() - this.tagContent.println("@target@ is now @target@"); - this.tagContent.println("@target@_@target@"); - - //none of the other life cycle methods need to be implemented, so they - //do not need to be called. - int result = this.tag.doAfterBody(); - - assertEquals(BodyTag.SKIP_BODY, result); - } - - public void tearDown() - { - //necessary for tag to output anything on most servlet engines. - this.pageContext.popBody(); - } - - /** - * Verifies that the target String has indeed been replaced in the tag's - * body. - */ - public void endReplacement(WebResponse theResponse) - { - String content = theResponse.getText(); - - assertTrue("Response should have contained the [" - + "replacement is now replacement] string", - content.indexOf("replacement is now replacement") > -1); - assertTrue("Response should have contained the [" - + "replacement_replacement] string", - content.indexOf("replacement") > -1); - } -} \ No newline at end of file diff --git a/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestSampleFilter.java b/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestSampleFilter.java deleted file mode 100644 index 14fc7bc8..00000000 --- a/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestSampleFilter.java +++ /dev/null @@ -1,259 +0,0 @@ -package org.apache.maven.cactus.sample; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Maven" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Maven", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.apache.cactus.FilterTestCase; -import org.apache.cactus.WebResponse; - -/** - * Tests of the SampleFilter filter class. - * - * @author Vincent Massol - * - * @version $Id: TestSampleFilter.java,v 1.2 2003/08/19 04:45:06 dion Exp $ - */ -public class TestSampleFilter extends FilterTestCase -{ - /** - * Defines the testcase name for JUnit. - * - * @param theName the testcase's name. - */ - public TestSampleFilter(String theName) - { - super(theName); - } - - /** - * Start the tests. - * - * @param theArgs the arguments. Not used - */ - public static void main(String[] theArgs) - { - junit.swingui.TestRunner.main( - new String[] { TestSampleFilter.class.getName() }); - } - - /** - * @return a test suite (TestSuite) that includes all methods - * starting with "test" - */ - public static Test suite() - { - // All methods starting with "test" will be executed in the test suite. - return new TestSuite(TestSampleFilter.class); - } - - //------------------------------------------------------------------------- - - /** - * Test that adding a header to the output stream is working fine when - * a header parameter is defined. - * - * @exception ServletException on test failure - * @exception IOException on test failure - */ - public void testAddHeaderParamOK() throws ServletException, IOException - { - SampleFilter filter = new SampleFilter(); - - config.setInitParameter("header", "

header

"); - filter.init(config); - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - filter.addHeader(baos); - - assertEquals("

header

", baos.toString()); - } - - //------------------------------------------------------------------------- - - /** - * Test that adding a header to the output stream is working fine - * (i.e. nothing gets written) when no header parameter is defined. - * - * @exception ServletException on test failure - * @exception IOException on test failure - */ - public void testAddHeaderParamNotDefined() throws ServletException, - IOException - { - SampleFilter filter = new SampleFilter(); - - filter.init(config); - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - filter.addHeader(baos); - - assertEquals("", baos.toString()); - } - - //------------------------------------------------------------------------- - - /** - * Test that adding a footer to the output stream is working fine when - * a footer parameter is defined. - * - * @exception ServletException on test failure - * @exception IOException on test failure - */ - public void testAddFooterParamOK() throws ServletException, IOException - { - SampleFilter filter = new SampleFilter(); - - config.setInitParameter("footer", "

footer

"); - filter.init(config); - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - filter.addFooter(baos); - - assertEquals("

footer

", baos.toString()); - } - - //------------------------------------------------------------------------- - - /** - * Test that adding a footer to the output stream is working fine - * (i.e. nothing gets written) when no footer parameter is defined. - * - * @exception ServletException on test failure - * @exception IOException on test failure - */ - public void testAddFooterParamNotDefined() throws ServletException, - IOException - { - SampleFilter filter = new SampleFilter(); - - filter.init(config); - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - filter.addFooter(baos); - - assertEquals("", baos.toString()); - } - - //------------------------------------------------------------------------- - - /** - * Test that the filter does correctly add a header and footer to - * any requets it is serving. - * - * @exception ServletException on test failure - * @exception IOException on test failure - */ - public void testDoFilterOK() throws ServletException, IOException - { - SampleFilter filter = new SampleFilter(); - - config.setInitParameter("header", "

header

"); - config.setInitParameter("footer", "

footer

"); - filter.init(config); - - FilterChain mockFilterChain = new FilterChain() - { - public void doFilter(ServletRequest theRequest, - ServletResponse theResponse) throws IOException, - ServletException - { - PrintWriter writer = theResponse.getWriter(); - - writer.print("

some content

"); - writer.close(); - } - - public void init(FilterConfig theConfig) - { - } - - public void destroy() - { - } - }; - - filter.doFilter(request, response, mockFilterChain); - } - - /** - * Test that the filter does correctly add a header and footer to - * any requets it is serving. - * - * @param theResponse the response from the server side. - */ - public void endDoFilterOK(WebResponse theResponse) - { - assertEquals("

header

some content

footer

", - theResponse.getText()); - } -} \ No newline at end of file diff --git a/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestSampleServlet.java b/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestSampleServlet.java deleted file mode 100644 index aa9255be..00000000 --- a/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/TestSampleServlet.java +++ /dev/null @@ -1,97 +0,0 @@ -package org.apache.maven.cactus.sample; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Maven" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Maven", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -import org.apache.cactus.ServletTestCase; -import org.apache.cactus.WebRequest; - -public class TestSampleServlet extends ServletTestCase -{ - public TestSampleServlet(String testName) - { - super(testName); - } - - public void testIsAuthenticatedAuthenticated() - { - SampleServlet servlet = new SampleServlet(); - - session.setAttribute("authenticated", "true"); - - assertTrue(servlet.isAuthenticated(request)); - } - - public void testIsAuthenticatedNotAuthenticated() - { - SampleServlet servlet = new SampleServlet(); - - assertTrue(!servlet.isAuthenticated(request)); - } - - public void beginIsAuthenticatedNoSession(WebRequest request) - { - request.setAutomaticSession(false); - } - - public void testIsAuthenticatedNoSession() - { - SampleServlet servlet = new SampleServlet(); - - assertTrue(!servlet.isAuthenticated(request)); - } - -} diff --git a/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/test.xml b/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/test.xml deleted file mode 100644 index a15853b1..00000000 --- a/cactus/sample/src/test-cactus/org/apache/maven/cactus/sample/test.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/cactus/sample/src/webapp/WEB-INF/web.xml b/cactus/sample/src/webapp/WEB-INF/web.xml deleted file mode 100644 index 3338168c..00000000 --- a/cactus/sample/src/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/cactus/src/plugin-resources/cactus.jsl b/cactus/src/plugin-resources/cactus.jsl deleted file mode 100644 index d4a31550..00000000 --- a/cactus/src/plugin-resources/cactus.jsl +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - - - - - - - - - -

- [ - summary] - [ - package list] - [ - test cases] -

-
- - - - Name - Tests - Errors - Failures - Time(s) - - - - - - Name - Status - Type - Time(s) - - - - - - - ${htmlescape.getText(current.attribute('message').value)} - - - N/A - - -

- - - ${htmlescape.getText(current.value())} - - - - - - - - - - JUnit Test Results - - - -

- - - - - - - - - - - - - - - - - - - - - -
TestsErrorsFailuresSuccess rateTime(s)
- - - - - - - - - -
-

- Note: - failures are anticipated and checked for with - assertions while - errors are unanticipated. -

-
- -
- - - - - - - - - - - - - - - - - - - - -
- ${package} - - - - - - - - -
-

- Note: package statistics are not computed recursively, they only - sum up all of its testsuites numbers. -

- - - - - - - - - - - - - - - - - - -
- ${test.attribute('name').value} - - - - - - - - -
-
-
-
- -
- - - - - - - - - - ## test can even not be started at all (failure to load the class) - ## so report the error directly - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
${testcase.attribute("name").value}FailureErrorSuccess - -
- -
- -
-
-
-
- - - -
diff --git a/cactus/src/plugin-resources/jboss3x/jboss-web.xml b/cactus/src/plugin-resources/jboss3x/jboss-web.xml deleted file mode 100644 index 1c27d2f9..00000000 --- a/cactus/src/plugin-resources/jboss3x/jboss-web.xml +++ /dev/null @@ -1,3 +0,0 @@ - - java:/jaas/other - diff --git a/cactus/src/plugin-resources/jboss3x/roles.properties b/cactus/src/plugin-resources/jboss3x/roles.properties deleted file mode 100644 index 2bca7f99..00000000 --- a/cactus/src/plugin-resources/jboss3x/roles.properties +++ /dev/null @@ -1,2 +0,0 @@ -testuser=test -admin=JBossAdmin diff --git a/cactus/src/plugin-resources/jboss3x/users.properties b/cactus/src/plugin-resources/jboss3x/users.properties deleted file mode 100644 index 1dd9f297..00000000 --- a/cactus/src/plugin-resources/jboss3x/users.properties +++ /dev/null @@ -1,2 +0,0 @@ -testuser=testpassword -admin=admin diff --git a/cactus/xdocs/.cvsignore b/cactus/xdocs/.cvsignore deleted file mode 100644 index cb6131bb..00000000 --- a/cactus/xdocs/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -stylesheets diff --git a/cactus/xdocs/changes.xml b/cactus/xdocs/changes.xml deleted file mode 100644 index 1ed5aae2..00000000 --- a/cactus/xdocs/changes.xml +++ /dev/null @@ -1,217 +0,0 @@ - - - - Changes - Vincent Massol - - - - - - - Added documentation for cactus.bundle property that - can be used in POM dependency list. This fixes bug - MAVEN-901 - - - Updated to use Cactus 1.5-rc1, HttpClient 2.0 rc2 and AspectJ 1.1.1. - - - - - - New cactus:jar-install goal to install the Cactus - jar in the local Maven repository. This is useful if you wish to - put Cactus test classes in one Maven project and execute the - Cactus tests in another project. - - - New cactus:jar goal to generate a jar containing - the Cactus test classes. - - - Added new cactus.tmp.dir optional property to specify - a location where Cactus will put its temporary files (mostly where - it setup containers for execution). Defaults to - [java.io.tmpdir]/[containername]. - - - Generate the Cactus test reports in the Cactus reports directory - instead of directly in the Maven build directory. This fixes bug - MAVEN-669 - and - MAVEN-671. - - - Updated commons-httpclient dependency to 2.0 rc1, httpunit to - 1.5.3 and nekohtml to 0.7.7. - - - Added new optional property cactus.weblogic7x.beahome to - configure the location of BEA HOME for the WebLogic 7.x container. It - is only needed if the BEA HOME location is not the parent - directory of cactus.home.weblogic7x. - - - Added back support for WebLogic 7.x (it had somehow been dropped - when we moved to the new Cactus/Ant integration in version 3.0). - - - Updated to Cactus 1.6dev-20030830 which has fixes for WebLogic 7.x - support. - - - - - - Upgrade to commons-logging 1.0.3 - - - New goal cactus:match added that allows you to run just matching testcases. - Pass the testcase in using -Dtestmatch=MyTestCase. This brings to parity the - cactus plugin with the test plugin for running types of tests. - - - New goal cactus:single added that allows you to run just a single testcase. - Pass the testcase in using -Dtestcase=my.single.TestCase. - - - Add xml declaration to generated report. Fixed for character encoding. - - - Ability to optionally specify for Tomcat 4x and 5x a directory to which - the container will be installed for the tests. - - - Add all user jars that have been marked to be included in the cactus - test (with the - <cactus.bundle>true</cactus.bundle> property - in dependencies). For example, DBUnit would be a jar you would - include in a Cactus test but not in a runtime war. - - - Updated to Cactus/Ant of 19th of June 2003 which fixes a bug - preventing JBoss to start correctly on unix machines (caused by - an invalid URL file format on unix. Thanks to Chris Lenz for - fixing it. - - - The cactus:compile goal now correctly copy the non - java files to the target class directory. Thanks to Florin Vancea for - reporting this bug. This fixes bug - MAVEN-478. - - - Major change: updated to use the Cactus/Ant integration built after - 23rd of May 2003 (it is completely different from the Cactus/Ant - integration used in version 2.0. - - - - - - Complete rework of the plugin to use the Cactus/Ant Integration - module from the Cactus project. Now using Cactus 1.5dev for J2EE - 1.3, built from CVS on 7th of April 2003. Thus the Plugin feature - are now those of the Cactus/Ant Integration module. - - - - - - Upgraded scripts to work with Maven beta 8. - - - Checkstyle fixes for included Sample webapp. - - - Add new target cactus:test that runs tests for - all containers with a - maven.cactus.[container].home property set. - - - cactus:single now builds all the code and then runs - the testcase specified by the property - mavencactustestcase. Example - maven cactus:single - -Dmavencactustestcase=com.my.company.EasyTest. - - - Commented out dvsl merging of web.xml due to changes in Maven. - Instead uses either included default web.xml or one provided by - maven.cactus.webxml. - - - Added Checkstyle report to Cactus plugin web site. - - - The plugin now works even if not connected to the internet. - - - Fixed problem when the web.xml of the application to - test was defining security configuration. The Cactus was adding its - own but the web.xml DTD only supports one. The new implementation - discards the application security information which is replaced by - the Cactus definition. - - - - - - Added support for HttpUnit integration out of the box (i.e. the - HttpUnit jars are automatically added by the Cactus plugin). - - - Ability to exclude Cactus tests (for long running tests for example, - in debug period). - - - The web.xml elements required for Cactus are now - automatically added to the user project web.xml. - - - Added support for running the tests using the JUnit Swing Test Runner. - Simply create the following Maven property - maven.cactus.testrunner = swing to use the Swing Test - Runner. - - - Added automatic discovery of Cactus Test Cases and ignore test support - classes. - - - Creation of the project war/webapp is now left to the Maven War plugin. - Cactus repackages it by adding the Cactus tests, the Cactus - configuration files and the Cactus external jars. Thus, the Cactus - plugin now supports the "war:webapp" goal. - - - Improved documentation: "news" section on front page and improved - "Quick Start" page. - - - Support for WebLogic 7.x. - - - - - - Sample project showing how to use the Cactus plugin. - - - Generates HTML reports - - - Support for Resin 2.x. - - - Support for Tomcat 4.x (supports hot redeploy). - - - Creation of the Cactus plugin - - - - - - diff --git a/cactus/xdocs/features.xml b/cactus/xdocs/features.xml deleted file mode 100644 index 8091a663..00000000 --- a/cactus/xdocs/features.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - Features of the Cactus plugin - Vincent Massol - - - -
-

- The Cactus plugin for Maven uses the - Cactus/Ant - integration module. Thus benefits from all its features. -

-

- Some jars are used only for testing (for example, DbUnit). These - jars can be entered as dependencies in the project.xml - and tagged with cactus.bundle. When the Cactus plugin - finds such jars it will automatically add them to the deployed war. - For example: -

- - dbunit> - dbunit> - 1.5.5 - - true - - -]]> - -
- -
diff --git a/cactus/xdocs/goals.xml b/cactus/xdocs/goals.xml deleted file mode 100644 index 08819cd2..00000000 --- a/cactus/xdocs/goals.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - Maven cactus Plug-in Goals - dIon Gillard - Vincent Massol - - - - - cactus:compile - - Compiles the Cactus tests. - - - - cactus:cactifywar - - Creates a Cactus-ready war from the application war (depends - on war:war). - - - - cactus:test - - Run the Cactus tests on the containers for which you have defined - a cactus.home.[container name] property. - - - - cactus:single - - Run a single Cactus test on the containers for which you have defined - a cactus.home.[container name] property. Pass the name - of the testcase in using -Dtestcase=my.single.TestCase. - - - - cactus:match - - Run all Cactus tests that match a property -Dtestmatch=MyTestCase - on the containers for which you have defined - a cactus.home.[container name] property. - - - - cactus:report - - Generate an HTML report for the Cactus tests that been run. In order - to get this report as part of the generated web site, add the - following to your project.xml: - - [...] - maven-cactus-plugin - [...] - -]]> - - - - cactus:jar - - Generate a jar containing the Cactus test classes. - - - - cactus:jar - - Deploy the Cactus jar to the local Maven repository. This is - useful if you wish to put Cactus test classes in one Maven - project and execute the Cactus tests in another Maven project. - - - - - \ No newline at end of file diff --git a/cactus/xdocs/index.xml b/cactus/xdocs/index.xml deleted file mode 100644 index 3bac2e47..00000000 --- a/cactus/xdocs/index.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - Maven Cactus Plug-in - Vincent Massol - - - -
-

- This is a plugin for - Cactus that - allows to automatically start containers, run Cactus tests and stop - the containers. -

-

- Currently, this plugin only supports the Servlet API 2.3. -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DateDescription
26 Oct 2003 - Release of version 3.2. Read the - announcement. -
15 Sep 2003 - Release of version 3.1. Read the - announcement. -
05 Aug 2003 - Release of version 3.0. Read the - announcement. -
08 Apr 2003 - Release of version 2.0. Read the - announcement. -
22 Mar 2003 - Release of version 1.2. Read the - announcement. -
16 Nov 2002 - Release of version 1.1. Read the - announcement. -
06 Nov 2002 - Release of version 1.0. Read the - announcement. -
-
-
-

- Check the features page for all features - of this plugin. -

-

- Then, you should read the Quick Start page - which provides details about how to use the plugin. -

-

- The latest changes are available here. -

-
- - -
diff --git a/cactus/xdocs/navigation.xml b/cactus/xdocs/navigation.xml deleted file mode 100644 index c7f1e575..00000000 --- a/cactus/xdocs/navigation.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - Maven Cactus Plugin - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cactus/xdocs/properties.xml b/cactus/xdocs/properties.xml deleted file mode 100644 index 2d80ff37..00000000 --- a/cactus/xdocs/properties.xml +++ /dev/null @@ -1,349 +0,0 @@ - - - - - Cactus Properties - dIon Gillard - Vincent Massol - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyOptional?Description
cactus.home.[container name]At least one container -

- Home directory of where you have installed the container on - which you wish to run the Cactus tests. Valid container - names are: tomcat4x, tomcat5x, - resin2x, orion1x, - orion2x and jboss3x. -

-
cactus.src.dirYes -

- Location of the Cactus test cases. Default value is - src/test-cactus. -

-
cactus.portYes -

- Port on which to start the containers. Default value is - 8080. -

-
cactus.src.includesYes -

- Lists of test classes that will be executed. Default value is - **/*Test*.java. -

-
cactus.src.excludesYes -

- Lists of classes that will be excluded in the tests. Default - value is **/AllTests.java,**/Test*All.java. -

-
cactus.junit.usefileYes -

- Decides whether the test result will be printed to the console or - not. Default value is false, meaning errors will be - displayed on the console. -

-
cactus.reports.dirYes -

- Location of junit test reports for the Cactus tests. - Default value is - ${cactus.target.dir}/test-cactus-reports. -

-
cactus.halt.on.errorYes -

- Decides whether to stop the build on test errors. - Default value is true. -

-
cactus.halt.on.failureYes -

- Decides whether to stop the build on test failures - Default value is true. -

-
cactus.src.mergewebxmlYes -

- 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: - cactus.src.mergewebxml = ${basedir}/src/conf/cactus-web.xml. -

-
maven.cactus.printsummaryYes -

- How summary information on test should be printed to the console. This - property has the same meaning as the printsummary attribute - of the JUnit Ant task. Default value is - maven.cactus.printsummary = withOutAndErr. -

-
maven.tmpdir.dirYes -

- Location where Cactus will put its temporary files (mostly where - it setups containers for execution). Default value is - [java.io.tmpdir]/[containername]. -

-
-
- -
- - - - - - - - - - - -
PropertyOptional?Description
cactus.jboss3x.config.nameYes -

- Name of the JBoss server configuration to use. - Default value is default. -

-
-
- -
- - - - - - - - - - - -
PropertyOptional?Description
cactus.resin2x.configYes -

- Location of the Resin 2.x configuration file if you don't want - to use the cactus-provided one. -

-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyOptional?Description
cactus.tomcat4x.configYes -

- Location of the Tomcat 4.x configuration file if you don't want - to use the cactus-provided one. -

-
cactus.tomcat4x.conf.dirYes -

- Location of custom Tomcat 4.x configuration file that will be - copied, overwriting the Cactus-provided configuration files. -

-
cactus.tomcat4x.conf.includesYes -

- Configuration files located at - ${cactus.tomcat4x.conf.dir that should be included - in the Tomcat 4.x container set up by Cactus. -

-
cactus.tomcat4x.conf.excludesYes -

- Configuration files located at - ${cactus.tomcat4x.conf.dir that should not be - included in the Tomcat 4.x container set up by Cactus. -

-
cactus.tomcat4x.tmpdirYes -

- Directory to which the container will be installed for the tests. - By default the system temporary directory is used. -

-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyOptional?Description
cactus.tomcat5x.configYes -

- Location of the Tomcat 5.x configuration file if you don't want - to use the cactus-provided one. -

-
cactus.tomcat5x.conf.dirYes -

- Location of custom Tomcat 5.x configuration file that will be - copied, overwriting the Cactus-provided configuration files. -

-
cactus.tomcat5x.conf.includesYes -

- Configuration files located at - ${cactus.tomcat5x.conf.dir that should be included - in the Tomcat 5.x container set up by Cactus. -

-
cactus.tomcat5x.conf.excludesYes -

- Configuration files located at - ${cactus.tomcat5x.conf.dir that should not be - included in the Tomcat 5.x container set up by Cactus. -

-
cactus.tomcat5x.tmpdirYes -

- Directory to which the container will be installed for the tests. - By default the system temporary directory is used. -

-
-
- -
- - - - - - - - - - - -
PropertyOptional?Description
cactus.weblogic7x.beahomeYes -

- Location of BEA HOME. If not specified it defaults to - the parent directory of cactus.home.weblogic7x. -

-
-
- - -
\ No newline at end of file diff --git a/cactus/xdocs/tasks.xml b/cactus/xdocs/tasks.xml deleted file mode 100644 index adddeb03..00000000 --- a/cactus/xdocs/tasks.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Tasks - Vincent Massol - - - -
-

- Lists of todos and ideas for future versions. -

- - -

-

    -
  • - Refactor code in goals cactus:test, cactus:single, and cactus:match - to share more code. Currently there is a lot of cut-n-paste code. - Should use jelly tags to reuse code. -
  • -
-

-

-

    -
  • - Add support for Jetty (note: This should actually be added in the - Cactus/Ant integration module and not in the Maven plugin), for - better reuse. -
  • -
-

-
- -
- - -
diff --git a/cactus/xdocs/using.xml b/cactus/xdocs/using.xml deleted file mode 100644 index e6770837..00000000 --- a/cactus/xdocs/using.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - Using the Maven Cactus Plug-in - Vincent Massol - - - -
-
    -
  1. - Create a src/test-cactus directory in your project and - put your Cactus test classes in it (with the normal package directory - structure). Note that the location of the Cactus test sources can be - configured through the cactus.src.dir property. -
  2. -
  3. - Create a build.properties file in your project root - directory (where project.xml 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.24 and on - Resin 2.6, you will write: -
  4. - - - -
  5. - Then, simply type maven cactus:test (or - maven cactus for short) to run the Cactus - tests. -
  6. -
- -
- - -