Class DefaultArchetypeManager

    • Constructor Detail

      • DefaultArchetypeManager

        public DefaultArchetypeManager()
    • Method Detail

      • archiveArchetype

        public 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
        Description copied from interface: ArchetypeManager
        Creates a jar file for an archetype.
        Specified by:
        archiveArchetype in interface ArchetypeManager
        Returns:
        The File to the generated jar
        Throws:
        org.apache.maven.artifact.DependencyResolutionRequiredException
        java.io.IOException
      • zip

        public void zip​(java.io.File sourceDirectory,
                        java.io.File archive)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • zipper

        private void zipper​(java.util.zip.ZipOutputStream zos,
                            int offset,
                            java.io.File currentSourceDirectory)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getLocalCatalog

        public ArchetypeCatalog getLocalCatalog​(org.apache.maven.project.ProjectBuildingRequest buildingRequest)
        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:
        buildingRequest - the catalog file path or directory containing the catalog file.
        Returns:
        the catalog.
      • getRemoteCatalog

        public ArchetypeCatalog getRemoteCatalog​(org.apache.maven.project.ProjectBuildingRequest buildingRequest)
        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:
        buildingRequest - TODO
        Returns:
        the catalog.
      • updateLocalCatalog

        public java.io.File updateLocalCatalog​(org.apache.maven.project.ProjectBuildingRequest buildingRequest,
                                               Archetype archetype)
        Specified by:
        updateLocalCatalog in interface ArchetypeManager