Skip to content

[MNG-8667] Recognize injected parent profiles during validation - #13240

Merged
gnodet merged 1 commit into
apache:maven-4.0.xfrom
gnodet:backport/MNG-8667-to-4.0.x
Sep 23, 2026
Merged

gnodet merged 1 commit into
apache:maven-4.0.xfrom
gnodet:backport/MNG-8667-to-4.0.x

Conversation

@gnodet

@gnodet gnodet commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Backport of #13205 to maven-4.0.x.

Cherry-pick of 5cd1b60, applied cleanly with no conflicts.

@gnodet gnodet added bug Something isn't working backport labels Sep 22, 2026
@gnodet gnodet added this to the 4.0.0 milestone Sep 22, 2026

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean backport of #13205 to maven-4.0.x.

Cherry-pick of 5cd1b60264 applied without conflicts. The fix is correct: getInjectedProfileIds() returns Map<String, List<String>> (source → profile IDs); chaining .values().stream().flatMap(Collection::stream) correctly flattens all injected profile identifiers into the validation set. The package-private visibility change on getAllProfiles is justified by the regression test in the same package. The test constructor call matches the 4.0.x DefaultMaven signature exactly. No adaptation concerns.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@elharo elharo changed the title MNG-8667: Recognize injected parent profiles during validation [MNG-8667] Recognize injected parent profiles during validation Sep 22, 2026
Profile validation normally discovers parent profiles by walking MavenProject parent links. When construction of a parent MavenProject fails, its active profiles can still contribute to the effective model but are omitted from validation. Include the recorded injected profile IDs when validating requested profiles and add a focused regression test for the unavailable-parent path.
@gnodet
gnodet force-pushed the backport/MNG-8667-to-4.0.x branch from 80a6b7d to 0fb353b Compare September 22, 2026 14:26
@gnodet gnodet modified the milestones: 4.0.0, 4.0.0-ga Sep 23, 2026
@gnodet
gnodet merged commit 73c3737 into apache:maven-4.0.x Sep 23, 2026
22 checks passed
@gnodet gnodet modified the milestones: 4.0.0-ga, 4.0.0 Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants