Plugin Documentation

Goals available for this plugin:

GoalDescription
archetype:crawlCrawl a Maven repository (filesystem, not HTTP) and creates a catalog file.
archetype:createDeprecated. Please use the generate mojo instead.
archetype:create-from-projectCreates an archetype project from the current project, with a basic integration-test.
archetype:generateGenerates a new project from an archetype, or updated the actual project if using a partial archetype. If the project is fully generated, it is generated in a directory corresponding to its artifactId. If the project is updated with a partial archetype, it is done in the current directory.
archetype:helpDisplay help information on maven-archetype-plugin.
Call
  mvn archetype:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details.
archetype:integration-test

Execute the archetype integration tests, consisting in generating projects from the current archetype and optionally comparing generated projects with reference copy.

Each IT consists of a sub-directory in src/test/resources/projects containing:

  • a goal.txt file, containing a list of goals to run against the generated project (can be empty, content ignored before maven-archetype-plugin 2.1),
  • an archetype.properties file, containing properties for project generation,
  • an optional reference/ directory containing a reference copy of the expected project created from the IT.
Notice that it is expected to be run as part as of a build after the package phase and not directly as a goal from CLI.
archetype:jarBuild a JAR from the current Archetype project.
archetype:update-local-catalogUpdates the local catalog

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven2.0.7
JDK1.5
MemoryNo minimum requirement.
Disk SpaceNo minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-archetype-plugin</artifactId>
          <version>2.1</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-archetype-plugin</artifactId>
        <version>2.1</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"