Class DefaultArchetypeManager

java.lang.Object
org.apache.maven.archetype.DefaultArchetypeManager
All Implemented Interfaces:
ArchetypeManager

@Named @Singleton public class DefaultArchetypeManager extends Object implements ArchetypeManager
Author:
Jason van Zyl
  • Constructor Details

    • DefaultArchetypeManager

      public DefaultArchetypeManager()
  • Method Details

    • createArchetypeFromProject

      public ArchetypeCreationResult createArchetypeFromProject(ArchetypeCreationRequest request)
      Description copied from interface: ArchetypeManager
      A command to create an archetype from an existing Maven project given the supplied creation request.
      Specified by:
      createArchetypeFromProject in interface ArchetypeManager
      Parameters:
      request -
      Returns:
      The result of creating the archetype from the existing project. It contains any errors that might have occurred.
    • generateProjectFromArchetype

      public ArchetypeGenerationResult generateProjectFromArchetype(ArchetypeGenerationRequest request)
      Description copied from interface: ArchetypeManager
      A command to generate a Maven project from an archetype given the supplied generation request.
      Specified by:
      generateProjectFromArchetype in interface ArchetypeManager
      Parameters:
      request -
      Returns:
      The result of creating the project from the existing archetype. It contains any errors that might have occurred.
    • archiveArchetype

      public File archiveArchetype(File archetypeDirectory, File outputDirectory, String finalName) throws IOException
      Description copied from interface: ArchetypeManager
      Creates a jar file for an archetype.
      Specified by:
      archiveArchetype in interface ArchetypeManager
      Parameters:
      archetypeDirectory -
      outputDirectory -
      finalName -
      Returns:
      The File to the generated jar
      Throws:
      IOException
    • zip

      public void zip(File sourceDirectory, File archive) throws IOException
      Throws:
      IOException
    • getInternalCatalog

      public ArchetypeCatalog getInternalCatalog()
      Description copied from interface: ArchetypeManager
      Gives the catalog of archetypes internal to the plugin.
      Specified by:
      getInternalCatalog in interface ArchetypeManager
      Returns:
      the catalog.
    • getLocalCatalog

      public ArchetypeCatalog getLocalCatalog(org.eclipse.aether.RepositorySystemSession repositorySession)
      Description copied from interface: ArchetypeManager
      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.
      Specified by:
      getLocalCatalog in interface ArchetypeManager
      Parameters:
      repositorySession -
      Returns:
      the catalog.
    • getRemoteCatalog

      public ArchetypeCatalog getRemoteCatalog(org.eclipse.aether.RepositorySystemSession repositorySession, List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories)
      Description copied from interface: ArchetypeManager
      Gives the catalog of archetypes located at https://repo.maven.apache.org/maven2/archetype-catalog.xml.
      Specified by:
      getRemoteCatalog in interface ArchetypeManager
      Parameters:
      repositorySession -
      remoteRepositories -
      Returns:
      the catalog.
    • updateLocalCatalog

      public File updateLocalCatalog(org.eclipse.aether.RepositorySystemSession repositorySystemSession, Archetype archetype)
      Specified by:
      updateLocalCatalog in interface ArchetypeManager