Repository navigation
Fix incorrect project URLs in published Maven POMs - #1823
Merged
mhalbritter merged 1 commit intoAug 31, 2026
Merged
Conversation
See spring-iogh-1823 Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
mhalbritter
force-pushed
the
fix-inherited-project-urls
branch
from
August 31, 2026 06:40
c9b66dc to
b24649f
Compare
Contributor
|
Thanks @YangSiJun528 ! |
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.
Problem
Maven appends a path adjustment, usually the child artifact ID, to inherited project URLs. With multiple levels of inheritance, these adjustments accumulate.
For example, initializr-actuator:0.24.0 contains:
https://github.com/spring-io/initializr/initializr-bom/initializr-parent/initializr-actuatorChanges
Add
<url>${git.url}</url>to all 11 module POMs.Their flattened POMs now contain:
https://github.com/spring-io/initializrApproach
Maven supports
child.project.url.inherit.append.path="false", and it works in a full reactor build. However, the Flatten Maven Plugin does not preserve the attribute in published parent POMs. A child that inherits from a flattened parent therefore appends its path again.Declaring
<url>${git.url}</url>in each module avoids this problem.Spring AI and Spring Batch also declare a URL in each module.