cj91 wrote:
I'm trying to use the maven tomcat plugin to start an embedded instance so I can run integration tests against the application. I would like to fork an embedded tomcat instance and deploy the war to it, then later shut it down after the integration test phase is complete. Currently, I reach the pre-integration-phase, maven executes the run command for the tomcat plugin, but will not fork, causing my build to freeze with tomcat running happily. How can I fix this so I can run it in the background?
Here is my plugin configuration:
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<executions>
<execution>
<id>start-tomcat</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
<goal>deploy</goal>
</goals>
</execution>
<execution>
<id>stop-tomcat</id>
<phase>post-integration-test</phase>
<goals>
<goal>undeploy</goal>
</goals>
</execution>
</executions>
<configuration>
<path>/${artifactId}</path>
<fork>true</fork>
</configuration>
</plugin>
Thank you,
-Jonathan