cstamas commented on code in PR #2135:
URL: https://github.com/apache/maven-resolver/pull/2135#discussion_r3993568173
##########
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/EnhancedLocalRepositoryManager.java:
##########
@@ -326,6 +332,27 @@ private boolean applyTracking(Path path,
LocalArtifactResult result, Properties
result.setRepository(repository);
return true;
}
+ // Same-ID-different-URL fallback: if the tracking file
contains a URL-qualified entry for the
+ // same repository ID but with a different URL hash (e.g. real
Central tracked as
+ // "central-<sha1(realUrl)>=" but the current build overrides
central to "file:target/null"),
+ // the exact lookup misses because sha1(realUrl) !=
sha1(file:target/null). Match by repo-ID
+ // prefix: any entry starting with "filename>repoId-" is
accepted as originating from the same
+ // logical repository.
+ String repoIdPrefix = getKey(path, legacyKey + "-");
+ for (Object key : props.keySet()) {
+ String k = key.toString();
+ if (k.startsWith(repoIdPrefix) && !k.equals(getKey(path,
trackingKey))) {
Review Comment:
And that is right, the correct behaviour for mirrors/mrms.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]