5

当我运行时mvn clean install,对于该integration-test阶段它不使用故障安全插件。

但是,如果我明确调用插件来运行集成测试,它就可以工作(mvn failsafe:integration-test)。

mvn clean install当我在阶段运行时,如何让 maven 使用故障安全插件integration-test

4

1 回答 1

12

引用官方文档

To use the Failsafe Plugin, you need to add the following configuration
to your pom.xml

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.11</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

这是你要找的吗?

于 2011-06-17T03:31:05.663 回答