When calling the Maven goal
cobertura:clean -DforceMojoExecution=true -X
from within Eclipse on my project, the forceMojoExecution won’t be applied.
The debug log contains the following line:
[DEBUG] (f) forceMojoExecution = false
The same problem occurs on our Jenkins installation.
When calling
dependency:analyze -DfailOnWarning=true -X
on the same project, the parameter failOnWarning is correctly applied.
See here for the Maven Cobertura plugin. I’m using it in version 2.5.1.
I had to set
forceMojoExecutionin the plugin configuration section in thepom.xml.See also forceMojoExecution parameter changed to forceOpenJpaExecution?.