【发布时间】:2023-01-12 23:59:59
【问题描述】:
是否可以运行全部<execution> 一个 Maven 命令的定义?
喜欢:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>first-execution</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>com.mycompany.FooServer</mainClass>
</configuration>
</execution>
<execution>
<id>second-execution</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>com.mycompany.BarServer</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
我可以运行 mvn exec:java@first-execution exec:java@second-excution 来运行两者,但是是否还有一个 maven 命令来简单地告诉 maven 运行任何<execution> 是在定义中找到的吗?
或者至少,所有匹配 <goal> 的执行?
【问题讨论】:
-
我的意思是不必限定执行 ID。喜欢
mvn exec:java,然后选择任何<execution>。