fix(mavenBuild): use Maven 3.x altDeploymentRepository format (id::url)#5810
Open
fskhiri wants to merge 7 commits into
Open
fix(mavenBuild): use Maven 3.x altDeploymentRepository format (id::url)#5810fskhiri wants to merge 7 commits into
fskhiri wants to merge 7 commits into
Conversation
Drop the legacy ::default:: layout token. maven-deploy-plugin 3.x parses id::layout::url as id=<id>::default, which never matches the <server> entry in settings.xml, causing 401. The correct 3.x format is id::url only.
The slice was initialized with []string{} and immediately conditionally
appended to. Go convention for zero-value slice initialization is
'var deployFlags []string', which is functionally identical but avoids
allocating an empty slice header unnecessarily.
…rmat The description previously lacked guidance on which maven-deploy-plugin version is required. Users on plugin 3.0.0+ were hitting failures because the old three-token id::layout::url form was silently dropped in that release. Add a note explaining that Piper emits -DaltDeploymentRepository=id::url (Maven 3.x two-token format) and that maven-deploy-plugin 3.0.0+ is required. Also quote the YAML description string to avoid any YAML parser ambiguity with the embedded colons.
Contributor
Author
|
/it-go |
Contributor
Author
|
/it-go |
And-tab-8889
previously approved these changes
Jun 29, 2026
fabienfritz
reviewed
Jul 1, 2026
The existing test only covered the happy path (both ID and URL set). The production guard uses &&, meaning a partial config must silently skip the flag — but nothing prevented a future refactor from breaking that invariant. Add three subtests: - Publish=true, ID set, URL empty → flag must not appear - Publish=true, URL set, ID empty → flag must not appear - Publish=false, ID and URL set → deploy is skipped entirely
Contributor
Author
|
/it-go |
fabienfritz
approved these changes
Jul 2, 2026
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.
Description
Problem
The mavenBuild step was generating the -DaltDeploymentRepository flag in the legacy three-token format
(id::default::url), which is not supported by maven-deploy-plugin 3.0.0+. Pipelines using that plugin
version would fail at the deploy phase with an invalid repository format error.
Solution
Drop the ::default:: layout token and emit the Maven 3.x two-token format (id::url) instead, as required by
maven-deploy-plugin 3.x.
Changes
Maven 3.x format requirement and the minimum plugin version (maven-deploy-plugin 3.0.0+)
Testing
Unit tests updated and passing. Validated end-to-end with a sample pipeline pinned to
maven-deploy-plugin:3.0.0-M1.
Checklist