Don’t do what you don’t need to do

Today I was thinking about creating a Java Wep App with Spring, JPA & Hibernate integrated from scratch. I’m already working with maven for a while so I thought I might want to check the archetype plugin if there are any standard project types that could help me setup the initial project structure. And what do you know, it has a huge selection of “quickstart” projects!

This is what I’ve done – run the command line:
mvn archetype:generate -DartifactId=webapp-quickstart

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: remote -> docbkx-quickstart-archetype (null)
2: remote -> multi (null)
3: remote -> simple (null)
4: remote -> apparat-archetype-asm (null)
5: remote -> apparat-archetype-tdsi (null)
6: remote -> gquery-archetype (null)
7: remote -> gquery-plugin-archetype (null)
8: remote -> jdbc-proc-archetype (Creates simple project with jdbc-proc support)
9: remote -> liferay-layouttpl-archetype (Provides an archetype to create Liferay layout templates.)
10: remote -> liferay-portlet-archetype (Provides an archetype to create Liferay portlets.)
11: remote -> liferay-theme-archetype (Provides an archetype to create Liferay themes.)
12: remote -> rdfbean-tapestry-quickstart (null)
13: remote -> rdfbean-tapestry-quickstart (null)
14: remote -> j2me-simple (Maven 2 Archetype for midlet application using j2me-maven-plugin)
15: remote -> vaadin-archetype-addon (null)
16: remote -> vaadin-archetype-clean (null)
17: remote -> vaadin-archetype-sample (null)
18: remote -> vaadin-archetype-widget (null)
19: remote -> android-quickstart (null)
20: remote -> android-release (null)
21: remote -> android-with-test (null)
22: remote -> chameria-quickstart-archetype (null)
23: remote -> javascript-jqueryplugin (null)
24: remote -> javascript-quickstart (null)
25: remote -> jbosscc-seam-archetype (Maven Archetype to generate a Seam Application)
26: remote -> rails-maven-archetype (null)
27: remote -> maven-archetype-flex (An archetype which contains a sample Maven Flex project using the israfil maven plugin)
28: remote -> javate-zk-archetype (null)
29: remote -> web-quickstart (null)
30: remote -> data-app (To make creating a new Databinder application easier, this archetype includes all required sources and resources.)
31: remote -> data-app (To make creating a new Databinder application easier, this archetype includes all required sources and resources.)
32: remote -> gae-archetype-gwt (null)
33: remote -> gae-archetype-jsf (null)
34: remote -> gae-archetype-jsp (null)
35: remote -> gae-archetype-objectify-jsp (null)
36: remote -> gae-archetype-wicket (null)
37: remote -> lift-archetype-basic (Basic project archetype for Lift Web Framework (with database, logging, user management).)
38: remote -> lift-archetype-basic_2.7.7 (Basic project archetype for Lift Web Framework (with database, logging, user management).)
39: remote -> lift-archetype-basic_2.8.0 (Basic project archetype for Lift Web Framework (with database, logging, user management).)
40: remote -> lift-archetype-basic_2.8.1 (null)
41: remote -> lift-archetype-blank (Blank project archetype for Lift Web Framework.)
42: remote -> lift-archetype-blank_2.7.7 (Blank project archetype for Lift Web Framework.)
43: remote -> lift-archetype-blank_2.8.0 (Blank project archetype for Lift Web Framework.)
44: remote -> lift-archetype-blank_2.8.1 (null)
45: remote -> lift-archetype-hellolift (Archetype - hellolift, a sample Lift application)
46: remote -> lift-archetype-jpa-basic (Basic JPA archetype for Lift Web Framework.)
47: remote -> lift-archetype-jpa-basic_2.7.7 (Basic JPA archetype for Lift Web Framework.)
48: remote -> lift-archetype-jpa-basic_2.8.0 (Basic JPA archetype for Lift Web Framework.)
49: remote -> lift-archetype-jpa-basic_2.8.1 (null)
50: remote -> lift-archetype-jpa-blank (Blank JPA archetype for Lift Web Framework.)
51: remote -> lift-archetype-jpa-blank-single (Blank JPA archetype for Lift Web Framework (single project).)
52: remote -> lift-archetype-jpa-blank-single_2.7.7 (Blank JPA archetype for Lift Web Framework (single project).)
53: remote -> lift-archetype-jpa-blank-single_2.8.0 (Blank JPA archetype for Lift Web Framework (single project).)
54: remote -> lift-archetype-jpa-blank-single_2.8.1 (null)
55: remote -> lift-archetype-jpa-blank_2.7.7 (Blank JPA archetype for Lift Web Framework.)
56: remote -> lift-archetype-jpa-blank_2.8.0 (Blank JPA archetype for Lift Web Framework.)
57: remote -> lift-archetype-jpa-blank_2.8.1 (null)
58: remote -> lift-archetype-sbt (Basic project archetype for Lift Web Framework (with database, logging, user management) using the sbt build system)
59: remote -> lift-archetype-sbt_2.7.7 (Basic project archetype for Lift Web Framework (with database, logging, user management) using the sbt build system)
60: remote -> lift-archetype-sbt_2.8.0 (Basic project archetype for Lift Web Framework (with database, logging, user management) using the sbt build system)
61: remote -> lift-archetype-sbt_2.8.1 (null)
62: remote -> jlue-archetype-basic (Archetype - basic project for Jlue)
63: remote -> jlue-archetype-blank (Archetype - blank project for Jlue)
64: remote -> maven-archetype-har (null)
65: remote -> maven-archetype-sar (null)
66: remote -> maven-archetype-gwt (An archetype which contains a sample Maven GWT project.)
67: remote -> portletunit-portlet-archetype (An archetype that creates a simple porltet with unit tests.)
68: remote -> ota-tools-schema-archetype (null)
69: remote -> antlr3-maven-archetype (null)
70: remote -> camel-component (null)
71: remote -> camel-router (null)
72: remote -> camel-archetype-activemq (null)
73: remote -> camel-archetype-component (null)
74: remote -> camel-archetype-java (null)
75: remote -> camel-archetype-scala (null)
76: remote -> camel-archetype-spring (null)
77: remote -> camel-archetype-war (null)
78: remote -> camel-archetype-web (null)
79: remote -> camel-archetype-webconsole (null)
80: remote -> cocoon-22-archetype-block (null)
81: remote -> cocoon-22-archetype-block-plain (null)
82: remote -> cocoon-22-archetype-webapp (null)
83: remote -> cocoon-archetype-block (null)
84: remote -> cocoon-archetype-parent (null)
85: remote -> cocoon-archetype-sample (null)
86: remote -> cocoon-archetype-webapp (null)
87: remote -> cxf-http-basic (null)
88: remote -> cxf-jaxws-javafirst (null)
89: remote -> apacheds-schema-archetype (null)
90: remote -> apacheds-testcase-archetype (null)
91: remote -> maven-ipojo-plugin (Maven Plugin to package iPOJO-powered bundles.)
92: remote -> geronimo-archetype-testsuite (Plugin to help create a testsuite)
93: remote -> geronimo-assembly-archetype (null)
94: remote -> geronimo-plugin-archetype (null)
95: remote -> geronimo-archetype-testsuite (Plugin to help create a testsuite)
96: remote -> geronimo-samples-archetype (Plugin to help create a samples project)
97: remote -> archetypes-command (null)
98: remote -> maven-archetype-archetype (An archetype which contains a sample archetype.)
99: remote -> maven-archetype-j2ee-simple (An archetype which contains a simplifed sample J2EE application.)
100: remote -> maven-archetype-marmalade-mojo (null)
101: remote -> maven-archetype-mojo (An archetype which contains a sample a sample Maven plugin.)
102: remote -> maven-archetype-plugin (An archetype which contains a sample Maven plugin.)
103: remote -> maven-archetype-plugin-site (An archetype which contains a sample Maven plugin site. This archetype can be layered upon an
    existing Maven plugin project.)
104: remote -> maven-archetype-portlet (An archetype which contains a sample JSR-268 Portlet.)
105: remote -> maven-archetype-profiles (null)
106: remote -> maven-archetype-quickstart (An archetype which contains a sample Maven project.)
107: remote -> maven-archetype-site (An archetype which contains a sample Maven site which demonstrates some of the supported document types like
    APT, XDoc, and FML and demonstrates how to i18n your site. This archetype can be layered
    upon an existing Maven project.)
108: remote -> maven-archetype-site-simple (An archetype which contains a sample Maven site.)
109: remote -> maven-archetype-webapp (An archetype which contains a sample Maven Webapp project.)
110: remote -> myfaces-archetype-helloworld (Archetype to create a new webapp based on myfaces)
111: remote -> myfaces-archetype-helloworld-facelets (Archetype to create a new webapp based on MyFaces and Facelets)
112: remote -> myfaces-archetype-helloworld-portlets (Archetype to create a new portlet webapp based on myfaces)
113: remote -> myfaces-archetype-helloworld20 (Archetype to create a new webapp based on MyFaces 2.0)
114: remote -> myfaces-archetype-helloworld20-owb (Archetype to create a new webapp based on MyFaces 2.0 with OpenWebBeans)
115: remote -> myfaces-archetype-jsfcomponents (Archetype to create a libary project of JSF components)
116: remote -> myfaces-archetype-trinidad (Archetype to create a new webapp based on Trinidad)
117: remote -> myfaces-archetype-trinidad20 (Archetype to create a new webapp based on Trinidad and JSF 2.0)
118: remote -> myfaces-archetype-trinidad (Archetype to ease the burden of creating a new application based with Trinidad)
119: remote -> application-archetype (Jetspeed-2 Maven2 Archetype used to generate portal application templates.)
120: remote -> component-archetype (Jetspeed-2 Maven2 Archetype used to generate component templates to
        be used by other components and applications.)
121: remote -> jetspeed-archetype (Jetspeed 2 Maven Archetype)
122: remote -> portal-archetype (Jetspeed-2 Maven2 Archetype used to generate portal instances.)
123: remote -> portal-component-archetype (Jetspeed-2 Maven2 Archetype used to generate component templates to
        be injected/installed as a library in the portal application itself.)
124: remote -> shared-component-archetype (Jetspeed-2 Maven2 Archetype used to generate component templates to
        be installed as a shared library for all portlet/web applications.)
125: remote -> servicemix-bean-service-unit (null)
126: remote -> servicemix-binding-component (null)
127: remote -> servicemix-camel-osgi-bundle (null)
128: remote -> servicemix-camel-service-unit (null)
129: remote -> servicemix-cxf-bc-service-unit (null)
130: remote -> servicemix-cxf-code-first-osgi-bundle (null)
131: remote -> servicemix-cxf-se-service-unit (null)
132: remote -> servicemix-cxf-se-wsdl-first-service-unit (null)
133: remote -> servicemix-cxf-wsdl-first-osgi-bundle (null)
134: remote -> servicemix-drools-service-unit (null)
135: remote -> servicemix-eip-service-unit (null)
136: remote -> servicemix-embedded-simple (null)
137: remote -> servicemix-exec-service-unit (null)
138: remote -> servicemix-file-poller-service-unit (null)
139: remote -> servicemix-file-sender-service-unit (null)
140: remote -> servicemix-file-service-unit (null)
141: remote -> servicemix-ftp-poller-service-unit (null)
142: remote -> servicemix-ftp-sender-service-unit (null)
143: remote -> servicemix-ftp-service-unit (null)
144: remote -> servicemix-http-consumer-service-unit (null)
145: remote -> servicemix-http-provider-service-unit (null)
146: remote -> servicemix-http-service-unit (null)
147: remote -> servicemix-jms-consumer-service-unit (null)
148: remote -> servicemix-jms-provider-service-unit (null)
149: remote -> servicemix-jms-service-unit (null)
150: remote -> servicemix-jsr181-annotated-service-unit (null)
151: remote -> servicemix-jsr181-service-unit (null)
152: remote -> servicemix-jsr181-wsdl-first-service-unit (null)
153: remote -> servicemix-lwcontainer-service-unit (null)
154: remote -> servicemix-mail-service-unit (null)
155: remote -> servicemix-ode-service-unit (null)
156: remote -> servicemix-osgi-bundle (null)
157: remote -> servicemix-osworkflow-service-unit (null)
158: remote -> servicemix-project-root (null)
159: remote -> servicemix-quartz-service-unit (null)
160: remote -> servicemix-saxon-service-unit (null)
161: remote -> servicemix-saxon-xquery-service-unit (null)
162: remote -> servicemix-saxon-xslt-service-unit (null)
163: remote -> servicemix-script-service-unit (null)
164: remote -> servicemix-scripting-service-unit (null)
165: remote -> servicemix-service-assembly (null)
166: remote -> servicemix-service-engine (null)
167: remote -> servicemix-service-unit (null)
168: remote -> servicemix-shared-library (null)
169: remote -> servicemix-smpp-service-unit (null)
170: remote -> servicemix-snmp-service-unit (null)
171: remote -> servicemix-validation-service-unit (null)
172: remote -> servicemix-vfs-service-unit (null)
173: remote -> servicemix-xmpp-service-unit (null)
174: remote -> sling-initial-content-archetype (Maven archetype for initial content)
175: remote -> sling-servlet-archetype (Maven archetype for Sling Servlets)
176: remote -> struts2-archetype-blank (null)
177: remote -> struts2-archetype-convention (null)
178: remote -> struts2-archetype-dbportlet (null)
179: remote -> struts2-archetype-plugin (null)
180: remote -> struts2-archetype-portlet (null)
181: remote -> struts2-archetype-starter (null)
182: remote -> synapse-package-archetype (null)
183: remote -> quickstart (Archetype for creating a basic Tapestry 5 application.)
184: remote -> tapestry-archetype (null)
185: remote -> tapestry-simple (Archetype for creating a basic Tapestry 5 application, including Eclipse control files.)
186: remote -> tuscany-binding-archetype (null)
187: remote -> tuscany-contribution-jar (null)
188: remote -> tuscany-contribution-zip (null)
189: remote -> tuscany-quickstart (null)
190: remote -> tuscany-quickstart-bpel (null)
191: remote -> tuscany-quickstart-jsf (null)
192: remote -> tuscany-quickstart-jsonp (null)
193: remote -> tuscany-quickstart-stripes (null)
194: remote -> wicket-archetype-quickstart (null)
195: remote -> appfuse-basic-jsf (Maven 2 archetype that creates a web application with AppFuse embedded in it.)
196: remote -> appfuse-basic-spring (Maven 2 archetype that creates a web application with AppFuse embedded in it.)
197: remote -> appfuse-basic-struts (Maven 2 archetype that creates a web application with AppFuse embedded in it.)
198: remote -> appfuse-basic-tapestry (Maven 2 archetype that creates a web application with AppFuse embedded in it.)
199: remote -> appfuse-core (Maven 2 archetype that creates a backend (Managers, DAOs and Web Services)
        application with AppFuse embedded in it.)
200: remote -> appfuse-modular-jsf (Maven 2 archetype that creates a modular web application with AppFuse. This archetype creates two modules:
        "core" and "web". The core module depends on appfuse-service, while the web module depends on core as well
        as AppFuse's JSF implementation.)
201: remote -> appfuse-modular-spring (Maven 2 archetype that creates a modular web application with AppFuse. This archetype creates two modules:
        "core" and "web". The core module depends on appfuse-service, while the web module depends on core as well
        as AppFuse's Spring MVC implementation.)
202: remote -> appfuse-modular-struts (Maven 2 archetype that creates a modular web application with AppFuse. This archetype creates two modules:
        "core" and "web". The core module depends on appfuse-service, while the web module depends on core as well
        as AppFuse's Struts implementation.)
203: remote -> appfuse-modular-tapestry (Maven 2 archetype that creates a modular web application with AppFuse. This archetype creates two modules:
        "core" and "web". The core module depends on appfuse-service, while the web module depends on core as well
        as AppFuse's Tapestry implementation.)
204: remote -> appfuse-basic-jsf (Maven 2 archetype that creates a web application with AppFuse embedded in it.)
205: remote -> appfuse-basic-jsf-archetype (null)
206: remote -> appfuse-basic-spring (Maven 2 archetype that creates a web application with AppFuse embedded in it.)
207: remote -> appfuse-basic-spring-archetype (null)
208: remote -> appfuse-basic-struts (Maven 2 archetype that creates a web application with AppFuse embedded in it.)
209: remote -> appfuse-basic-struts-archetype (null)
210: remote -> appfuse-basic-tapestry (Maven 2 archetype that creates a web application with AppFuse embedded in it.)
211: remote -> appfuse-basic-tapestry-archetype (null)
212: remote -> appfuse-core (Maven 2 archetype that creates a backend (Managers, DAOs and Web Services)
        application with AppFuse embedded in it.)
213: remote -> appfuse-core-archetype (null)
214: remote -> appfuse-light-jsf-archetype (null)
215: remote -> appfuse-light-spring-archetype (null)
216: remote -> appfuse-light-spring-freemarker-archetype (null)
217: remote -> appfuse-light-spring-security-archetype (null)
218: remote -> appfuse-light-stripes-archetype (null)
219: remote -> appfuse-light-struts-archetype (null)
220: remote -> appfuse-light-tapestry-archetype (null)
221: remote -> appfuse-light-wicket-archetype (null)
222: remote -> appfuse-modular-jsf (Maven 2 archetype that creates a modular web application with AppFuse. This archetype creates two modules:
        "core" and "web". The core module depends on appfuse-service, while the web module depends on core as well
        as AppFuse's JSF implementation.)
223: remote -> appfuse-modular-jsf-archetype (null)
224: remote -> appfuse-modular-spring (Maven 2 archetype that creates a modular web application with AppFuse. This archetype creates two modules:
        "core" and "web". The core module depends on appfuse-service, while the web module depends on core as well
        as AppFuse's Spring MVC implementation.)
225: remote -> appfuse-modular-spring-archetype (null)
226: remote -> appfuse-modular-struts (Maven 2 archetype that creates a modular web application with AppFuse. This archetype creates two modules:
        "core" and "web". The core module depends on appfuse-service, while the web module depends on core as well
        as AppFuse's Struts implementation.)
227: remote -> appfuse-modular-struts-archetype (null)
228: remote -> appfuse-modular-tapestry (Maven 2 archetype that creates a modular web application with AppFuse. This archetype creates two modules:
        "core" and "web". The core module depends on appfuse-service, while the web module depends on core as well
        as AppFuse's Tapestry implementation.)
229: remote -> appfuse-modular-tapestry-archetype (null)
230: remote -> appfuse-ws-archetype (null)
231: remote -> drools4-integration-helper-archetype (Support of the archetype for the Maven plugin)
232: remote -> drools5-integration-helper-archetype (This is an Maven 2 Archetype to support creation of a ready to
                use Maven 2 project with Drools support. This archetype contains
                examples of code based on interface, classes and pre/post
                condition. JUnit 4 examples are also included.)
233: remote -> cargo-archetype-webapp-functional-tests-module (null)
234: remote -> cargo-archetype-webapp-single-module (null)
235: remote -> codegen-testcase (null)
236: remote -> cpa-testcase (null)
237: remote -> enunciate-simple-archetype (null)
238: remote -> gmaven-archetype-basic (null)
239: remote -> gmaven-archetype-mojo (null)
240: remote -> gmaven-archetype-basic (null)
241: remote -> gmaven-archetype-mojo (null)
242: remote -> maven-archetype-nbm (Archetype for Netbeans Modules Maven setup)
243: remote -> gwt-maven-plugin (Maven plugin for the Google Web Toolkit.)
244: remote -> latex-maven-archetype (null)
245: remote -> xmlbeans-maven-plugin (Runs the xmlbeans parser/code generator against schemas in files and dependent jars.)
246: remote -> appframework (Archetype for creating application based on JSR 296)
247: remote -> ear-j2ee14 (null)
248: remote -> ear-javaee6 (null)
249: remote -> ear-jee5 (null)
250: remote -> ejb-j2ee13 (null)
251: remote -> ejb-j2ee14 (null)
252: remote -> ejb-javaee6 (null)
253: remote -> ejb-jee5 (null)
254: remote -> nbm-archetype (null)
255: remote -> nbm-osgi-archetype (Archetype for development of NetBeans modules that can depend on OSGi bundles.)
256: remote -> nbm-suite-root (null)
257: remote -> netbeans-platform-app-archetype (null)
258: remote -> osgi-archetype (null)
259: remote -> pom-root (Root project archetype for creating multi module projects)
260: remote -> webapp-j2ee13 (null)
261: remote -> webapp-j2ee14 (null)
262: remote -> webapp-javaee6 (null)
263: remote -> webapp-jee5 (null)
264: remote -> groovy-maven-archetype (An archetype for creating Maven modules/projects using the Groovy language.)
265: remote -> groovy-mojo-archetype (An archetype for writing Maven 2 plugins in the Groovy language.)
266: remote -> org.openxma.dsl.sample-archetype (null)
267: remote -> sonar-basic-plugin-archetype (null)
268: remote -> sonar-gwt-plugin-archetype (null)
269: remote -> cometd-archetype-dojo-jetty6 (null)
270: remote -> cometd-archetype-dojo-jetty7 (null)
271: remote -> cometd-archetype-jquery-jetty6 (null)
272: remote -> cometd-archetype-jquery-jetty7 (null)
273: remote -> cometd-archetype-spring-dojo-jetty7 (null)
274: remote -> cometd-archetype-spring-jquery-jetty7 (null)
275: remote -> coos-plugin-actor (null)
276: remote -> coos-plugin-api (null)
277: remote -> coos-plugin-noapi (null)
278: remote -> jee6-basic-archetype (null)
279: remote -> jee6-minimal-archetype (null)
280: remote -> jee6-sandbox-archetype (null)
281: remote -> jee6-sandbox-demo-archetype (null)
282: remote -> jee6-servlet-basic-archetype (null)
283: remote -> jee6-servlet-demo-archetype (null)
284: remote -> jee6-servlet-minimal-archetype (null)
285: remote -> jee6-servlet-sandbox-archetype (null)
286: remote -> spring-jsf-jpa-archetype (null)
287: remote -> spring-mvc-jpa-archetype (null)
288: remote -> spring-mvc-jpa-demo-archetype (null)
289: remote -> scalate-archetype-empty (An archetype which creates an empty Scalate web application)
290: remote -> scalate-archetype-guice (null)
291: remote -> scalate-archetype-jersey (null)
292: remote -> scalate-archetype-sitegen (null)
293: remote -> geomajas-gwt-archetype (null)
294: remote -> geoserver-archetype-wfsoutputformat (null)
295: remote -> grails-maven-archetype (null)
296: remote -> graniteds-spring-jpa-hibernate (null)
297: remote -> graniteds-tide-cdi-jpa (null)
298: remote -> graniteds-tide-seam-jpa-hibernate (null)
299: remote -> graniteds-tide-spring-jpa-hibernate (null)
300: remote -> imixs-workflow-jee-archetype (Imixs Workflow JEE Archetype provides a JEE Sample Application)
301: remote -> jbehave-groovy-archetype (null)
302: remote -> jbehave-simple-archetype (null)
303: remote -> jbehave-spring-archetype (null)
304: remote -> jboss-javaee6-webapp (null)
305: remote -> jboss-jsf-weld-servlet-webapp (null)
306: remote -> weld-jsf-jee (Weld archetype for creating a Java EE 6 application using JSF 2.0, CDI 1.0, EJB 3.1 and JPA 2.0 (persistence unit included))
307: remote -> weld-jsf-jee-minimal (Weld archetype for creating a minimal Java EE 6 application using JSF 2.0, CDI 1.0 and EJB 3.1 (persistence unit not included))
308: remote -> weld-jsf-servlet-minimal (Weld archetype for creating an application using JSF 2.0 and CDI 1.0 for Servlet Containers (Tomcat 6 / Jetty 6))
309: remote -> jbundle-util-webapp-cgi-archetype (null)
310: remote -> jbundle-util-webapp-files-archetype (null)
311: remote -> jbundle-util-webapp-proxy-archetype (null)
312: remote -> jbundle-util-webapp-redirect-archetype (null)
313: remote -> jbundle-util-webapp-upload-archetype (null)
314: remote -> jbundle-util-webapp-webdav-archetype (null)
315: remote -> jbundle-util-webapp-website-archetype (null)
316: remote -> jbundle-util-webapp-webstart-archetype (null)
317: remote -> jclouds-compute-service-archetype (null)
318: remote -> jclouds-rest-client-archetype (null)
319: remote -> jibx-ota-osgi-archetype (null)
320: remote -> opentravel-archetype (null)
321: remote -> jini-service-archetype (Archetype for Jini service project creation)
322: remote -> maven-hpi-plugin (Maven2 plugin for developing Hudson plugins)
323: remote -> makumba-archetype (Archetype for a makumba web-application)
324: remote -> ibean-archetype (An archetype for creating an empty ibean maven project)
325: remote -> ibean-archetype (null)
326: remote -> mule-catalog-archetype (null)
327: remote -> mule-cloud-connector-archetype (null)
328: remote -> mule-example-archetype (An archetype for creating a Mule example application.)
329: remote -> mule-module-archetype (An architype for creating a Mule Module. It provides options for adding certain mule features and configuring the
    module for Muleforge.)
330: remote -> mule-project-archetype (An architype for creating Mule applications.)
331: remote -> mule-transport-archetype (Archetype for Mule 2.0 and above transport projects.)
332: remote -> multiverse-project-archetype (Skeleton for a project using Multiverse)
333: remote -> application-archetype (null)
334: remote -> remoting-support (null)
335: remote -> application (null)
336: remote -> hibernate-support (null)
337: remote -> html-war (null)
338: remote -> htmlviewer-war (null)
339: remote -> application (null)
340: remote -> icons (null)
341: remote -> maven-archetype-cecilia-app (This archetype is useful to quick start Cecilia applications,
                having a source tree template already filled.)
342: remote -> maven-archetype-cecilia-application (This archetype is useful to quick start Cecilia applications, having a
                source tree template already filled.)
343: remote -> maven-archetype-cecilia-library (This archetype is useful to quick start Cecilia components library
                projects, having a source tree template already filled.)
344: remote -> maven-archetype-petals-jbi-binding-component (>This project is Maven 2 archetype associated to a JBI binding component project.)
345: remote -> maven-archetype-petals-jbi-service-assembly (This project is Maven 2 archetype associated to a JBI service assembly project.)
346: remote -> maven-archetype-petals-jbi-service-engine (This project is Maven 2 archetype associated to a JBI service engine project.)
347: remote -> maven-archetype-petals-jbi-service-unit (This project is Maven 2 archetype associated to a JBI service unit project.)
348: remote -> admin-archetype (null)
349: remote -> coweb-archetype (null)
350: remote -> openengsb-tooling-archetypes-connector (null)
351: remote -> openengsb-tooling-archetypes-domain (Archetype to produce new Domain project)
352: remote -> org.openengsb.tooling.archetypes.clientproject.root (null)
353: remote -> openl-simple-project (null)
354: remote -> maven-archetype-osgi-bundle (null)
355: remote -> maven-archetype-osgi-project (null)
356: remote -> maven-archetype-osgi-service (null)
357: remote -> maven-archetype-osgi-wrapper (null)
358: remote -> maven-archetype-spring-bean (null)
359: remote -> maven-archetype-paxexam-junit ()
360: remote -> kerneos-module-archetype (null)
361: remote -> kerneos-war-archetype (null)
362: remote -> camel-archetype-simple-route (null)
363: remote -> maven-archetype-petals-jbi-binding-component (This project is Maven 2 archetype associated to a JBI binding component project.)
364: remote -> maven-archetype-petals-jbi-service-assembly (This project is Maven 2 archetype associated to a JBI service assembly project.)
365: remote -> maven-archetype-petals-jbi-service-engine (This project is Maven 2 archetype associated to a JBI service engine project.)
366: remote -> maven-archetype-petals-jbi-service-unit (This project is Maven 2 archetype associated to a JBI service unit project.)
367: remote -> maven-archetype-petals-jbi-shared-library (This project is Maven 2 archetype associated to a JBI Shared Library project.)
368: remote -> parallelj-archetype (null)
369: remote -> parancoe-pluginarchetype (null)
370: remote -> parancoe-webarchetype (null)
371: remote -> pustefix-archetype-application (null)
372: remote -> pustefix-archetype-basic (null)
373: remote -> pustefix-archetype-module (null)
374: remote -> liftweb-archetype-blank (Archetype - blank project for liwftweb)
375: remote -> liftweb-archetype-hellolift (Archetype - hellolift sample liwftweb application)
376: remote -> scala-archetype-simple (The maven-scala-plugin is used for compiling/testing/running/documenting scala code in maven.)
377: remote -> slf4j-archetype (The slf4j Archetype)
378: remote -> flexmojos-archetypes-application (null)
379: remote -> flexmojos-archetypes-library (null)
380: remote -> flexmojos-archetypes-modular-webapp (null)
381: remote -> nexus-plugin-archetype (null)
382: remote -> spring-osgi-bundle-archetype (Spring OSGi Maven2 Archetype)
383: remote -> spring-ws-archetype (Spring Web Services Maven2 Archetype.)
384: remote -> syncope-archetype (null)
385: remote -> trails-archetype (null)
386: remote -> trails-secure-archetype (null)
387: remote -> tynamo-archetype (null)
388: remote -> wicket-scala-archetype (null)
389: remote -> wikbook.archetype (null)
390: remote -> circumflex-archetype (null)
391: remote -> javg-minimal-archetype (null)
Choose a number: 106: 286
Define value for property 'groupId': : com.project
[INFO] Using property: artifactId = webapp-quickstart
Define value for property 'version': 1.0-SNAPSHOT:
Define value for property 'package': com.project: com.project
Confirm properties configuration:
groupId: com.project
artifactId: webapp-quickstart
version: 1.0-SNAPSHOT
package: com.project
Y:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35 seconds
[INFO] Finished at: Mon May 09 16:21:09 MST 2011
[INFO] Final Memory: 20M/178M
[INFO] ------------------------------------------------------------------------

Within the list of projects I’ve found the 286: remote -> spring-jsf-jpa-archetype (null) which seemed to be the right thing. After setting the right parameters I already had a project set up with the following file structure:

webapp-quickstart
├───src
│   ├───main
│   │   ├───java
│   │   │   └───com
│   │   │       └───project
│   │   │           ├───bean
│   │   │           └───model
│   │   ├───resources
│   │   │   └───META-INF
│   │   └───webapp
│   │       ├───META-INF
│   │       ├───resources
│   │       │   └───css
│   │       └───WEB-INF
│   │           ├───spring
│   │           │   └───app
│   │           ├───templates
│   │           └───views
│   └───test
│       ├───java
│       │   └───com
│       │       └───project
│       │           └───bean
│       └───resources

And despite how well the archetypes work – human interaction is not always perfect – I still had to update the pom.xml manually…

First I got the error that the project doesn’t build:

mvn install

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building webapp-quickstart
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
Downloading: http://repository.jboss.org/nexus/content/groups/public-jboss//javax/faces/jsf-api/2.0/jsf-api-2.0.pom
[INFO] Unable to find resource 'javax.faces:jsf-api:pom:2.0' in repository repository.jboss.org (http://repository.jboss.org/nexus/content/groups/public-jboss/)
Downloading: http://maven.springframework.org/milestone/javax/faces/jsf-api/2.0/jsf-api-2.0.pom
[INFO] Unable to find resource 'javax.faces:jsf-api:pom:2.0' in repository org.springframework.maven.milestone (http://maven.springframework.org/milestone)
Downloading: http://repo1.maven.org/maven2/javax/faces/jsf-api/2.0/jsf-api-2.0.pom
[INFO] Unable to find resource 'javax.faces:jsf-api:pom:2.0' in repository central (http://repo1.maven.org/maven2)
Downloading: http://repository.jboss.org/nexus/content/groups/public-jboss//javax/faces/jsf-api/2.0/jsf-api-2.0.jar
[INFO] Unable to find resource 'javax.faces:jsf-api:jar:2.0' in repository repository.jboss.org (http://repository.jboss.org/nexus/content/groups/public-jboss/)
Downloading: http://maven.springframework.org/milestone/javax/faces/jsf-api/2.0/jsf-api-2.0.jar
[INFO] Unable to find resource 'javax.faces:jsf-api:jar:2.0' in repository org.springframework.maven.milestone (http://maven.springframework.org/milestone)
Downloading: http://repo1.maven.org/maven2/javax/faces/jsf-api/2.0/jsf-api-2.0.jar
[INFO] Unable to find resource 'javax.faces:jsf-api:jar:2.0' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) javax.faces:jsf-api:jar:2.0

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=javax.faces -DartifactId=jsf-api -Dversion=2.0 -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there:
      mvn deploy:deploy-file -DgroupId=javax.faces -DartifactId=jsf-api -Dversion=2.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
        1) com.project:webapp-quickstart:war:1.0-SNAPSHOT
        2) javax.faces:jsf-api:jar:2.0

----------
1 required artifact is missing.

for artifact:
  com.project:webapp-quickstart:war:1.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  repository.jboss.org (http://repository.jboss.org/nexus/content/groups/public-jboss/),
  org.springframework.maven.milestone (http://maven.springframework.org/milestone)



[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Mon May 09 20:31:42 MST 2011
[INFO] Final Memory: 26M/178M
[INFO] ------------------------------------------------------------------------

This means that the jsf-api-2.0.jar does not exist in any of specified maven repositories, and is not in my local, either.

To fix this I had to add a maven repository for the jsf-api. First I had to find it, so I first double checked the global maven repository and apparently the latest version uploaded there was 1.2_02, so I had to find another place keeping the file – as I don’t like to manually deploy files to my own repo. So I googled for “jsf-api-2.0.jar” and the first link was to a repo containing this file – http://download.java.net/maven/2/javax/faces/jsf-api/2.0/. Now it’s time to update the pom.xml

In the <repositories> section we need to add a the repository containing the file:

<repository>
	<id>download.java.net</id>
	<name>Java Download Repository</name>
	<url>http://download.java.net/maven/2</url>
	<snapshots>
		<enabled>false</enabled>
	</snapshots>
</repository>

So now I ran mvn install again and it ran just fine!

Now I’ll just run mvn jetty:run and we have a running app with Spring, Hibernate & JPA already set up for you!

I’ll get into details of those files in the next posts, so keep updated.

Blog started!

I’ve just installed my “real” WordPress and hopefully will find some time to write 😉

Basically I just want to share my knowledge with other people in the open source world so if you have any questions or suggestions – feel free to ask and I’d be glad to answer or write an article if I can.