public class ArchetypeManager extends Object
Constructor and Description |
---|
ArchetypeManager(org.codehaus.plexus.PlexusContainer container,
File configFile) |
Modifier and Type | Method and Description |
---|---|
void |
addArchetypeCatalogFactory(ArchetypeCatalogFactory factory) |
org.apache.maven.archetype.common.ArchetypeArtifactManager |
getArchetypeArtifactManager() |
ArchetypeCatalogFactory |
getArchetypeCatalogFactory(String catalogId) |
Collection<ArchetypeCatalogFactory> |
getArchetypeCatalogs() |
org.apache.maven.archetype.source.ArchetypeDataSource |
getArchetypeDataSource(String hint) |
org.apache.maven.archetype.ArchetypeManager |
getArchetyper() |
org.apache.maven.artifact.repository.ArtifactRepository |
getArchetypeRepository(org.apache.maven.archetype.catalog.Archetype archetype)
Gets the remote
ArtifactRepository of the given Archetype , or null if none is found. |
List<?> |
getRequiredProperties(org.apache.maven.archetype.catalog.Archetype archetype,
org.apache.maven.artifact.repository.ArtifactRepository remoteArchetypeRepository,
org.eclipse.core.runtime.IProgressMonitor monitor)
Gets the required properties of an
Archetype . |
void |
readCatalogs() |
void |
removeArchetypeCatalogFactory(String catalogId) |
void |
saveCatalogs() |
public ArchetypeManager(org.codehaus.plexus.PlexusContainer container, File configFile)
public Collection<ArchetypeCatalogFactory> getArchetypeCatalogs()
public void addArchetypeCatalogFactory(ArchetypeCatalogFactory factory)
public void removeArchetypeCatalogFactory(String catalogId)
public ArchetypeCatalogFactory getArchetypeCatalogFactory(String catalogId)
public void readCatalogs() throws IOException
IOException
public void saveCatalogs() throws IOException
IOException
public org.apache.maven.artifact.repository.ArtifactRepository getArchetypeRepository(org.apache.maven.archetype.catalog.Archetype archetype) throws org.eclipse.core.runtime.CoreException
ArtifactRepository
of the given Archetype
, or null if none is found. The repository
url is extracted from Archetype#getRepository(). The {@link ArtifactRepository} id is set to
archetypeId+"-repo", to enable authentication on that repository.archetype
- ArtifactRepository
of the given Archetype
, or null if none is found.org.eclipse.core.runtime.CoreException
public List<?> getRequiredProperties(org.apache.maven.archetype.catalog.Archetype archetype, org.apache.maven.artifact.repository.ArtifactRepository remoteArchetypeRepository, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.apache.maven.archetype.exception.UnknownArchetype, org.eclipse.core.runtime.CoreException
Archetype
.archetype
- the archetype possibly declaring required propertiesremoteArchetypeRepository
- the remote archetype repository, can be null.monitor
- the progress monitor, can be null.org.apache.maven.archetype.exception.UnknownArchetype
- thrown if no archetype is can be resolvedorg.eclipse.core.runtime.CoreException
public org.apache.maven.archetype.common.ArchetypeArtifactManager getArchetypeArtifactManager()
public org.apache.maven.archetype.ArchetypeManager getArchetyper()
public org.apache.maven.archetype.source.ArchetypeDataSource getArchetypeDataSource(String hint)
Copyright © 2005–2015 Sonatype, Inc.. All rights reserved.