Skip to content

Fix #11798: Preserve profile activation during consumer POM generation#12239

Open
gnodet wants to merge 1 commit into
apache:masterfrom
gnodet:fix-gh-11798
Open

Fix #11798: Preserve profile activation during consumer POM generation#12239
gnodet wants to merge 1 commit into
apache:masterfrom
gnodet:fix-gh-11798

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented Jun 4, 2026

Summary

  • When readParentLocally() resolves a parent POM during BUILD_CONSUMER, it now uses CONSUMER_PARENT request type (which allows profile activation) instead of inheriting BUILD_CONSUMER (which suppresses it)
  • This matches the existing behavior of resolveAndReadParentExternally() and ensures that properties defined inside profiles with property-based activation are correctly resolved for locally-resolved parent POMs
  • Adds integration test verifying BOM imports using profile-defined properties work during consumer POM generation

Test plan

  • Integration test MavenITgh11798ConsumerPomProfileActivationTest passes: parent POM defines dep.version in a profile with property-based activation, child imports a BOM using ${dep.version}, install succeeds
  • Existing integration tests pass (no regression in profile activation or consumer POM generation)

Fixes #11798

🤖 Generated with Claude Code

…eration

When readParentLocally() resolves a parent POM during BUILD_CONSUMER,
it now uses CONSUMER_PARENT request type (which allows profile activation)
instead of inheriting BUILD_CONSUMER (which suppresses it). This matches
the behavior of resolveAndReadParentExternally() and ensures that
properties defined inside profiles with property-based activation are
correctly resolved for locally-resolved parent POMs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet added this to the 4.0.0-rc-6 milestone Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maven 4 (rc5) fails in maven-install-plugin due to BUILD_CONSUMER disabling profile activation for locally-resolved parent POMs

1 participant