type=page
status=published
title=Java EE Maven Archetypes in the Tutorial
next=usingexamples009.html
prev=usingexamples006.html
~~~~~~
= Java EE Maven Archetypes in the Tutorial


[[CIHBHEFF]]

[[java-ee-maven-archetypes-in-the-tutorial]]
Java EE Maven Archetypes in the Tutorial
----------------------------------------

Some of the chapters have instructions on how to build an example
application using Maven archetypes. Archetypes are templates for
generating a particular Maven project. The Tutorial includes several
Maven archetypes for generating Java EE projects.

[[CHDJGCCA]]

[[installing-the-tutorial-archetypes]]
Installing the Tutorial Archetypes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You must install the included Maven archetypes into your local Maven
repository before you can create new projects based on the archetypes.
You can install the archetypes using NetBeans IDE or Maven.

[[sthref16]]

[[installing-the-tutorial-archetypes-using-netbeans-ide]]
Installing the Tutorial Archetypes Using NetBeans IDE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.  From the *File* menu, choose *Open Project*.
2.  In the Open Project dialog box, navigate to:
+
[source,oac_no_warn]
----
tut-install/examples
----
3.  Select the `archetypes` folder.
4.  Click *Open Project*.
5.  In the *Projects* tab, right-click the `archetypes` project and select
*Build*.

[[sthref17]]

[[installing-the-tutorial-archetypes-using-maven]]
Installing the Tutorial Archetypes Using Maven
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.  In a terminal window, go to:
+
[source,oac_no_warn]
----
tut-install/examples/archetypes/
----
2.  Enter the following command:
+
[source,oac_no_warn]
----
mvn install
----
