Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.2.1
-
Fix Version/s: None
-
Component/s: Plugins and Lifecycle
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
See the attachements for a sample project of the surefire integration tests.
Its pom sets the skipTests option of the surefire-plugin to false.
<plugin>
...
<configuration>
<skipTests>false</skipTests>
</configuration>
</plugin>
This configuration is not overriden by the appropriate command line parameter:
mvn -DskipTests=true test
Executing this line will set the skipTests parameter of the Surefire plugin to false and the tests will not be skipped.
Issue Links
- is duplicated by
-
SUREFIRE-319
<skip>true</skip> cannot be overridden using mvn -Dmaven.test.skip=false test
-
-
SUREFIRE-682
<skipTests> cannot be overridden by commandline param
-
I looked at the code of org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(...) and discovered the reason for this bug. The line
PlexusConfiguration mergedConfiguration = mergeMojoConfiguration( pomConfiguration, mojoDescriptor );
sets the skipTests parameter to the value of the pom. Afterwards this value is not be overriden, because it is already set.