People wanted a way to override the standard built-in plugins plugins in Maven.
Maven 3 (or it may have been introduced as early as 2.1.0 or 2.2.0), solved this by specifying a default execution identifier for each plugin execution added to the effective pom throughout the packaging life cycle.
The name of this implicit id is always default-_____ I cannot remember the exact rule for which it was created.
Thus, you can override the executions performed in the package by defining the corresponding execution.
To solve your case, I would either change <id>unit-tests</id> to <id>default-test</id> , or add
<execution> <id>default-test</id> <configuration> <skip>true</skip> </configuration> </execution>
or it will have the same effect, although a solution from <id>unit-tests</id> to <id>default-test</id> will be slightly more efficient, since you only need to call two surefire executions.
Another thing that I would say, it would probably be better for you to use the maven-fault-tolerant plug-in to perform your integration tests, because at some point in time you may want to do some preliminary and subsequent integration checks, and fail-safe is intended for this use case (although it should be trivial to switch further down the line)
Stephen Connolly Aug 14 '12 at 8:27 2012-08-14 08:27
source share