You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/10/12 09:32:57 UTC
(maven-gh-actions-shared) branch agent/runner-maven updated: Keep the Maven archive on a Unix-style path for tar on Windows
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch agent/runner-maven
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git
The following commit(s) were added to refs/heads/agent/runner-maven by this push:
new d21f765 Keep the Maven archive on a Unix-style path for tar on Windows
d21f765 is described below
commit d21f76583bb7468bb37bbc4dd20881acbcd7d490
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Mon Oct 12 09:32:52 2026 +0000
Keep the Maven archive on a Unix-style path for tar on Windows
---
.github/workflows/maven-verify.yml | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index 1cb4e33..c8733e1 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -349,13 +349,15 @@ jobs:
MAVEN_VERSION: ${{ needs.setup-maven-version.outputs.version }}
run: |
url="https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MAVEN_VERSION/apache-maven-$MAVEN_VERSION-bin.tar.gz"
- archive="$RUNNER_TEMP/apache-maven-$MAVEN_VERSION-bin.tar.gz"
+ # a Unix-style path: tar in Git Bash on Windows takes "D:" in $RUNNER_TEMP for a remote host
+ mkdir -p ~/.m2/dists
+ archive="$HOME/.m2/dists/apache-maven-$MAVEN_VERSION-bin.tar.gz"
curl --fail --silent --show-error --location --retry 5 --retry-all-errors --output "$archive" "$url"
expected="$(curl --fail --silent --show-error --location --retry 5 --retry-all-errors "$url.sha512" | cut -d ' ' -f 1)"
actual="$(openssl dgst -sha512 -r "$archive" | cut -d ' ' -f 1)"
[ "$expected" = "$actual" ] || { echo "::error::SHA-512 mismatch for $url"; exit 1; }
- mkdir -p ~/.m2/dists
tar -xzf "$archive" -C ~/.m2/dists
+ rm "$archive"
- name: Set up Maven
if: steps.runner-maven.outputs.matches != 'true'
@@ -521,13 +523,15 @@ jobs:
MAVEN_VERSION: ${{ matrix.maven }}
run: |
url="https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MAVEN_VERSION/apache-maven-$MAVEN_VERSION-bin.tar.gz"
- archive="$RUNNER_TEMP/apache-maven-$MAVEN_VERSION-bin.tar.gz"
+ # a Unix-style path: tar in Git Bash on Windows takes "D:" in $RUNNER_TEMP for a remote host
+ mkdir -p ~/.m2/dists
+ archive="$HOME/.m2/dists/apache-maven-$MAVEN_VERSION-bin.tar.gz"
curl --fail --silent --show-error --location --retry 5 --retry-all-errors --output "$archive" "$url"
expected="$(curl --fail --silent --show-error --location --retry 5 --retry-all-errors "$url.sha512" | cut -d ' ' -f 1)"
actual="$(openssl dgst -sha512 -r "$archive" | cut -d ' ' -f 1)"
[ "$expected" = "$actual" ] || { echo "::error::SHA-512 mismatch for $url"; exit 1; }
- mkdir -p ~/.m2/dists
tar -xzf "$archive" -C ~/.m2/dists
+ rm "$archive"
- name: Set up Maven
if: steps.should-run.conclusion == 'success' && steps.runner-maven.outputs.matches != 'true'