Skip to content

Conversation

@desruisseaux
Copy link
Contributor

This is a port of #2347. The intend is to avoid merge conflict with future ports such as #11153.

…uctor (apache#2347)

Make package-private the `DefaultDependencyResolverResult` constructor having a `PathModularizationCache` argument,
and add a public constructor without the cache argument for code in other packages that need to instantiate.
The public constructor may be temporary, until we decide in the future where to store session-wide cache.
import static org.apache.maven.impl.ImplUtils.map;

@Named
@Singleton
Copy link
Contributor

@gnodet gnodet Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the bean contains session-specific data, maybe we want to make it @SessionScope rather than @Singleton. That may be one possible answer to "until clarified where to store session-wide caches".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I have misused the "session" word, since I'm not sure which data are in a session. This cache should be valid as long as the JAR files do not change. For JAR files that are not produced by the project, it should be the JVM lifetime. For JAR files produced by the project and used as dependencies by sub-projects, this is an open question...

@desruisseaux desruisseaux merged commit e8b4ad4 into apache:maven-4.0.x Sep 22, 2025
36 of 38 checks passed
@github-actions github-actions bot added this to the 4.0.0 milestone Sep 22, 2025
@desruisseaux
Copy link
Contributor Author

Merged in its current form for consistency with the master branch. If @Singleton should be replaced by @SessionScope, it could be done on the master branch before to be ported, again for consistency.

@gnodet gnodet added the chore label Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants