Bootstrap Maven: replace the met runtime extensions but not their child deps #10014
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.
The current implementation is actually replacing way too many runtime dependencies with their corresponding deployment ones than necessary, i.e. for nothing.
It is based on the assumption that if extension E1 depends on extension E2 then
This assumption allows us to resolve the complete deployment dependency tree of a given extension with a single Maven request.
The way the resolver works is it resolves the graph of the application dependencies and then navigates all the nodes collecting all the runtime artifacts of Quarkus extensions. Once all of the extensions have been collected, it replaces branches starting with the each found runtime extension artifact with its corresponding deployment artifact dependency branch. (And then re-runs the Maven's version convergence over the new graph)
It would however be enough to only replace the first met runtime extension node with its corresponding deployment node. Replacing the children of the already replaced runtime node is actually a wast of time, given that the branch starting with the original runtime node has already been cut off from the full graph.