apache / apache/maven-help-plugin
AllProfilesMojo.addProjectPomProfiles() uses parent build context for active profiles
- 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/AllProfilesMojo.java:153-156:
if (project.getActiveProfiles() != null) {
for (Profile profile : project.getActiveProfiles()) {
activeProfiles.put(profile.getId(), profile);
}
}
project = project.getParent(); // walks up to parent
When the loop reaches a parent POM, project.getActiveProfiles() returns profiles active in the parent build context. These may not be active for the child project (different JDK, OS, properties). The output can incorrectly mark parent profiles as active when they do not apply to the child.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in src/main/java/org/apache/maven/plugins/help/AllProfilesMojo.java at lines 153-156 and trace how active profiles are collected while walking parent projects. Verify the Maven profile context used for each project, then confirm the output does not mark parent profiles active for the child when their activation conditions differ.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100