Class DefaultArchetypeArtifactManager
java.lang.Object
org.apache.maven.archetype.common.DefaultArchetypeArtifactManager
- All Implemented Interfaces:
ArchetypeArtifactManager
@Named
@Singleton
public class DefaultArchetypeArtifactManager
extends Object
implements ArchetypeArtifactManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
exists
(String archetypeGroupId, String archetypeArtifactId, String archetypeVersion, List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories, org.eclipse.aether.RepositorySystemSession repositorySystemSession) getArchetypeFile
(String groupId, String artifactId, String version, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession repositorySystemSession) getArchetypeJarLoader
(File archetypeFile) org.apache.maven.model.Model
getArchetypePom
(File jar) getArchetypeZipFile
(File archetypeFile) getFileSetArchetypeDescriptor
(File archetypeFile) getFilesetArchetypeResources
(File archetypeFile) getOldArchetypeDescriptor
(File archetypeFile) getPostGenerationScript
(File archetypeFile) Get the archetype file's post-generation script content, read as UTF-8 content.boolean
isFileSetArchetype
(File archetypeFile) boolean
isOldArchetype
(File archetypeFile)
-
Constructor Details
-
DefaultArchetypeArtifactManager
public DefaultArchetypeArtifactManager()
-
-
Method Details
-
getArchetypeFile
public File getArchetypeFile(String groupId, String artifactId, String version, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession repositorySystemSession) throws UnknownArchetype - Specified by:
getArchetypeFile
in interfaceArchetypeArtifactManager
- Throws:
UnknownArchetype
-
getArchetypeJarLoader
- Specified by:
getArchetypeJarLoader
in interfaceArchetypeArtifactManager
- Throws:
UnknownArchetype
-
getArchetypePom
public org.apache.maven.model.Model getArchetypePom(File jar) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, UnknownArchetype, IOException - Specified by:
getArchetypePom
in interfaceArchetypeArtifactManager
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
UnknownArchetype
IOException
-
getArchetypeZipFile
- Specified by:
getArchetypeZipFile
in interfaceArchetypeArtifactManager
- Throws:
UnknownArchetype
-
isFileSetArchetype
- Specified by:
isFileSetArchetype
in interfaceArchetypeArtifactManager
-
isOldArchetype
- Specified by:
isOldArchetype
in interfaceArchetypeArtifactManager
-
exists
public boolean exists(String archetypeGroupId, String archetypeArtifactId, String archetypeVersion, List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories, org.eclipse.aether.RepositorySystemSession repositorySystemSession) - Specified by:
exists
in interfaceArchetypeArtifactManager
-
getPostGenerationScript
Description copied from interface:ArchetypeArtifactManager
Get the archetype file's post-generation script content, read as UTF-8 content.- Specified by:
getPostGenerationScript
in interfaceArchetypeArtifactManager
- Parameters:
archetypeFile
- the archetype file- Returns:
- the archetype file's post-generation script content or
null
if there is no script in the archetype - Throws:
UnknownArchetype
-
getFileSetArchetypeDescriptor
public ArchetypeDescriptor getFileSetArchetypeDescriptor(File archetypeFile) throws UnknownArchetype - Specified by:
getFileSetArchetypeDescriptor
in interfaceArchetypeArtifactManager
- Throws:
UnknownArchetype
-
getFilesetArchetypeResources
- Specified by:
getFilesetArchetypeResources
in interfaceArchetypeArtifactManager
- Throws:
UnknownArchetype
-
getOldArchetypeDescriptor
- Specified by:
getOldArchetypeDescriptor
in interfaceArchetypeArtifactManager
- Throws:
UnknownArchetype
-