diff --git a/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager/AbstractDependencyManager.java b/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager/AbstractDependencyManager.java index 90bb3c1eb..9996eb6a4 100644 --- a/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager/AbstractDependencyManager.java +++ b/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager/AbstractDependencyManager.java @@ -51,6 +51,9 @@ * or applied in same POM) are always applied. This implementation makes sure, that version and scope are not applied * onto same node that actually provided the rules, to no override work that ModelBuilder did. It achieves this goal * by tracking "depth" for each collected rule and ignoring rules coming from same depth as processed dependency node is. + *
+ * Note for future: the field {@code managedLocalPaths} is intentionally left out of hash/equals, with
+ * reason explained above.
*
* @since 2.0.0
*/
@@ -113,15 +116,8 @@ protected AbstractDependencyManager(
// nullable: if using scope manager, but there is no system scope defined
this.systemDependencyScope = systemDependencyScope;
- this.hashCode = Objects.hash(
- depth,
- deriveUntil,
- applyFrom,
- managedVersions,
- managedScopes,
- managedOptionals,
- managedLocalPaths,
- managedExclusions);
+ // exclude managedLocalPaths
+ this.hashCode = Objects.hash(depth, managedVersions, managedScopes, managedOptionals, managedExclusions);
}
protected abstract DependencyManager newInstance(
@@ -185,7 +181,7 @@ public DependencyManager deriveChildManager(DependencyCollectionContext context)
Collection