blob: 33135335973c4e52714aeaca01e7fe239645aff2 [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/apt/index.apt at 2021-12-27
| Rendered using Apache Maven Fluido Skin 1.7
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="author" content="Jason van Zyl" />
<meta name="Date-Creation-yyyymmdd" content="20090826" />
<meta name="Date-Revision-yyyymmdd" content="20211227" />
<meta http-equiv="Content-Language" content="en" />
<title>Maven Archetype &#x2013; About</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.7.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script type="text/javascript" src="./js/apache-maven-fluido-1.7.min.js"></script>
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-140879-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body class="topBarEnabled">
<a href="https://github.com/apache/maven-archetype">
<img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"
alt="Fork me on GitHub">
</a>
<div id="topbar" class="navbar navbar-fixed-top ">
<div class="navbar-inner">
<div class="container-fluid">
<a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<ul class="nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Overview <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="index.html" title="Introduction">Introduction</a></li>
<li><a href="maven-archetype-plugin/index.html" title="Maven Archetype Plugin">Maven Archetype Plugin</a></li>
<li><a href="http://www.apache.org/licenses/" title="License">License</a></li>
<li><a href="download.html" title="Download">Download</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Modules <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="archetype-models/index.html" title="Maven Archetype Models">Maven Archetype Models</a></li>
<li><a href="archetype-common/index.html" title="Maven Archetype Common">Maven Archetype Common</a></li>
<li><a href="maven-archetype-plugin/index.html" title="Maven Archetype Plugin">Maven Archetype Plugin</a></li>
<li><a href="archetype-packaging/index.html" title="Maven Archetype Packaging">Maven Archetype Packaging</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Project Documentation <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-submenu">
<a href="project-info.html" title="Project Information">Project Information</a>
<ul class="dropdown-menu">
<li><a href="index.html" title="About">About</a></li>
<li><a href="summary.html" title="Summary">Summary</a></li>
<li><a href="dependency-info.html" title="Dependency Information">Dependency Information</a></li>
<li><a href="modules.html" title="Project Modules">Project Modules</a></li>
<li><a href="team.html" title="Team">Team</a></li>
<li><a href="scm.html" title="Source Code Management">Source Code Management</a></li>
<li><a href="issue-management.html" title="Issue Management">Issue Management</a></li>
<li><a href="mailing-lists.html" title="Mailing Lists">Mailing Lists</a></li>
<li><a href="dependency-management.html" title="Dependency Management">Dependency Management</a></li>
<li><a href="dependency-convergence.html" title="Dependency Convergence">Dependency Convergence</a></li>
<li><a href="ci-management.html" title="CI Management">CI Management</a></li>
<li><a href="plugin-management.html" title="Plugin Management">Plugin Management</a></li>
<li><a href="plugins.html" title="Plugins">Plugins</a></li>
<li><a href="distribution-management.html" title="Distribution Management">Distribution Management</a></li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="project-reports.html" title="Project Reports">Project Reports</a>
<ul class="dropdown-menu">
<li><a href="surefire-report.html" title="Surefire Report">Surefire Report</a></li>
</ul>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Maven Projects <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="index.html" title="Archetype">Archetype</a></li>
<li><a href="../resolver/index.html" title="Artifact Resolver">Artifact Resolver</a></li>
<li><a href="../doxia/index.html" title="Doxia">Doxia</a></li>
<li><a href="../jxr/index.html" title="JXR">JXR</a></li>
<li><a href="../ref/current" title="Maven">Maven</a></li>
<li><a href="../pom/index.html" title="Parent POMs">Parent POMs</a></li>
<li><a href="../plugins/index.html" title="Plugins">Plugins</a></li>
<li><a href="../plugin-testing/index.html" title="Plugin Testing">Plugin Testing</a></li>
<li><a href="../plugin-tools/index.html" title="Plugin Tools">Plugin Tools</a></li>
<li><a href="../apache-resource-bundles/index.html" title="Resource Bundles">Resource Bundles</a></li>
<li><a href="../scm/index.html" title="SCM">SCM</a></li>
<li><a href="../shared/index.html" title="Shared Components">Shared Components</a></li>
<li><a href="../skins/index.html" title="Skins">Skins</a></li>
<li><a href="../surefire/index.html" title="Surefire">Surefire</a></li>
<li><a href="../wagon/index.html" title="Wagon">Wagon</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">ASF <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="https://www.apache.org/foundation/how-it-works.html" title="How Apache Works">How Apache Works</a></li>
<li><a href="https://www.apache.org/foundation/" title="Foundation">Foundation</a></li>
<li><a href="https://www.apache.org/foundation/sponsorship.html" title="Sponsoring Apache">Sponsoring Apache</a></li>
<li><a href="https://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div id="banner">
<div class="pull-left"><a href="https://www.apache.org/" id="bannerLeft"><img src="../images/apache-maven-project.png" alt="Maven Archetype"/></a></div>
<div class="pull-right"><a href="../" id="bannerRight"><img src="../images/maven-logo-black-on-white.png" alt=""/></a></div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li class=""><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>
<li class=""><a href="../index.html" title="Maven">Maven</a><span class="divider">/</span></li>
<li class=""><a href="../maven-archetype/index.html" title="Maven Archetype">Maven Archetype</a><span class="divider">/</span></li>
<li class="active ">About <a href="https://github.com/apache/maven-archetype/tree/maven-archetype-3.2.1/src/site/apt/index.apt"><img src="./images/accessories-text-editor.png" title="Edit" /></a></li>
<li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2021-12-27</li>
<li id="projectVersion" class="pull-right">Version: 3.2.1</li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span2">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Overview</li>
<li class="active"><a href="#"><span class="none"></span>Introduction</a></li>
<li><a href="maven-archetype-plugin/index.html" title="Maven Archetype Plugin"><span class="none"></span>Maven Archetype Plugin</a></li>
<li><a href="http://www.apache.org/licenses/" class="externalLink" title="License"><span class="none"></span>License</a></li>
<li><a href="download.html" title="Download"><span class="none"></span>Download</a></li>
<li class="nav-header">Modules</li>
<li><a href="archetype-models/index.html" title="Maven Archetype Models"><span class="none"></span>Maven Archetype Models</a></li>
<li><a href="archetype-common/index.html" title="Maven Archetype Common"><span class="none"></span>Maven Archetype Common</a></li>
<li><a href="maven-archetype-plugin/index.html" title="Maven Archetype Plugin"><span class="none"></span>Maven Archetype Plugin</a></li>
<li><a href="archetype-packaging/index.html" title="Maven Archetype Packaging"><span class="none"></span>Maven Archetype Packaging</a></li>
<li class="nav-header">Project Documentation</li>
<li><a href="project-info.html" title="Project Information"><span class="icon-chevron-down"></span>Project Information</a>
<ul class="nav nav-list">
<li class="active"><a href="#"><span class="none"></span>About</a></li>
<li><a href="summary.html" title="Summary"><span class="none"></span>Summary</a></li>
<li><a href="dependency-info.html" title="Dependency Information"><span class="none"></span>Dependency Information</a></li>
<li><a href="modules.html" title="Project Modules"><span class="none"></span>Project Modules</a></li>
<li><a href="team.html" title="Team"><span class="none"></span>Team</a></li>
<li><a href="scm.html" title="Source Code Management"><span class="none"></span>Source Code Management</a></li>
<li><a href="issue-management.html" title="Issue Management"><span class="none"></span>Issue Management</a></li>
<li><a href="mailing-lists.html" title="Mailing Lists"><span class="none"></span>Mailing Lists</a></li>
<li><a href="dependency-management.html" title="Dependency Management"><span class="none"></span>Dependency Management</a></li>
<li><a href="dependency-convergence.html" title="Dependency Convergence"><span class="none"></span>Dependency Convergence</a></li>
<li><a href="ci-management.html" title="CI Management"><span class="none"></span>CI Management</a></li>
<li><a href="plugin-management.html" title="Plugin Management"><span class="none"></span>Plugin Management</a></li>
<li><a href="plugins.html" title="Plugins"><span class="none"></span>Plugins</a></li>
<li><a href="distribution-management.html" title="Distribution Management"><span class="none"></span>Distribution Management</a></li>
</ul>
</li>
<li><a href="project-reports.html" title="Project Reports"><span class="icon-chevron-right"></span>Project Reports</a></li>
<li class="nav-header">Maven Projects</li>
<li class="active"><a href="#"><span class="none"></span>Archetype</a></li>
<li><a href="../resolver/index.html" title="Artifact Resolver"><span class="none"></span>Artifact Resolver</a></li>
<li><a href="../doxia/index.html" title="Doxia"><span class="none"></span>Doxia</a></li>
<li><a href="../jxr/index.html" title="JXR"><span class="none"></span>JXR</a></li>
<li><a href="../ref/current" title="Maven"><span class="none"></span>Maven</a></li>
<li><a href="../pom/index.html" title="Parent POMs"><span class="none"></span>Parent POMs</a></li>
<li><a href="../plugins/index.html" title="Plugins"><span class="none"></span>Plugins</a></li>
<li><a href="../plugin-testing/index.html" title="Plugin Testing"><span class="none"></span>Plugin Testing</a></li>
<li><a href="../plugin-tools/index.html" title="Plugin Tools"><span class="none"></span>Plugin Tools</a></li>
<li><a href="../apache-resource-bundles/index.html" title="Resource Bundles"><span class="none"></span>Resource Bundles</a></li>
<li><a href="../scm/index.html" title="SCM"><span class="none"></span>SCM</a></li>
<li><a href="../shared/index.html" title="Shared Components"><span class="none"></span>Shared Components</a></li>
<li><a href="../skins/index.html" title="Skins"><span class="none"></span>Skins</a></li>
<li><a href="../surefire/index.html" title="Surefire"><span class="none"></span>Surefire</a></li>
<li><a href="../wagon/index.html" title="Wagon"><span class="none"></span>Wagon</a></li>
<li class="nav-header">ASF</li>
<li><a href="https://www.apache.org/foundation/how-it-works.html" class="externalLink" title="How Apache Works"><span class="none"></span>How Apache Works</a></li>
<li><a href="https://www.apache.org/foundation/" class="externalLink" title="Foundation"><span class="none"></span>Foundation</a></li>
<li><a href="https://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsoring Apache"><span class="none"></span>Sponsoring Apache</a></li>
<li><a href="https://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a></li>
</ul>
<form id="search-form" action="https://www.google.com/search" method="get" >
<input value="https://maven.apache.org/archetype" name="sitesearch" type="hidden"/>
<input class="search-query" name="q" id="query" type="text" />
</form>
<script type="text/javascript">asyncJs( 'https://cse.google.com/brand?form=search-form' )</script>
<hr />
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div id="twitter">
<a href="https://twitter.com/ASFMavenProject" class="twitter-follow-button" data-show-count="false" data-align="left" data-size="medium" data-show-screen-name="true" data-lang="en">Follow ASFMavenProject</a>
<script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
<div class="clear"></div>
<div class="clear"></div>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
</div>
</div>
</div>
<div id="bodyColumn" class="span10" >
<div class="section">
<h2><a name="Maven_Archetype"></a>Maven Archetype</h2>
<div class="section">
<h3><a name="What_is_Archetype.3F"></a>What is Archetype?</h3>
<p>In short, Archetype is a Maven project templating toolkit. An archetype is defined as <i>an original pattern or model from which all other things of the same kind are made</i>. The names fits as we are trying to provide a system that provides a consistent means of generating Maven projects. Archetype will help authors create Maven project templates for users, and provides users with the means to generate parameterized versions of those project templates.</p>
<p>Using archetypes provides a great way to enable developers quickly in a way consistent with best practices employed by your project or organization. Within the Maven project we use archetypes to try and get our users up and running as quickly as possible by providing a sample project that demonstrates many of the features of Maven while introducing new users to the best practices employed by Maven. In a matter of seconds a new user can have a working Maven project to use as a jumping board for investigating more of the features in Maven. We have also tried to make the Archetype mechanism additive and by that we mean allowing portions of a project to be captured in an archetype so that pieces or aspects of a project can be added to existing projects. A good example of this is the Maven site archetype. If, for example, you have used the quick start archetype to generate a working project you can then quickly create a site for that project by using the site archetype within that existing project. You can do anything like this with archetypes.</p>
<p>You may want to standardize J2EE development within your organization so you may want to provide archetypes for EJBs, or WARs, or for your web services. Once these archetypes are created and deployed in your organization's repository they are available for use by all developers within your organization.</p></div>
<div class="section">
<h3><a name="Using_an_Archetype"></a>Using an Archetype</h3>
<p>To create a new project based on an Archetype, you need to call <tt>mvn archetype:generate</tt> goal, like the following:</p>
<div class="source"><pre class="prettyprint linenums">mvn archetype:generate</pre></div>
<p>Please refer to <a class="externalLink" href="http://maven.apache.org/plugins/maven-archetype-plugin/usage.html">Archetype Plugin Page</a> for more details.</p></div>
<div class="section">
<h3><a name="Content"></a>Content</h3>
<p>Maven Archetype is composed of several modules:</p>
<table border="1" class="table table-striped">
<tr class="a">
<th align="left">Module</th>
<th align="left">Description</th></tr>
<tr class="b">
<td align="left"><b><a href="./maven-archetype-plugin/">maven-archetype-plugin</a></b></td>
<td align="left">Archetype Plugin to use archetypes with Maven,</td></tr>
<tr class="a">
<td align="left"><a href="./archetype-packaging/">archetype-packaging</a></td>
<td align="left">Archetype lifecycle and packaging definition,</td></tr>
<tr class="b">
<td align="left"><a href="./archetype-models/">archetype-models</a></td>
<td align="left">Descriptors classes and reference documentation,</td></tr>
<tr class="a">
<td align="left"><a href="./archetype-common/">archetype-common</a></td>
<td align="left">Core classes,</td></tr>
<tr class="b">
<td align="left"><a href="./archetype-testing/">archetype-testing</a></td>
<td align="left">Components used internally to test Maven Archetype,</td></tr></table>
<p>Some archetypes are also provided by Maven: see <a href="/archetypes/">Maven Archetype Bundles</a>.</p></div></div>
</div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p>Copyright &copy;2007&#x2013;2021
<a href="https://www.apache.org/">The Apache Software Foundation</a>.
All rights reserved.</p>
</div>
</div>
</footer>
</body>
</html>