Maven:在 Eclipse 中为多个配置文件运行构建

Ale*_*o C 5 eclipse maven maven-profiles

假设我们在 Eclipse 中有一个 Maven 项目。pom.xml 有两个配置文件。

问题是:如何在 Eclipse 中运行 maven 以便为每个配置文件执行每个目标?

我试过了:

  • 在 Properties/Maven 中设置活动的 Maven 配置文件 -> 不起作用
  • 使用以下命令运行 maven:clean install -Pprofile1 -Pprofile2 -> 不起作用
  • 使用以下命令运行 maven:clean install -P profile1,profile2 -> 不起作用
  • 在“目标”下运行 Maven 设置“配置文件”(配置文件 1,配置文件 2)-> 不起作用

我希望 maven 为两个配置文件运行,执行 pom.xml 中的所有任务

谢谢。