Getting Started Developing Applications

Creating your own application

What we didn’t tell you about the kitchensink quickstart is that it is generated from a Maven archetype. Using this archetype offers you the perfect opportunity to generate your own project.

You can create a project from the archetype using JBoss Developer Studio, or Eclipse with JBoss Tools. First, open up JBoss Central, if it isn’t already open. Hit Cmd-3 (Mac) or Ctrl-3 (Windows, Linux) and type JBoss Central:


You will now be shown JBoss Central, an excellent place to find about all things JBoss!


To create a new project, based on the kitchensink quickstart, click on Create Projects | Java EE Web Project:


JBoss Developer Studio will then check that you have the necessary pre-requisites to create the project. If you are using JBoss Developer Studio, then you should, otherwise, JBoss Tools will help you install the necessary pre-requisites. See JBoss Tools for more information.

Hit Next >. On the next screen you can enter a project name, package for sample code, and finally select a target runtime:


Finally, hit Finish. You’ll be presented with the New Project Example dialog, in which you can simply hit Finish:


You should now have a brand new project:



To use the archetype to generate a new project, you should run:

mvn archetype:generate \
    -DarchetypeArtifactId=jboss-javaee6-webapp-archetype \
    -DarchetypeGroupId=org.jboss.spec.archetypes \
    -DarchetypeVersion=7.1.1.CR2 \

Maven will download the archetype and it’s dependencies, and ask you some questions:

$ > mvn archetype:generate \
        -DarchetypeArtifactId=jboss-javaee6-webapp-archetype \
        -DarchetypeGroupId=org.jboss.spec.archetypes \
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------


Define value for property 'groupId': : com.acme.corp                 <1>
Define value for property 'artifactId': : acme-sales                 <2>
Define value for property 'version':  1.0-SNAPSHOT: :                <3>
Define value for property 'package':  com.acme.corp: :               <4>
[INFO] Using property: name = Java EE 6 webapp project               <5>
Confirm properties configuration:
groupId: com.acme.corp
artifactId: acme-sales
version: 1.0-SNAPSHOT
package: com.acme.corp
name: Java EE 6 webapp project
 Y: :
[WARNING] CP Don't override file /Users/pmuir/tmp/acme-sales/.settings/org.eclipse.jdt.apt.core.prefs
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.774s
[INFO] Finished at: Mon Jun 06 18:53:38 BST 2011
[INFO] Final Memory: 7M/125M
[INFO] ------------------------------------------------------------------------
$ >
  1. Enter the groupId you wish to use

  2. Enter the artifactId you wish to use

  3. Enter the version you wish to use, or just hit Enter if you wish to accept the default 1.0-SNAPSHOT

  4. Enter the java package you wish to use, or just hit Enter if you wish to accept the default (which is copied from groupId ).

  5. Finally, if you are happy with your choices, hit Enter and Maven will generate the project for you.

And that’s it, you now have a brand new project with the same functionality as kitchensink, but customized with your details.


The archetype contains some sample code to get you started. If you would prefer a blank canvas, with only a project skeleton, then use jboss-javaee6-webapp-blank-archetype as your archetype id.

Prefer Enterprise Applications (EARs)?

The archetype generates a WAR project. With Java EE 6, you can include EJBs in your WAR, meaning you won’t need an EAR until you need to divide your code into modules. If you would like to create an EAR based project then use jboss-javaee6-webapp-ear-archetype as your archetype id (or if you want a blank EAR, then jboss-javaee6-webapp-ear-blank-archetype).

Share the Knowledge

Find this guide useful?


Find a bug in the guide? Something missing? You can fix it by [forking the repository](, making the correction and [sending a pull request]( If you're just plain stuck, feel free to ask a question in the [user discussion forum](

Recent Changelog

  • Jan 24, 2013: Compatibility updates for asciidoctor Dan Allen
  • Sep 17, 2012: Fixing jdf-78 Jason Porter
  • Jul 24, 2012: Update archetype guide to recommend using jbds Pete Muir
  • Jul 19, 2012: Add author to the guide Pete Muir
  • Jul 10, 2012: Initial import of getting started developing applications guide Pete Muir

See full history »