Hi I have a maven project which needs to deploy 2 wars to a jetty environment before integration testing starts. These wars are no dependencies of the project in the normal sence, but they need to be deployed seperatly for the integration tests to work property.
I have done this by adding test dependencies for the 2 wars. I then use the maven-dependency-plugin’s copy-dependencies goal to copy the wars to a new directory and strip their version numbers so that jetty can find and deploy them using the org.mortbay.jerry.jetty-maven-plugin as part of the pre-integration-test phase.
My problem is that despite the fact the new dependencies are test scope maven is still overlaying them onto this projects war.
Does anyone know how to add a dependency on a war which only downloads the dependency but doesn’t do anything more with it?
I would do this by creating a separate Maven module just for integration testing. Once you do this, you can set the
<packaging>type topomand thus eliminate the problem with the WAR overlays. Just include the two integration testing WARs as dependencies along with the WAR you need to test/verify.Doing this also allows for a clean separation of the build process from the integration testing process, which can help in other ways.
If you do not like this idea, then use the WAR plugin’s
<dependentWarExcludes>configuration to keep your testing WARs out of your WAR packaging. See here for details:http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html