対話形式でプロジェクトの雛形を作成する方法の覚書
プロジェクトを作成するには次のコマンドを実行します。
mvn archetype:generate
生成したいarchetypeの番号を入力します。
Choose a number: (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41) 15: :
選択できるarchetypeは以下のように41種類準備されているようです。
1 | appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF) | |
---|---|---|
2 | appfuse-basic-spring (AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC) | |
3 | appfuse-basic-struts (AppFuse archetype for creating a web application with Hibernate, Spring and Struts 2) | |
4 | appfuse-basic-tapestry (AppFuse archetype for creating a web application with Hibernate, Spring and Tapestry 4) | |
5 | appfuse-core (AppFuse archetype for creating a jar application with Hibernate and Spring and XFire) | |
6 | appfuse-modular-jsf (AppFuse archetype for creating a modular application with Hibernate, Spring and JSF) | |
7 | appfuse-modular-spring (AppFuse archetype for creating a modular application with Hibernate, Spring and Spring MVC) | |
8 | appfuse-modular-struts (AppFuse archetype for creating a modular application with Hibernate, Spring and Struts 2) | |
9 | appfuse-modular-tapestry (AppFuse archetype for creating a modular application with Hibernate, Spring and Tapestry 4) | |
10 | maven-archetype-j2ee-simple (A simple J2EE Java application) | |
11 | maven-archetype-marmalade-mojo (A Maven plugin development project using marmalade) | |
12 | maven-archetype-mojo (A Maven Java plugin development project) | |
13 | maven-archetype-portlet (A simple portlet application) | |
14 | maven-archetype-profiles () | |
15 | maven-archetype-quickstart () | |
16 | maven-archetype-site-simple (A simple site generation project) | |
17 | maven-archetype-site (A more complex site project) | |
18 | maven-archetype-webapp (A simple Java web application) | |
19 | jini-service-archetype (Archetype for Jini service project creation) | |
20 | softeu-archetype-seam (JSF+Facelets+Seam Archetype) | |
21 | softeu-archetype-seam-simple (JSF+Facelets+Seam (no persistence) Archetype) | |
22 | softeu-archetype-jsf (JSF+Facelets Archetype) | |
23 | jpa-maven-archetype (JPA application) | |
24 | spring-osgi-bundle-archetype (Spring-OSGi archetype) | |
25 | confluence-plugin-archetype (Atlassian Confluence plugin archetype) | |
26 | jira-plugin-archetype (Atlassian JIRA plugin archetype) | |
27 | maven-archetype-har (Hibernate Archive) | |
28 | maven-archetype-sar (JBoss Service Archive) | |
29 | wicket-archetype-quickstart (A simple Apache Wicket project) | |
30 | scala-archetype-simple (A simple scala project) | |
31 | lift-archetype-blank (A blank/empty liftweb project) | |
32 | lift-archetype-basic (The basic (liftweb) project) | |
33 | cocoon-22-archetype-block-plain (http://cocoon.apache.org/2.2/maven-plugins/) | |
34 | cocoon-22-archetype-block (http://cocoon.apache.org/2.2/maven-plugins/) | |
35 | cocoon-22-archetype-webapp (http://cocoon.apache.org/2.2/maven-plugins/) | |
36 | myfaces-archetype-helloworld (A simple archetype using MyFaces) | |
37 | myfaces-archetype-helloworld-facelets (A simple archetype using MyFaces and facelets) | |
38 | myfaces-archetype-trinidad (A simple archetype using Myfaces and Trinidad) | |
39 | myfaces-archetype-jsfcomponents (A simple archetype for create custom JSF components using MyFaces) | |
40 | gmaven-archetype-basic (Groovy basic archetype) | |
41 | gmaven-archetype-mojo (Groovy mojo archetype) |
groupIdを指定します。
ここにはプロジェクトのルートパッケージ名を指定します。
Define value for groupId: : com.example
artifactIdを指定します。
ここにはプロジェクト名を入力します。
Define value for artifactId: : app
バージョンを指定します。
Define value for version: 1.0-SNAPSHOT: :
パッケージを指定します。
Define value for package: com.example: :
以上でプロジェクトの雛形が作成されます。