I am trying to run embedded Tomcat 9 inside Maven 3 for integration testing purposes. I was led to cargo-maven2-plugin
by other SO answers.
So, attempting t
After trying many permutations, this finally worked for me:
org.codehaus.cargo
cargo-maven2-plugin
1.7.9
${myEnvVar}
... stuff ...
tomcat9x
https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat/9.0.29/tomcat-9.0.29.zip
org.codehaus.cargo
simple-war
war
path/to/myapp.war
myapp
start-server
pre-integration-test
start
stop-server
post-integration-test
stop
Use the failsafe
plugin to automatically run the Integration Tests between the start
and stop
:
maven-failsafe-plugin
2.21.0
integration-test
verify