Tag: maven profile

澄清Mavenconfiguration文件和阶段

在我的maven项目中,我有多个mavenconfiguration文件。 在每个configuration文件中,我有docker-maven-plugin和maven-failsafe-plugin 。 这是我如何约束目标和阶段。 泊坞窗- Maven的插件 <phase>pre-integration-test</phase> <goals> <goal>start</goal> </goals> <phase>post-integration-test</phase> <goals> <goal>stop</goal> <goal>remove</goal> </goals> Maven的故障保护,插件 <phase>integration-test</phase> <goals> <goal>integration-test</goal> </goals> <phase>verify</phase> <goals> <goal>verify</goal> </goals> 我有每个数据库types的configuration文件(即MySQL,Postgres等)。 我想要做的是在docker上运行我的集成testing与每个数据库types。 我的问题是,我可以运行mvn多个configuration文件(即mvn clean install -P local-postgres,local-mysql ),以便每个configuration文件一个接一个地执行? 我的要求是不要同时有2个docker集装箱。 我所观察到的是,所有configuration文件的pre-integration-test阶段都是先运行的,并且以The name "/apim-postgres" is already in use by container xxxxx失败。 当多个configuration文件被给出时,maven阶段应该如何工作? 有没有办法让我的要求得到满足?