Skip to content

Fix BUILD_CONSUMER profile activation for locally-resolved parent POMs (backport to 4.0.x) - #12286

Merged
gnodet merged 1 commit into
maven-4.0.xfrom
cherry-pick-11799-to-4.0.x
Jun 17, 2026
Merged

gnodet merged 1 commit into
maven-4.0.xfrom
cherry-pick-11799-to-4.0.x

Conversation

@gnodet

@gnodet gnodet commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Backport of #11799 to maven-4.0.x.

Ensure readParentLocally() uses CONSUMER_PARENT when the current request is BUILD_CONSUMER, consistent with resolveAndReadParentExternally().

Fixes #11798

@gnodet gnodet added bug Something isn't working backport labels Jun 17, 2026
#11799)

When readParentLocally() finds a parent via resolveReactorModel()
during BUILD_CONSUMER processing, derive(candidateSource) preserved
the BUILD_CONSUMER request type. Since isBuildRequestWithActivation()
returns false for BUILD_CONSUMER, POM profile activation was skipped
for all parent POMs in the chain, leaving profile-defined properties
(like BOM import versions) unresolved.

The fix ensures readParentLocally() uses CONSUMER_PARENT when the
current request is BUILD_CONSUMER, consistent with the behavior of
resolveAndReadParentExternally().

Fixes #11798

Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
@gnodet
gnodet force-pushed the cherry-pick-11799-to-4.0.x branch from 1d52c7b to c7679fc Compare June 17, 2026 07:03
@gnodet
gnodet merged commit 89429a3 into maven-4.0.x Jun 17, 2026
23 checks passed
@gnodet
gnodet deleted the cherry-pick-11799-to-4.0.x branch June 17, 2026 07:54
@github-actions github-actions Bot added this to the 4.0.0-rc-6 milestone Jun 17, 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.

2 participants