Skip to content

fix: Support escaped delimiters in --package for Maven packages#584

Open
HuyPhanNguyen wants to merge 1 commit intomainfrom
huy/2026/fd-135-cli-maven-package-version
Open

fix: Support escaped delimiters in --package for Maven packages#584
HuyPhanNguyen wants to merge 1 commit intomainfrom
huy/2026/fd-135-cli-maven-package-version

Conversation

@HuyPhanNguyen
Copy link
Copy Markdown
Contributor

@HuyPhanNguyen HuyPhanNguyen commented Mar 26, 2026

Summary

  • Add backslash escape support (\: \/ \=) to splitPackageOverrideString so Maven package IDs containing colons can be correctly specified via --package
  • Escape delimiter characters in ToPackageOverrideString so the reconstructed string sent to the server API is also parseable
  • Add test cases for Maven-style package IDs, escaped slashes in step names, and escaped backslashes

Fixes #547
Related: https://linear.app/octopus/issue/FD-135

Requires companion server PR: OctopusDeploy/OctopusDeploy#41734

Context

Maven package IDs use the format Group:Artifact (e.g. com.juliusbaer.fi-master:deployment). The CLI's --package argument uses : as a delimiter between package ID and version, making it impossible to specify Maven packages correctly.

With this fix, users can escape the colon:

octopus release create --package "com.juliusbaer.fi-master\:deployment:25.2026.04.1"

Test plan

  • Existing ParsePackageOverrideString tests pass (no regression)
  • Existing ToPackageOverrideString tests pass (no regression)
  • Existing ResolvePackageOverride and ApplyPackageOverride tests pass
  • New tests for escaped colons in Maven package IDs
  • New tests for escaped slashes in step names
  • New tests for escaped backslashes
  • Manual test with Maven feed

Maven package IDs contain colons (e.g. com.yourcompany:project-name) which
conflict with the delimiter used to separate package ID from version.
Add backslash escape support (\: \/ \=) so users can specify Maven packages:
--package "com.yourcompany\:project-name:1.0-SNAPSHOT"

Also escape delimiter chars when reconstructing override strings for the
server API.
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.

Maven Package Names with Colons Break --package Flag Parsing

1 participant