From: Mathieu Baudier Date: Wed, 22 Mar 2023 12:26:44 +0000 (+0100) Subject: Fix Maven download X-Git-Tag: v2.3.5~19 X-Git-Url: https://git.argeo.org/?a=commitdiff_plain;h=948d50f9792c1984eb055e58b8199f5778df901f;p=cc0%2Fargeo-build.git Fix Maven download --- diff --git a/src/org/argeo/build/Repackage.java b/src/org/argeo/build/Repackage.java index 607a9ab..e433765 100644 --- a/src/org/argeo/build/Repackage.java +++ b/src/org/argeo/build/Repackage.java @@ -794,10 +794,6 @@ public class Repackage { /** Download a Maven artifact. */ Path downloadMaven(URL url, M2Artifact artifact) throws IOException { return download(url, mavenBase, M2ConventionsUtils.artifactPath("", artifact)); -// return download(url, mavenBase, artifact.getGroupId().replace(".", "/") // -// + '/' + artifact.getArtifactId() + '/' + artifact.getVersion() // -// + '/' + artifact.getArtifactId() + "-" + artifact.getVersion() -// + (artifact.getClassifier() != null ? "-" + artifact.getClassifier() : "") + ".jar"); } /* @@ -1578,7 +1574,8 @@ class M2ConventionsUtils { /** Absolute path to the directories where the files will be stored */ static String artifactParentPath(String artifactBasePath, M2Artifact artifact) { - return artifactBasePath + (artifactBasePath.endsWith("/") ? "" : "/") + artifactParentPath(artifact); + return artifactBasePath + (artifactBasePath.endsWith("/") || artifactBasePath.equals("") ? "" : "/") + + artifactParentPath(artifact); } /** Relative path to the directories where the files will be stored */