Skip to content

Preserve Git repository URLs for non-root release POMs - #1499

Open
goutamadwant wants to merge 1 commit into
apache:masterfrom
goutamadwant:fix-1457-git-scm-url
Open

goutamadwant wants to merge 1 commit into
apache:masterfrom
goutamadwant:fix-1457-git-scm-url

Conversation

@goutamadwant

@goutamadwant goutamadwant commented Sep 19, 2026

Copy link
Copy Markdown

Fixes #1457.

When a reactor POM is below the Git checkout root, release descriptor alignment removes path segments from the Git repository URL. For example, parent/pom.xml changes scm:git:https://example.com/team/project.git to scm:git:https://example.com/team, so pushing the release tag fails.

Preserve Git repository URLs in the shared descriptor alignment used by tag, branch, and rollback. Other SCM providers retain their existing directory alignment.

Validation:

  • Reproduced the failed tag push on unchanged master using a disposable local Git repository; the patched plugin completes prepare, rollback, and branch, with remote refs checked.
  • Added URL and phase regressions for root and nested POM layouts, Git URL forms, unchanged working directories, and SVN alignment.
  • mvn -Prun-its verify passed with Maven 3.9.16 and Java 21.
  • Focused regression tests passed on Java 8.

Checklist:

  • This pull request addresses one issue.
  • The description explains what changed, how, and why.
  • The commit has a meaningful subject and body.
  • Added regression tests that fail without the production fix.
  • Basic verification passed through mvn -Prun-its verify.
  • Integration tests passed with mvn -Prun-its verify.
  • I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004.
  • In any other case, please file an Apache Individual Contributor License Agreement.

Fixes apache#1457. Keep Git SCM URLs intact when aligning the release descriptor for nested reactor POMs. Preserve existing directory alignment for other providers and cover tag, branch, and rollback execution paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release:prepare truncates Git URL when pushing the tag

1 participant