Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven is not using failsafe plugin for integration tests

When I run mvn clean install, for the integration-test phase it does not use the failsafe plugin.

However if i explicilty call the plugin to run the integration test, it works (mvn failsafe:integration-test).

How can I make maven use the failsafe plugin when I run mvn clean install during the integration-test phase?

like image 344
Sujen Avatar asked Jun 16 '11 19:06

Sujen


1 Answers

Quote from official documentation:

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>

Is this what you looking for?

like image 99
Slava Semushin Avatar answered Nov 07 '22 00:11

Slava Semushin