The POM that my project inherits contains some
for the release
plugin that specifies some additional arguments
.
Found the solution. In my POM I add this which overrides the settings in the parent POM and allows to specify additional arguments on command line, e.g. -Darguments=-Pmock
<pluginManagement>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<arguments>${arguments} -Prelease</arguments>
</configuration>
</plugin>
</pluginManagement>
You cannot override a configuration, which is already set in the POM (see Maven Bug MNG-4979). You may use variables in order to avoid this behaviour. The snippet of your answer makes use of it.