apache / apache/maven-help-plugin
EffectiveSettingsMojo mutates original Settings when showPasswords=true
- Dominant language
- Java
- Stars
- 29
- Forks
- 42
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 6
Description
In src/main/java/org/apache/maven/plugins/help/EffectiveSettingsMojo.java:87-94:
if (showPasswords) {
copySettings = settings; // uses original, not a copy
} else {
copySettings = copySettings(settings);
}
writeEffectiveSettings(copySettings, writer); // calls cleanSettings() which modifies profiles
When -DshowPasswords=true, the original Maven Settings object is used directly. writeEffectiveSettings -> cleanSettings() then replaces each profile Properties with a SortedProperties instance (same pattern as bug #381), mutating the global shared settings object.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in src/main/java/org/apache/maven/plugins/help/EffectiveSettingsMojo.java:87-94 and trace writeEffectiveSettings() into cleanSettings(). Verify the showPasswords=true path does not pass the shared Settings object to the mutating cleanup, and confirm the original profiles and Properties remain unchanged after writing effective settings.
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
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100