| Name | Description | Required |
|---|---|---|
| srcFile | The original ear that is going to be cactified. | Yes |
| destFile | The output file of the cactification process. | No, the default is ${project.build.directory}/${project.artifactId}-cactified.ear |
| addEjbReferences | Specifies if EJB references to all local EJBs in the ear should be added to the cactus war. | No |
The cactuswar element configures everything that has to do with the cactus web application that will end up in the ear. This element has all the parameters of the cactifywar task except the destfile parameter. The web application will always be named cactus.war and be placed in the root of the ear.
| Name | Description | Required |
|---|---|---|
| context | The context to wich the cactified web application will be mapped to. | No, the default is /cactus |
| redirectors | The redirectors to include in the web application. Redirectors should be specified specified in a list in this element. | No |
| libDependencies | A list of <dependency> elements to include in the web applpication's WEB-INF/lib folder. | No |
| testClasses | An element containing a <directory> and <includes> element to specify which tests to include in the war application. | No |
| version |
The version of the web application archive to create if no source
archive has been specified with the srcFile attribute.
Can be either 2.2 or 2.3.
|
No, required is only if not srcFile attribute is present |
The following example demonstrates how to use the cactifyear mojol.
It will create a cactified archive from the target/cactus.samples.ejb-1.8.1-SNAPSHOT-bin.ear
adding the listed redirectors and library dependencies.
<plugin>
<groupId>org.apache.cactus</groupId>
<artifactId>cactus.integration.maven2</artifactId>
<version>1.8.1-SNAPSHOT</version>
<configuration>
<srcFile>target/cactus.samples.ejb-1.8.1-SNAPSHOT-bin.ear</srcFile>
<cactusWar>
<context>/</context>
<redirectors>
<servletRedirector>
<name>ServletRedirectorSecure</name>
<mapping>/ServletRedirectorSecure</mapping>
<roles>test</roles>
</servletRedirector>
<servletRedirector/>
<filterRedirector>
<name>FilterRedirector</name>
<mapping>/test/filterRedirector</mapping>
</filterRedirector>
</redirectors>
<libDependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
<dependency>
<groupId>httpunit</groupId>
<artifactId>httpunit</artifactId>
</dependency>
</libDependencies>
<testClasses>
<directory>target/test-classes</directory>
<includes>
<include>**/*Test*.*</include>
</includes>
</testClasses>
<version>2.3</version>
</cactusWar>
</configuration>
<executions>
<execution>
<id>cactus-cactifyear</id>
<phase>pre-integration-test</phase>
<goals>
<goal>cactifyear</goal>
</goals>
</execution>
</executions>
</plugin>