I have a multi-module Maven 2 POM that has two WARs, how can I configure it to deploy both wars prior to running tests?

試著忘記壹切 提交于 2020-01-04 15:30:40

问题


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:

  1. Load same data into the DB.
  2. Deploy M1's WAR.
  3. Deploy M2's WAR.
  4. Run M2's IT tests.
  5. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!