I'm trying to disable execution of maven-pmd-plugin for one of maven project module, but can't find a working solution.
Right now I have the next in the module:
<properties>
<cpd.skip>true</cpd.skip>
<pmd.skip>true</pmd.skip>
<maven.pmd.enable>false</maven.pmd.enable>
<maven.pmd.cpd.enable>false</maven.pmd.cpd.enable>
</properties>
And have the next in the debug output:
[INFO] --- maven-pmd-plugin:3.2:cpd (pmd-cpd) @ module ---
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-pmd-plugin:3.2:cpd from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-pmd-plugin:3.2, parent: sun.misc.Launcher$AppClassLoader@6e70c242]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-pmd-plugin:3.2:cpd' with basic configurator -->
[DEBUG] (f) aggregate = false
[DEBUG] (f) compileSourceRoots = [/cicd/module/src/main/java]
[DEBUG] (f) format = xml
[DEBUG] (f) ignoreIdentifiers = false
[DEBUG] (f) ignoreLiterals = false
[DEBUG] (f) includeTests = false
[DEBUG] (f) includeXmlInSite = false
[DEBUG] (f) linkXRef = true
[DEBUG] (f) minimumTokens = 100
[DEBUG] (f) outputDirectory = /cicd/module/target/site
[DEBUG] (f) skip = true
[DEBUG] (f) skipEmptyReport = true
[DEBUG] (f) targetDirectory = /cicd/module/target
[DEBUG] (f) testSourceRoots = [/cicd/module/src/test/java]
[DEBUG] (f) xrefLocation = /cicd/module/target/site/xref
[DEBUG] (f) xrefTestLocation = /cicd/module/target/site/xref-test
[DEBUG] -- end configuration --
[DEBUG] Exclusions: **/*~,**/#*#,**/.#*,**/%*%,**/._*,**/CVS,**/CVS/**,**/.cvsignore,**/RCS,**/RCS/**,**/SCCS,**/SCCS/**,**/vssver.scc,**/project.pj,**/.svn,**/.svn/**,**/.arch-ids,**/.arch-ids/**,**/.bzr,**/.bzr/**,**/.MySCMServerInfo,**/.DS_Store,**/.metadata,**/.metadata/**,**/.hg,**/.hg/**,**/.git,**/.gitignore,**/.gitattributes,**/.git/**,**/BitKeeper,**/BitKeeper/**,**/ChangeSet,**/ChangeSet/**,**/_darcs,**/_darcs/**,**/.darcsrepo,**/.darcsrepo/**,**/-darcs-backup*,**/.darcs-temp-mail
[DEBUG] Inclusions: **/*.java
[DEBUG] Searching for files in directory /cicd/module/src/main/java
[WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent!
[DEBUG] Executing CPD...
I'm wondering why does it execute if skip=true
According to the official FAQ I need to "Simply put maven.pmd.enable=false into your project properties for that one sub-project." Probably I have not correctly put that into the pom. Is it just <properties> in module pom file?
-Dpmd.skip=true -Dcpd.skip=true gives the same result