Many maven plugins have a configuration option “skip” that should skip the execution of the plugin. It seems as if setting those options on the command line has no effect:
[james@JAMES-PC ~/er]$ mvn clean test -Dpmd.skip=true -Dlicense.skip=true
[INFO] Scanning for projects...
... etc.etc.
[INFO]
[INFO] --- maven-license-plugin:1.4.0:check (check-headers) @ eranger ---
[INFO] Checking licenses...
[INFO]
[INFO] >>> maven-pmd-plugin:2.7.1:check (pmd-check) @ eranger >>>
[INFO]
[INFO] --- maven-pmd-plugin:2.7.1:pmd (pmd) @ eranger ---
[INFO]
[INFO] <<< maven-pmd-plugin:2.7.1:check (pmd-check) @ eranger <<<
[INFO]
[INFO] --- maven-pmd-plugin:2.7.1:check (pmd-check) @ eranger ---
... etc.etc.
The pmd and the license plugins still get executed. Any ideas how to really skip them?
The plugin is loaded but not fully executed; otherwise, you’d see a lot of output of PMD analyzing your code.
The reason why this happens is that the option
pmd.skipis evaluated by the PMD plugin itself, so Maven has to load it. The plugin will check the option and exit immediately.If that is still too much for you, move the plugin into a profile.
[EDIT] Since the maven-license-plugin should support
skip(see the docs), you have probably found a bug.I suggest to: