diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java index d0db565f1..aa72a8b1a 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java @@ -51,7 +51,9 @@ import org.apache.archiva.scheduler.ArchivaTaskScheduler; import org.apache.archiva.scheduler.repository.RepositoryTask; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.SystemUtils; import org.apache.maven.wagon.ConnectionException; import org.apache.maven.wagon.ResourceDoesNotExistException; import org.apache.maven.wagon.Wagon; @@ -286,6 +288,12 @@ public class DefaultRepositoryProxyConnectors String targetPath = targetRepository.toPath( artifact ); + if ( SystemUtils.IS_OS_WINDOWS ) + { + // toPath use system PATH_SEPARATOR so on windows url are \ which doesn't work very well :-) + targetPath = FilenameUtils.separatorsToUnix( targetPath ); + } + try { File downloadedFile =