HomeApache Geronimo v2.0 > Documentation > Sample applications > Creating a new sample

To facilitate the creation of sample applications for Geronimo in a more consistent way we are providing some sample templates. The samples subproject for Geronimo is located here on SVN. Creating your own sample is very easy.

To create your own sample using this template follow these steps:

  1. Checkout the samples project using the following command. It will create a directory called samples-project for you.

    svn co http://svn.apache.org/repos/asf/geronimo/samples/trunk samples-project

  2. Use Maven to build the existing samples and geronimo-samples-archetype from the samples-project directory. This is a temporary step until the samples gets released and published soon.

    /samples-project/mvn

  3. Change directory to samples-project and create a new sample using the archetype geronimo-samples-archetype with the following command. Substitute mySample in the comand below to the name of your sample.

    mvn archetype:create -DarchetypeGroupId=org.apache.geronimo.samples -DarchetypeArtifactId=geronimo-samples-archetype -DarchetypeVersion=2.0-SNAPSHOT -DartifactId=mySample -Dversion=2.0-SNAPSHOT

Congrats !!! You have successfully created a sample template called mySample

You will have to tweak the pom a little. So do not forget to read the README.txt in the mySample directory.