Properly update the Platform for Maven #43540
Draft
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.
For now, it doesn't work with Gradle due to OpenRewrite limitations but at least in the Maven case, we properly update the Platform groupId if we switch Platforms.
Also better handle adding new Platforms or removing Platforms.
Note that there is a big limitation to lift before merging this: OpenRewrite doesn't update the properties when updating the groupId/artifactId (it only does it for the version) which causes issues as we need to update the groupId for the plugin - and in any case, the current behavior is not very clean.
Another important thing to address before merging is the update of the Platform from io.quarkus to io.quarkus.platform which might not be what we want. We are using the io.quarkus Platform in very specific cases such as extension development and we want to keep this one when updating.
Fixes #42943 at least in the Maven case.