desruisseaux commented on code in PR #2347: URL: https://github.com/apache/maven/pull/2347#discussion_r2096554070
########## impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java: ########## @@ -226,6 +242,19 @@ public DependencyResolverResult resolve(DependencyResolverRequest request) } } + /** + * {@return the cache of information about the modules contained in a path element}. + * + * <p><b>TODO:</b> This method should not be in this class, because the cache should be global to the session. + * This method exists here only temporarily, until clarified where to store session-wide caches.</p> + */ + private PathModularizationCache moduleCache() { + if (moduleCache == null) { + moduleCache = new PathModularizationCache(); + } + return moduleCache; + } + Review Comment: A collision is possible if a JAR file changes between two executions. It may happen in particular if a JAR is the output of another project. It can also be a memory leak if a Maven process runs for a long time (the daemon?) and JAR paths change often (e.g. snapshot with timestamps). This is why the desired lifetime is a session (e.g. a call to `mvn compile`), with a fresh cache rebuilt every time that `mvn compile` is executed from the root of a multi-projects. -- 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: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org