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 に答える