繁体   English   中英

Maven没有使用故障安全插件进行集成测试

[英]Maven is not using failsafe plugin for integration tests

当我运行mvn clean install ,对于integration-test阶段,它不使用failsafe插件。

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

当我在integration-test阶段运行mvn clean install时,如何让maven使用failsafe插件?

官方文档引用:

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>

这是你要找的?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM