From 72be2a94193a8bae79d562478c92432c135261d3 Mon Sep 17 00:00:00 2001 From: Eric Barboni Date: Tue, 18 Feb 2020 11:14:20 +0100 Subject: [PATCH] make getURIFromString compatible with windows path --- .../archiva/repository/maven2/MavenRepositoryProvider.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java index a68d70851..aeb547728 100644 --- a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java +++ b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java @@ -135,6 +135,9 @@ public class MavenRepositoryProvider implements RepositoryProvider { if (uriStr.startsWith("/")) { // only absolute paths are prepended with file scheme uri = new URI("file://" + uriStr); + } else if (uriStr.contains(":\\")) { + //windows absolute path drive + uri = new URI("file:///" + uriStr.replaceAll("\\\\", "/")); } else { uri = new URI(uriStr); } -- 2.39.5