Eric
Eric

Reputation: 469

Defining default goals explicitly in maven failsafe plugin

I am trying to understand how maven plugins work with all inner tags, for example using executions , phase , goal. I have been testing the failsafe plugin for that purpose. I found a sample code block to activate failsafe plugin on the internet.

<plugin>
    <artifactId>maven-failsafe-plugin</artifactId>
    <configuration>
        <includes>
            <include>**/*IntegrationTest.java</include>
        </includes>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
            </goals>
        </execution>
    </executions>
</plugin>

In most of the examples I found, I noticed that 2 goals integration-test and verify had been included. However, when I remove this part and run the command.

mvn verify:

    <executions>
        <execution>
            <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
            </goals>
        </execution>
    </executions>

And there is no difference, these goals are again being executed by default. My question is do we need to specify these goals really? I think they are redundant because they come along with the plugin itself when I declare the failsafe plugin.

Upvotes: 1

Views: 68

Answers (0)

Related Questions