Skip to content

Fix incorrect project URLs in published Maven POMs - #1823

Merged
mhalbritter merged 1 commit into
spring-io:mainfrom
YangSiJun528:fix-inherited-project-urls
Aug 31, 2026
Merged

mhalbritter merged 1 commit into
spring-io:mainfrom
YangSiJun528:fix-inherited-project-urls

Conversation

@YangSiJun528

@YangSiJun528 YangSiJun528 commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

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-actuator

Changes

Add <url>${git.url}</url> to all 11 module POMs.

Their flattened POMs now contain: https://github.com/spring-io/initializr

Approach

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 29, 2026
@mhalbritter mhalbritter self-assigned this Aug 31, 2026
See spring-iogh-1823

Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
@mhalbritter
mhalbritter force-pushed the fix-inherited-project-urls branch from c9b66dc to b24649f Compare August 31, 2026 06:40
@mhalbritter
mhalbritter merged commit 7ee0341 into spring-io:main Aug 31, 2026
3 checks passed
@mhalbritter mhalbritter added this to the 0.25.0 milestone Aug 31, 2026
@mhalbritter

Copy link
Copy Markdown
Contributor

Thanks @YangSiJun528 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants