Remove Profile getSource / setSource#12377
Open
gnodet wants to merge 3 commits into
Open
Conversation
e26615d to
852c95f
Compare
Remove getSource()/setSource() and SOURCE_POM/SOURCE_SETTINGS constants from the Profile class starting at model version 4.2.0. The 4.0.0 and 4.1.0 model versions retain these methods for backward compatibility. Replace usages in the impl layer (DefaultProfileSelector, SettingsUtilsV4) with InputLocation/InputSource checks. POM-originating profiles are now identified by having a non-null InputSource.getModelId(). The compat layer is unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
852c95f to
5e98283
Compare
…files Settings profiles converted via SettingsUtilsV4 get an InputSource with modelId="" (empty string, not null), so the check must also exclude empty strings to correctly identify non-POM profiles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ultProfileSelector 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
Profile.getSource(),Profile.setSource(),Profile.SOURCE_POM, andProfile.SOURCE_SETTINGSstarting at model version 4.2.0 (per Remove profile getSource / setSource #2569)InputLocation/InputSourcechecks: POM profiles are identified by having a non-nullInputSource.getModelId()getSource()/setSource()via its own model code segmentFiles changed (3):
api/maven-api-model/src/main/mdo/maven.mdo— split4.1.0+segment into4.1.0/4.1.99(keeps source methods) and4.2.0+(removes them); fix4.0.0/4.0.99to use own field instead of delegatingimpl/maven-impl/.../DefaultProfileSelector.java— replaceProfile.SOURCE_POM.equals(profile.getSource())withisFromPom()usingInputSource.getModelId()impl/maven-impl/.../SettingsUtilsV4.java— removevalue.setSource("settings.xml")Closes #2569
Test plan
getSource/setSourcegetSource/setSourcevia own field🤖 Generated with Claude Code