public class ArchetypeManager extends Object
| Constructor and Description |
|---|
ArchetypeManager(File configFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArchetypeCatalogFactory(ArchetypeCatalogFactory factory) |
<T extends ArchetypeCatalogFactory> |
findParentCatalogFactory(org.apache.maven.archetype.catalog.Archetype a,
Class<T> type) |
ArchetypeCatalogFactory |
getArchetypeCatalogFactory(String catalogId) |
Collection<ArchetypeCatalogFactory> |
getArchetypeCatalogs() |
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(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
IOExceptionpublic void saveCatalogs()
throws IOException
IOExceptionpublic <T extends ArchetypeCatalogFactory> T findParentCatalogFactory(org.apache.maven.archetype.catalog.Archetype a, Class<T> type) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionpublic 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(), or, if it has none, the remote catalog the archetype is found in.
The 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.CoreExceptionpublic 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.CoreExceptionCopyright © 2005-2013 Sonatype, Inc.. All Rights Reserved.