apache / apache/maven-pmd-plugin
[MPMD-363] aggregate-cpd-check doesn't work on large projects
- Dominant language
- Java
- Stars
- 66
- Forks
- 55
- Avg merge
- 8d 16h
- Merged PRs (30d)
- 7
Description
**[Delany](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=delany)** opened **[MPMD-363](https://issues.apache.org/jira/browse/MPMD-363?redirect=false)** and commented
I'm having some trouble with the aggregate-cpd-check goal in a large project. The reactor build passes when it should fail. I know there are violations since cpd-check fails a couple of modules individually. But on another smaller project aggregate-cpd-check correctly fails the build.
I'm not able to share these projects, but I can share some logs. Here are the relevant snippets starting after the first "[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-pmd-plugin:3.20.0:aggregate-cpd' with basic configurator -->"
WORKING CORRECTLY (finds cpd violations):
```java
[DEBUG] -- end configuration --
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[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,**/.hgignore,**/.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 /git/izpack/customshortcutpanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/deploydatabasepanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/deploydirectorypanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/deployiiswebapppanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/deploywebapppanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/headlessdeploycomponentpanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/installationmanagerpanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/installationoptionspanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/installationospanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/installationselectionpanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/installationstargetpanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/installationsummarypanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/jrepathpanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/licensepackpanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/postinstallpanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/preinstallpanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/productpublicnamepanel/src/main/java
[DEBUG] Searching for files in directory /git/izpack/tomcatpanel/src/main/java
[INFO] PMD version: 6.53.0
```
NOT WORKING CORRECTLY (doesn't find cpd violations):
```java
[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,**/.hgignore,**/.hg/**,**/.git,**/.gitignore,**/.gitattributes,**/.git/**,**/BitKeeper,**/BitKeeper/**,**/ChangeSet,**/ChangeSet/**,**/_darcs,**/_darcs/**,**/.darcsrepo,**/.darcsrepo/**,**/-darcs-backup*,**/.darcs-temp-mail
[DEBUG] Inclusions: **/*.java
[INFO] PMD version: 6.53.0
```
Where are all the "Searching for files in directory"?
The only noticable difference between the configuration is the enormous **reactorProjects** property (500 items).
---
**Affects:** 3.20.0
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the aggregate-cpd-check goal with a large reactorProjects value, comparing the debug logs from the working and failing cases. Trace why file searches are absent when the reactor contains about 500 projects, using the reported Maven PMD 3.20.0 and PMD 6.53.0 versions. Done means large reactors are searched and CPD violations cause the build to fail as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100