apache / apache/maven-artifact-plugin
compare: missing files double-counted in ko and buildcompare output
- Dominant language
- Java
- Stars
- 14
- Forks
- 23
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 8
Description
In `CompareMojo.compareWithReference()` the `ko` count already includes all "missing" artifacts, so missing files are double-counted in both the log output and the `.buildcompare` file.
- Lines 196-198: `ko = artifacts.size() - ok - ignored.size()` counts every artifact that is neither OK nor ignored — which includes the entries put into `missingFilenames`.
- Lines 200-205 / 218-227: the message and `ko=` value then add `missing` on top.
Example: 3 artifacts, all missing -> log prints "`3 differ, 3 missing`" and `ko=3`, `missing=3` in the file, when the actual number of differing files is 3 (not 6).
Suggest `ko` be computed as `koFilenames.size()` so missing is a disjoint subset.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in CompareMojo.compareWithReference(), especially lines 196-198 and 200-205/218-227, and trace how koFilenames and missingFilenames feed the log and .buildcompare output. Reproduce the three-missing-artifacts example, then verify that ko counts differing files once while missing remains a disjoint subset in both outputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100