[backport 4.0.x] Fix #13004: enable deterministic profile activation for BUILD_CONSUMER - #13015
Merged
Conversation
Enable only deterministic profile activations (OS, JDK, activeByDefault)
for BUILD_CONSUMER, so that platform-dependent properties (e.g.
${swt.artifactId} from an OS-activated profile) are resolved before the
coordinate validator runs, while keeping the consumer POM reproducible
across environments.
Packaging-activated profiles are excluded — they are handled separately
by inlinePackagingActivatedProfiles() in the consumer POM builder.
Repositories from activated profiles are stripped to prevent leaking
into the published consumer POM.
Also fixes pre-existing Spotless violations and a compilation error on
master (DefaultVersionResolver, DefaultVersionRangeResolver,
DistributionManagementArtifactRelocationSourceTest).
- Add constructor with version range "[4.0.0-rc-7,)" - Convert extractResources() File return to Path via .getAbsoluteFile().toPath() - Pass String to newVerifier() via basedir.toString() - Convert getArtifactPath() String return to Path via Path.of() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport of #13006 (merged to master as d96bf89) to the
maven-4.0.xbranch.Enable only deterministic profile activations (OS, JDK, activeByDefault) for BUILD_CONSUMER, so that platform-dependent properties (e.g.
${swt.artifactId}from an OS-activated profile) are resolved before the coordinate validator runs, while keeping the consumer POM reproducible across environments.inlinePackagingActivatedProfiles()Closes #13004
🤖 Generated with Claude Code