archetype:create

The archetype creation goal looks for an archetype with a given groupId, artifactId, and version and retrieves it from the remote repository. Once the archetype is retrieved, it is then processed against a set of user parameters to create a working Maven project.

Mojo Attributes:

    Required Parameters

    Name Type Description
    archetypeArtifactId String The Archetype Artifact Id to be used. Default value is maven-archetype-quickstart.
    archetypeGroupId String The Archetype Group Id to be used. Default value is org.apache.maven.archetypes.
    archetypeVersion String The Archetype Version to be used. Default value is RELEASE.
    localRepository ArtifactRepository Maven's local repository.
    pomRemoteRepositories List The remote repositories available for discovering dependencies and extensions as indicated by the POM.
    version String The Version of the project to be build. Default value is 1.0-SNAPSHOT.

    Optional Parameters

    Name Type Description
    archetype Archetype Used to create the Archetype specified by the groupId, artifactId, and version from the remote repository.
    artifactId String The Artifact Id of the project to be build.
    artifactRepositoryFactory ArtifactRepositoryFactory Used to create ArtifactRepository objects given the urls of the remote repositories.
    basedir String No description. Default value is ${user.dir}.
    defaultArtifactRepositoryLayout ArtifactRepositoryLayout Determines whether the layout is legacy or not.
    groupId String The Group Id of the project to be build.
    packageName String The Package Name of the project to be build.
    project MavenProject The project to be created an archetype of.
    remoteRepositories String Other remote repositories available for discovering dependencies and extensions.

    Parameter Details

    archetype

    Used to create the Archetype specified by the groupId, artifactId, and version from the remote repository.

    • Type: org.apache.maven.archetype.Archetype
    • Required: No

    archetypeArtifactId The Archetype Artifact Id to be used.
    • Type: java.lang.String
    • Required: Yes
    • Expression: ${archetypeArtifactId}
    • Default: maven-archetype-quickstart

    archetypeGroupId The Archetype Group Id to be used.
    • Type: java.lang.String
    • Required: Yes
    • Expression: ${archetypeGroupId}
    • Default: org.apache.maven.archetypes

    archetypeVersion The Archetype Version to be used.
    • Type: java.lang.String
    • Required: Yes
    • Expression: ${archetypeVersion}
    • Default: RELEASE

    artifactId The Artifact Id of the project to be build.
    • Type: java.lang.String
    • Required: No
    • Expression: ${artifactId}

    artifactRepositoryFactory Used to create ArtifactRepository objects given the urls of the remote repositories.
    • Type: org.apache.maven.artifact.repository.ArtifactRepositoryFactory
    • Required: No

    basedir No Description.
    • Type: java.lang.String
    • Required: No
    • Expression: ${basedir}
    • Default: ${user.dir}

    defaultArtifactRepositoryLayout Determines whether the layout is legacy or not.
    • Type: org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout
    • Required: No

    groupId The Group Id of the project to be build.
    • Type: java.lang.String
    • Required: No
    • Expression: ${groupId}

    localRepository Maven's local repository.
    • Type: org.apache.maven.artifact.repository.ArtifactRepository
    • Required: Yes
    • Expression: ${localRepository}

    packageName The Package Name of the project to be build.
    • Type: java.lang.String
    • Required: No
    • Expression: ${packageName}

    pomRemoteRepositories The remote repositories available for discovering dependencies and extensions as indicated by the POM.
    • Type: java.util.List
    • Required: Yes
    • Expression: ${project.remoteArtifactRepositories}

    project The project to be created an archetype of.
    • Type: org.apache.maven.project.MavenProject
    • Required: No
    • Expression: ${project}

    remoteRepositories Other remote repositories available for discovering dependencies and extensions.
    • Type: java.lang.String
    • Required: No
    • Expression: ${remoteRepositories}

    version The Version of the project to be build.
    • Type: java.lang.String
    • Required: Yes
    • Expression: ${version}
    • Default: 1.0-SNAPSHOT