HomeDocumentation > Sample applications > Creating a new sample

To facilitate the creation of sample applications for Geronimo in a more consistent way we use mvn archetype to first create a sample template. mvn is part of the apache maven project. Downloading and configuring maven is prerequisite for creating your own sample. As maven needs a fully functional internet link, take care of its proxy configuration which you can set in maven_home/conf/setting.xml

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

  1. Download the samples-pom.zip  file into a directory. We will call it samples-project.. Extract the zip file to here.

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

    mvn -Pcreate -DsampleName=mySample -DsampleVersion=myVersionNumber


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

    You now add/delete child mvn modules under samples/mySample to suit your requirement.

     

  3. To build this sample, go to the samples/mySample  directory and run the following commands.

    Your sample binary will be called samples/mySample/mySample-ear-myVersion.ear. There will be a samples/mySample/docs directory containing the javadocs and source xref for your samples.

  4. This sample binary can now be deployed to a running Geronimo server.

  5. Create/modify the wiki page for your sample at http://cwiki.apache.org/GMOxDOC20/sample-applications.html.

  6. Save the complete html of that page in the samples/mySample/docs/wiki directory.

  7. Go to mySample directory and run mvn clean. Then zip the mySample directory. The zip now contains the samples source, the javadocs, source xref and the wiki page doc.

  8. Attach this zip to your sample's wiki page.