diff --git a/asciidoc/release-notes.adoc b/asciidoc/release-notes.adoc index cdad6e89..95d95b44 100644 --- a/asciidoc/release-notes.adoc +++ b/asciidoc/release-notes.adoc @@ -69,6 +69,7 @@ For details about the following changes, check our JIRA install at link:https:// - FIX: HTTP issue: Basic authentication is stuck in 401 loop (jira:IVY-1336[]) - FIX: command line: -types seems to not accept comma [jira:IVY-1355[]] - FIX: Mixed use of symlinks leads to cache corruption [jira:IVY-1498[]] (Thanks to Stephen Haberman) +- FIX: Some cached location are badly stored which results in MalformedURLException [jira:IVY-1566[]] (Thanks to Aurélien Pupier) - IMPROVEMENT: Throw an IllegalStateException when retrieving the resolutionCacheRoot on the DefaultResolutionCacheManager if the basedir (or IvySettings) is not set (jira:IVY-1482[]) - IMPROVEMENT: Optimization: limit the revision numbers scanned if revision prefix is specified (Thanks to Ernestas Vaiciukevičius) @@ -240,3 +241,5 @@ Here is the list of people who have contributed source code and documentation up * Sven Zethelius * Aleksey Zhukov * Zhong Wang +* Aurélien Pupier + diff --git a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java index 4d303408..aca77187 100644 --- a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java +++ b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java @@ -1452,10 +1452,15 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv } private ArtifactOrigin getDefaultMetadataArtifactOrigin(ModuleRevisionId mrid) { + final String location; + try { + location = this.getIvyFileInCache(mrid).toURI().toURL().toExternalForm(); + } catch (MalformedURLException e) { + throw new RuntimeException("Failed to determine artifact origin for " + mrid); + } // it's important to say the origin is not local to make sure it won't ever be used for // anything else than original token - return new ArtifactOrigin(DefaultArtifact.newIvyArtifact(mrid, null), false, - getIvyFileInCache(mrid).getPath()); + return new ArtifactOrigin(DefaultArtifact.newIvyArtifact(mrid, null), false, location); } private Artifact getDefaultMetadataArtifact(ModuleRevisionId mrid) {