问题
Roughly, I have (say) project A, pom packaging, that have two module M1 and M2 (say) each of which have war packaging. M2 has integration tests, but the M2 war makes service calls to the war of M1. This should really:
- Load same data into the DB.
- Deploy M1's WAR.
- Deploy M2's WAR.
- Run M2's IT tests.
- Undeploy M1 and M2.
回答1:
I would use something like the db maintain maven plugin for the database deployment and the maven wagon plugin to deploy the war files into the container. You will have to add the wagon config into both m1+m2 modules but well... the second time is easier :)
来源:https://stackoverflow.com/questions/9315904/i-have-a-multi-module-maven-2-pom-that-has-two-wars-how-can-i-configure-it-to-d