这是pom.xml
我项目的浓缩片段
<profiles>
<profile>
<id>run-tests</id>
<build>
<plugins>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.2</version>
<executions>
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
......
</includes>
<replacements>
<replacement>
.......
</replacement>
</replacements>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<configuration>
......
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<phase>integration-test</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
我有两个问题:
1)当我执行时mvn clean package -Prun-tests
,会发生什么?我预计这些插件目标都不会在这里执行,因为它们必须分阶段integration-test
。但是我看到这些目标执行了,为什么?
2)在块中有两个目标execution
是什么意思?请看上面failsafe-plugin
谢谢