org.apache.maven.archetype
Interface Archetype

All Known Implementing Classes:
DefaultArchetype

public interface Archetype

Author:
Jason van Zyl

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

Field Detail

ROLE

static final java.lang.String ROLE
Method Detail

createArchetypeFromProject

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

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

generateProjectFromArchetype

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

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

getInternalCatalog

org.apache.maven.archetype.catalog.ArchetypeCatalog getInternalCatalog()
Gives the catalog of archetypes internal to the plugin.

Returns:
the catalog.

getDefaultLocalCatalog

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

Returns:
the catalog.

getLocalCatalog

org.apache.maven.archetype.catalog.ArchetypeCatalog getLocalCatalog(java.lang.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

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

Returns:
the catalog.

getRemoteCatalog

org.apache.maven.archetype.catalog.ArchetypeCatalog getRemoteCatalog(java.lang.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

java.io.File archiveArchetype(java.io.File archetypeDirectory,
                              java.io.File outputDirectory,
                              java.lang.String finalName)
                              throws org.apache.maven.artifact.DependencyResolutionRequiredException,
                                     java.io.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
java.io.IOException

updateLocalCatalog

void updateLocalCatalog(org.apache.maven.archetype.catalog.Archetype archetype,
                        java.lang.String path)

updateLocalCatalog

void updateLocalCatalog(org.apache.maven.archetype.catalog.Archetype archetype)


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