From 28205585e241e1c02afe7207a689c18049c36def Mon Sep 17 00:00:00 2001 From: Romain Manni-Bucau Date: Wed, 7 Feb 2024 21:10:11 +0100 Subject: [PATCH] [GERONIMO-6859] for windows switch to zip urls instead of tar.gz which don't exist --- .../org/apache/geronimo/arthur/maven/mojo/ArthurMojo.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arthur-maven-plugin/src/main/java/org/apache/geronimo/arthur/maven/mojo/ArthurMojo.java b/arthur-maven-plugin/src/main/java/org/apache/geronimo/arthur/maven/mojo/ArthurMojo.java index ff55222..fbaf210 100644 --- a/arthur-maven-plugin/src/main/java/org/apache/geronimo/arthur/maven/mojo/ArthurMojo.java +++ b/arthur-maven-plugin/src/main/java/org/apache/geronimo/arthur/maven/mojo/ArthurMojo.java @@ -207,10 +207,12 @@ private String buildDownloadUrl(final String graalPlatform) { graalDownloadUrl; if (graalVersion.endsWith("-graalce")) { graalJavaVersion = graalVersion.substring(0, graalVersion.length() - "-graalce".length()); - baseUrl = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-" + graalJavaVersion + "/graalvm-community-jdk-" + graalJavaVersion + "_${githubPlatform2}_bin.tar.gz"; + baseUrl = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-" + graalJavaVersion + "/graalvm-community-jdk-" + graalJavaVersion + "_${githubPlatform2}_bin." + + (System.getProperty("os.name", "").contains("win") ? "zip" : "tar.gz"); } else if (graalVersion.endsWith("-graal-oracle")) { graalJavaVersion = graalVersion.substring(0, graalVersion.length() - "-graal-oracle".length()); - baseUrl = "https://download.oracle.com/graalvm/" + graalJavaVersion + "/latest/graalvm-jdk-" + graalJavaVersion + "_${githubPlatform2}_bin.tar.gz"; + baseUrl = "https://download.oracle.com/graalvm/" + graalJavaVersion + "/latest/graalvm-jdk-" + graalJavaVersion + "_${githubPlatform2}_bin." + + (System.getProperty("os.name", "").contains("win") ? "zip" : "tar.gz"); } return baseUrl .replace("${graalSimpleVersion}", graalSimpleVersion)