I have a multi-module Maven 2 POM with two WARs, how can I configure it to deploy both wars before running the tests?

Roughly, I have (say) project A, pom packaging, which have two modules M1 and M2 (say), each of which has a military package. M2 has integration tests, but the M2 war raises calls for war with M1. It should be valid:

  • Upload the same data to the database.
  • Expand the M1 WAR.
  • Expand the M2 WAR.
  • Run the M2 IT tests.
  • Undeploy M1 and M2.
+2
maven war maven-failsafe-plugin
source share
1 answer

I would use something like db that supports the maven plugin for deploying the database, and the maven wagon plugin for deploying military files in the container. You will need to add the car configuration to both m1 + m2 modules, but well ... the second time is easier :)

+1
source share

All Articles