org.apache.maven.archetype
Interface ArchetypeManager

All Known Implementing Classes:
DefaultArchetypeManager

public interface ArchetypeManager

Author:
Jason van Zyl

Field Summary
static String ROLE
           
 
Method Summary
 File archiveArchetype(File archetypeDirectory, File outputDirectory, String finalName)
          Creates a jar file for an archetype.
 ArchetypeCreationResult createArchetypeFromProject(ArchetypeCreationRequest request)
          A command to create an archetype from an existing Maven project given the supplied creation request.
 ArchetypeGenerationResult generateProjectFromArchetype(ArchetypeGenerationRequest request)
          A command to generate a Maven project from an archetype given the supplied generation request.
 ArchetypeCatalog getDefaultLocalCatalog()
          Gives the catalog of archetypes located in ${user.home}/.m2/repository/archetype-catalog.xml.
 ArchetypeCatalog getInternalCatalog()
          Gives the catalog of archetypes internal to the plugin.
 ArchetypeCatalog getLocalCatalog(String path)
          Gives the catalog of archetypes located in the given path.
 ArchetypeCatalog getRemoteCatalog()
          Gives the catalog of archetypes located at http://repo1.maven.org/maven2/archetype-catalog.xml.
 ArchetypeCatalog getRemoteCatalog(String url)
          Gives the catalog of archetypes located at the given url.
 void updateLocalCatalog(Archetype archetype)
           
 void updateLocalCatalog(Archetype archetype, String path)
           
 

Field Detail

ROLE

static final String ROLE
Method Detail

createArchetypeFromProject

ArchetypeCreationResult createArchetypeFromProject(ArchetypeCreationRequest request)
A command to create an archetype from an existing Maven project given the supplied creation request.

Parameters:
request -
Returns:
The result of creating the archetype from the existing project. It contains any errors that might have occurred.

generateProjectFromArchetype

ArchetypeGenerationResult generateProjectFromArchetype(ArchetypeGenerationRequest request)
A command to generate a Maven project from an archetype given the supplied generation request.

Parameters:
request -
Returns:
The result of creating the project from the existing archetype. It contains any errors that might have occurred.

getInternalCatalog

ArchetypeCatalog getInternalCatalog()
Gives the catalog of archetypes internal to the plugin.

Returns:
the catalog.

getDefaultLocalCatalog

ArchetypeCatalog getDefaultLocalCatalog()
Gives the catalog of archetypes located in ${user.home}/.m2/repository/archetype-catalog.xml.

Returns:
the catalog.

getLocalCatalog

ArchetypeCatalog getLocalCatalog(String path)
Gives the catalog of archetypes located in the given path. if path is a file, it used as is. if path is a directory, archetype-catalog.xml is appended to it.

Parameters:
path - the catalog file path or directory containing the catalog file.
Returns:
the catalog.

getRemoteCatalog

ArchetypeCatalog getRemoteCatalog()
Gives the catalog of archetypes located at http://repo1.maven.org/maven2/archetype-catalog.xml.

Returns:
the catalog.

getRemoteCatalog

ArchetypeCatalog getRemoteCatalog(String url)
Gives the catalog of archetypes located at the given url. if the url doesn't define a catalog, then 'archetype-catalog.xml' is appended to it for search.

Parameters:
url - the catalog url or base url containing the catalog file.
Returns:
the catalog.

archiveArchetype

File archiveArchetype(File archetypeDirectory,
                      File outputDirectory,
                      String finalName)
                      throws org.apache.maven.artifact.DependencyResolutionRequiredException,
                             IOException
Creates a jar file for an archetype.

Parameters:
archetypeDirectory -
outputDirectory -
finalName -
Returns:
The File to the generated jar
Throws:
org.apache.maven.artifact.DependencyResolutionRequiredException
IOException

updateLocalCatalog

void updateLocalCatalog(Archetype archetype,
                        String path)

updateLocalCatalog

void updateLocalCatalog(Archetype archetype)


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.