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

I'm new with Maven and I don't understand what means to have both goals declared inside the plugin in the pom.xml. Thank you.

L RodMrez
  • 137
  • 8
  • The goal `integration-test` will execute the integration tests via maven-failsafe-plugin (*IT.java). The `verify` goal will verify if all executions of the integration tests have been successful. If not this goal will fail the build. If you don't add the goal `verify` the integration tests could fail without failing the build.. – khmarbaise Jun 01 '18 at 10:03
  • Possible duplicate of [Why failsafe plugin requires both integration-test and verify goals](https://stackoverflow.com/questions/26304362/why-failsafe-plugin-requires-both-integration-test-and-verify-goals) – Dams Jun 01 '18 at 13:57

1 Answers1

0

From plugin Documentation

Goals Overview

The Failsafe Plugin has only two goals:

failsafe:integration-test runs the integration tests of an application.

failsafe:verify verifies that the integration tests of an application passed.

Dams
  • 997
  • 12
  • 28