Package org.apache.maven.plugin
Class DefaultPluginDescriptorCache
- java.lang.Object
-
- org.apache.maven.plugin.DefaultPluginDescriptorCache
-
- All Implemented Interfaces:
PluginDescriptorCache
@Component(role=PluginDescriptorCache.class) public class DefaultPluginDescriptorCache extends java.lang.Object implements PluginDescriptorCache
Caches raw plugin descriptors. A raw plugin descriptor is a descriptor that has just been extracted from the plugin artifact and does not contain any runtime specific data. The cache must not be used for descriptors that hold runtime data like the plugin realm. Warning: This is an internal utility interface that is only public for technical reasons, it is not part of the public API. In particular, this interface can be changed or deleted without prior notice.- Since:
- 3.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
DefaultPluginDescriptorCache.CacheKey
-
Nested classes/interfaces inherited from interface org.apache.maven.plugin.PluginDescriptorCache
PluginDescriptorCache.Key, PluginDescriptorCache.PluginDescriptorSupplier
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<PluginDescriptorCache.Key,PluginDescriptor>
descriptors
-
Constructor Summary
Constructors Constructor Description DefaultPluginDescriptorCache()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.List<org.codehaus.plexus.component.repository.ComponentDescriptor<?>>
clone(java.util.List<MojoDescriptor> mojos, PluginDescriptor pluginDescriptor)
protected static PluginDescriptor
clone(PluginDescriptor original)
PluginDescriptorCache.Key
createKey(Plugin plugin, java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session)
void
flush()
PluginDescriptor
get(PluginDescriptorCache.Key cacheKey)
PluginDescriptor
get(PluginDescriptorCache.Key key, PluginDescriptorCache.PluginDescriptorSupplier supplier)
void
put(PluginDescriptorCache.Key cacheKey, PluginDescriptor pluginDescriptor)
-
-
-
Field Detail
-
descriptors
private java.util.Map<PluginDescriptorCache.Key,PluginDescriptor> descriptors
-
-
Method Detail
-
flush
public void flush()
- Specified by:
flush
in interfacePluginDescriptorCache
-
createKey
public PluginDescriptorCache.Key createKey(Plugin plugin, java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session)
- Specified by:
createKey
in interfacePluginDescriptorCache
-
get
public PluginDescriptor get(PluginDescriptorCache.Key cacheKey)
- Specified by:
get
in interfacePluginDescriptorCache
-
get
public PluginDescriptor get(PluginDescriptorCache.Key key, PluginDescriptorCache.PluginDescriptorSupplier supplier) throws PluginDescriptorParsingException, PluginResolutionException, InvalidPluginDescriptorException
- Specified by:
get
in interfacePluginDescriptorCache
- Throws:
PluginDescriptorParsingException
PluginResolutionException
InvalidPluginDescriptorException
-
put
public void put(PluginDescriptorCache.Key cacheKey, PluginDescriptor pluginDescriptor)
- Specified by:
put
in interfacePluginDescriptorCache
-
clone
protected static PluginDescriptor clone(PluginDescriptor original)
-
clone
private static java.util.List<org.codehaus.plexus.component.repository.ComponentDescriptor<?>> clone(java.util.List<MojoDescriptor> mojos, PluginDescriptor pluginDescriptor)
-
-