Package org.apache.maven.plugin
Class DefaultPluginArtifactsCache
java.lang.Object
org.apache.maven.plugin.DefaultPluginArtifactsCache
- All Implemented Interfaces:
PluginArtifactsCache
@Named
@Singleton
public class DefaultPluginArtifactsCache
extends Object
implements PluginArtifactsCache
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
CacheKeyNested classes/interfaces inherited from interface org.apache.maven.plugin.PluginArtifactsCache
PluginArtifactsCache.CacheRecord, PluginArtifactsCache.Key
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<PluginArtifactsCache.Key,
PluginArtifactsCache.CacheRecord> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
createKey
(Plugin plugin, org.eclipse.aether.graph.DependencyFilter extensionFilter, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) void
flush()
protected static boolean
pluginEquals
(Plugin a, Plugin b) protected static int
pluginHashCode
(Plugin plugin) put
(PluginArtifactsCache.Key key, List<Artifact> pluginArtifacts) put
(PluginArtifactsCache.Key key, PluginResolutionException exception) void
register
(MavenProject project, PluginArtifactsCache.Key cacheKey, PluginArtifactsCache.CacheRecord record) Registers the specified cache record for usage with the given project.
-
Field Details
-
cache
-
-
Constructor Details
-
DefaultPluginArtifactsCache
public DefaultPluginArtifactsCache()
-
-
Method Details
-
createKey
public PluginArtifactsCache.Key createKey(Plugin plugin, org.eclipse.aether.graph.DependencyFilter extensionFilter, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) - Specified by:
createKey
in interfacePluginArtifactsCache
-
get
public PluginArtifactsCache.CacheRecord get(PluginArtifactsCache.Key key) throws PluginResolutionException - Specified by:
get
in interfacePluginArtifactsCache
- Throws:
PluginResolutionException
-
put
public PluginArtifactsCache.CacheRecord put(PluginArtifactsCache.Key key, List<Artifact> pluginArtifacts) - Specified by:
put
in interfacePluginArtifactsCache
-
assertUniqueKey
-
put
public PluginArtifactsCache.CacheRecord put(PluginArtifactsCache.Key key, PluginResolutionException exception) - Specified by:
put
in interfacePluginArtifactsCache
-
flush
public void flush()- Specified by:
flush
in interfacePluginArtifactsCache
-
pluginHashCode
-
pluginEquals
-
register
public void register(MavenProject project, PluginArtifactsCache.Key cacheKey, PluginArtifactsCache.CacheRecord record) Description copied from interface:PluginArtifactsCache
Registers the specified cache record for usage with the given project. Integrators can use the information collected from this method in combination with a custom cache implementation to dispose unused records from the cache.- Specified by:
register
in interfacePluginArtifactsCache
- Parameters:
project
- The project that employs the plugin realm, must not benull
.record
- The cache record being used for the project, must not benull
.
-