I am trying to get maven2 to work with cactus.

I started by creating a new web archetype and then created a servlet
(helloworld ) and then i placed the servlet mappings into my web.xml.
I was able to use jetty and run the servelt with the command mvn
jetty:run-war


Next I wanted to make a cactus test.  I created the following pom.xml (see
below) after fumbling around with sample pom.xml listed on the cactus site
(which doesn't work!).

If I run mvn clean test no cactus stuff  (cactifywar or any cactus tests)
runs.
However, if I run mvn clean install then it at least goes through and makes
a cactifywar.  I am still unable to run  mvn cactus:test   it says the
required goal not
found.  Is there any documentation that works on how to great a cactus test
with maven2 and how to run it?


----  pom.xml ---
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
  <modelVersion>4.0.0</modelVersion>
  <groupId>gov.virginia.dss</groupId>
  <artifactId>RajDemoHudsonCactus</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>RajDemoHudsonCactus Maven Webapp</name>
  <url>http://maven.apache.org</url>
<repositories>
 <repository>
  <id>java.net</id>
  <url>http://download.java.net/maven/2</url>
 </repository>
</repositories>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.4</version>
      <scope>test</scope>
    </dependency>
 <dependency>
  <groupId>javax</groupId>
  <artifactId>javaee-api</artifactId>
  <version>6.0</version>
  <scope>compile</scope>
 </dependency>
 <dependency>
  <groupId>org.apache.cactus</groupId>
  <artifactId>cactus.core.framework.uberjar.javaEE.15</artifactId>
  <version>1.8.1</version>
 </dependency>
 <dependency>
  <groupId>org.apache.cactus</groupId>
  <artifactId>cactus.integration.shared.api</artifactId>
  <version>1.8.1</version>
 </dependency>
  </dependencies>
  <build>
 <finalName>RajDemoHudsonCactus</finalName>
 <plugins>
  <plugin>
   <groupId>org.mortbay.jetty</groupId>
   <artifactId>maven-jetty-plugin</artifactId>
  </plugin>
      <plugin>
        <groupId>org.apache.cactus</groupId>
        <artifactId>cactus.integration.maven2</artifactId>
        <version>1.8.1</version>
     <configuration>
          <srcFile>target/RajDemoHudsonCactus.war</srcFile>
          <destFile>target/cactifiedByMaven2.war</destFile>
        </configuration>
        <executions>
          <execution>
            <id>cactus-cactifywar</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>cactifywar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
        <version>1.0</version>


      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
</build>
</project>

Reply via email to