blob: 063950b93ffca0fd2f49311e9bdfea8cc99bb53b [file] [log] [blame]
------
Introduction
------
Raphaël Piéroni
Hervé Boutemy
------
2011-09-30
------
~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership. The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License. You may obtain a copy of the License at
~~
~~ http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied. See the License for the
~~ specific language governing permissions and limitations
~~ under the License.
~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/doxia/references/apt-format.html
Maven Archetype Plugin
The Archetype Plugin allows the user to create a Maven project
from an existing template called an archetype.
It also allows the user to create an archetype from an existing project.
This plugin requires Java ${javaVersion}.
[images/archetype-overview.png] Maven Archetype Plugin Overview
* Usage
{{{./usage.html}Instructions on how to use the Archetype Plugin to create a project}}
can be found on the usage page.
The Archetype Plugin is embedded in IDEs (Eclipse, NetBeans, IDEA).
{{{./advanced-usage.html}Instructions on how to use the Archetype Plugin to create an archetype from an existing project}}
can be found on the advanced usage page.
* Goals Overview
The archetype plugin has four goals for direct use:
* {{{./generate-mojo.html}archetype:generate}} creates a Maven project from an
archetype: asks the user to choose an archetype from the archetype catalog, and retrieves it from the remote repository.
Once retrieved, it is processed to create a working Maven project.
* {{{./create-from-project-mojo.html}archetype:create-from-project}} creates
an archetype from an existing project.
* {{{./crawl-mojo.html}archetype:crawl}} search a repository
for archetypes and updates a catalog.
[]
and three goals bound to default lifecycle by {{{../archetype-packaging/}'maven-archetype' packaging}}:
* {{{./jar-mojo.html}archetype:jar}} (bound to the <<<package>>> phase) is used to build the archetype jar artifact.
* {{{./integration-test-mojo.html}archetype:integration-test}} (bound to the <<<integration-test>>> phase) is used to execute
archetype integration tests by generating sample projects from the just built archetype.
* {{{./update-local-catalog-mojo.html}archetype:update-local-catalog}} (bound to the <<<install>>> phase) is used to update
the local catalog.
[]
* Examples
The following examples show how to use the Archetype Plugin in more advanced
usecases:
* {{{./examples/generate-batch.html}Generate projects in batch mode}}
* {{{./examples/generate-alternative-catalog.html}Generate project using an alternative catalog}}
* {{{./examples/create-multi-module-project.html}Create an archetype from a multi-module project}}
* {{{./examples/create-with-property-file.html}Create an archetype with a property file}}
~~ * Handcrafting an archetype or features available to an archetype when not created by <<<create-from-project>>> - TBD
~~ * Generate a sub module from an archetype - TBD
~~ * Create an archetype in interactive mode - TBD
[]
* Specification
The specification page contains
{{{./specification/specification.html}the specification of the main parts of the Archetype Plugin}}.