请参阅下面 pom.xml 中的插件配置。
我可以:
mvn myplugin:myGoal
哪个运行 myGoal (我想都是执行),但我希望能够独立选择第一次或第二次执行。
我知道我可以向执行元素添加一个 id,但是我如何在命令行上引用该 id。我想得到一些可以完成这个想象的命令所做的事情:
mvn myplugin:myGoal --executionId=1
这是可能的,还是我走错了路?
<plugin>
<groupId>org.myplugin</groupId>
<artifactId>myplugin-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<id>process-cats</id>
<goals>
<goal>myGoal</goal>
</goals>
<configuration>
<myParam>cats</myParam>
</configuration>
</execution>
<execution>
<id>process-dogs</id>
<goals>
<goal>myGoal</goal>
</goals>
<configuration>
<myParam>dogs</myParam>
</configuration>
</execution>
</executions>
</plugin>