PREQ-7452 Maven build: normalize Windows backslash paths when pushing artifacts - #326
Conversation
…acts On Windows runners, Maven's install plugin logs local-repo paths with backslashes (C:\...\.m2\repository\...), but the sed extracting the relative artifact path only matched a forward-slash .m2/repository/ prefix. The unmodified line was then passed to deploy-artifacts.sh, where unquoted word-splitting broke it into unrecognized tokens and every artifact silently failed org/* vs com/* classification, so nothing was deployed under mixed-privacy on Windows.
There was a problem hiding this comment.
Pull request overview
This PR improves cross-platform behavior of the build-maven GitHub Action by ensuring artifact paths extracted from Maven “Installing …” log lines are normalized on Windows runners, so downstream deploy/attestation logic continues to work consistently.
Changes:
- Normalize Windows backslash (
\) separators to forward slashes (/) when extracting installed artifact paths from Maven output. - Update the local-repo prefix stripping logic to support both
/and\separators. - Add a regression test covering Windows-style
Installing ... to C:\...\ .m2\repository\...log entries.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
build-maven/build.sh |
Normalizes .m2/repository prefix stripping for both slash styles and converts remaining \ to / for consistent artifact path matching. |
spec/build-maven_spec.sh |
Adds a regression test verifying that Windows-style Maven “Installing” paths are normalized and emitted correctly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6df5d85 to
bf75c05
Compare
bf75c05 to
55a87f4
Compare
The runner image now bundles the jf CLI, so this action no longer needs to install it itself before deploy-artifacts.sh runs.
|
Code Review ✅ Approved 1 resolved / 1 findingsNormalizes Windows backslash paths in Maven build artifacts and updates JFrog CLI integration, resolving the local configuration leak issue. ✅ 1 resolved✅ Quality: mise.local.toml copied to consumer workspace may clobber/leak config
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |



Updated the paths to count also for windows path seperators.
Summary by Gitar
build-maven/build.shto ensure consistent artifact path formatting.grepandsedpatterns to handle both/and\separators for local repository paths.jf config editinbuild-maven/deploy-artifacts.shby adding the--urlparameter to prevent field clearing issues.spec/build-maven_spec.shto verify path normalization with Windows-styleInstallinglog entries.spec/build-maven_deploy-artifacts_spec.shto reflect the updatedjf config editcommand.This will update automatically on new commits.