问题描述
大致来说,我有一个项目pom打包(例如),它有两个模块M1和M2(比如说),每个模块都有战争包装. M2进行了集成测试,但是M2战争向M1战争发出了服务电话.这应该确实是:
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:
- 将相同的数据加载到数据库中.
- 部署M1的WAR.
- 部署M2的WAR.
- 运行M2的IT测试.
- 取消部署M1和M2.
推荐答案
我将使用db maintenance maven插件进行数据库部署,并使用maven wagon插件将war文件部署到容器中.您将不得不将wagon配置添加到m1 + m2两个模块中,但是……第二次更容易了:)
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 :)
这篇关于我有一个包含两个WAR的多模块Maven 2 POM,如何配置它以在运行测试之前部署两次战争?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!