Package org.codehaus.mojo.mrm.impl.maven
Class MockArtifactStore
java.lang.Object
org.codehaus.mojo.mrm.api.maven.BaseArtifactStore
org.codehaus.mojo.mrm.impl.maven.MockArtifactStore
- All Implemented Interfaces:
ArtifactStore
An artifact store that keeps all its artifacts in memory.
- Since:
- 1.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String[]
The extensions to search for when looking for POMs to mock. -
Constructor Summary
ConstructorDescriptionMockArtifactStore
(File root) Create a mock artifact store by scanning for POMs within the specified root.MockArtifactStore
(org.apache.maven.plugin.logging.Log log, File root) Create a mock artifact store by scanning for POMs within the specified root.MockArtifactStore
(org.apache.maven.plugin.logging.Log log, File root, boolean lazyArchiver) Create a mock artifact store by scanning for POMs within the specified root. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.maven.archetype.catalog.ArchetypeCatalog
long
getArtifactIds
(String groupId) getArtifacts
(String groupId, String artifactId, String version) getGroupIds
(String parentGroupId) long
getLastModified
(Artifact artifact) org.apache.maven.artifact.repository.metadata.Metadata
getMetadata
(String path) long
long
getVersions
(String groupId, String artifactId) void
set
(Artifact artifact, InputStream content) Methods inherited from class org.codehaus.mojo.mrm.api.maven.BaseArtifactStore
setArchetypeCatalog, setMetadata
-
Field Details
-
POM_EXTENSIONS
The extensions to search for when looking for POMs to mock.- Since:
- 1.0
-
-
Constructor Details
-
MockArtifactStore
Create a mock artifact store by scanning for POMs within the specified root.- Parameters:
root
- the root to search for POMs within.- Since:
- 1.0
-
MockArtifactStore
Create a mock artifact store by scanning for POMs within the specified root.- Parameters:
log
- theLog
to log to.root
- the root to search for POMs within.- Since:
- 1.0
-
MockArtifactStore
Create a mock artifact store by scanning for POMs within the specified root.- Parameters:
log
- theLog
to log to.root
- the root to search for POMs within.- Since:
- 1.0
-
-
Method Details
-
getGroupIds
-
getArtifactIds
-
getVersions
-
getArtifacts
-
getLastModified
- Throws:
IOException
ArtifactNotFoundException
-
getSize
- Throws:
IOException
ArtifactNotFoundException
-
get
- Throws:
IOException
ArtifactNotFoundException
-
set
- Specified by:
set
in interfaceArtifactStore
- Overrides:
set
in classBaseArtifactStore
- Throws:
IOException
-
getMetadata
public org.apache.maven.artifact.repository.metadata.Metadata getMetadata(String path) throws IOException, MetadataNotFoundException - Throws:
IOException
MetadataNotFoundException
-
getMetadataLastModified
- Throws:
IOException
MetadataNotFoundException
-
getArchetypeCatalog
public org.apache.maven.archetype.catalog.ArchetypeCatalog getArchetypeCatalog() throws IOException, ArchetypeCatalogNotFoundException- Specified by:
getArchetypeCatalog
in interfaceArtifactStore
- Overrides:
getArchetypeCatalog
in classBaseArtifactStore
- Throws:
IOException
ArchetypeCatalogNotFoundException
-
getArchetypeCatalogLastModified
- Specified by:
getArchetypeCatalogLastModified
in interfaceArtifactStore
- Overrides:
getArchetypeCatalogLastModified
in classBaseArtifactStore
- Throws:
ArchetypeCatalogNotFoundException
-