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:
- Download the samples-pom.zip file into a directory. We will call it samples-project.. Extract the zip file to here.
- Change directory to samples-project/samples and create a new sample using the following command. Substitute
mySamplein the comand below to the name of your sample.
mvn -Pcreate -DsampleName=mySample -DsampleVersion=myVersionNumber
Congrats !!! You have successfully created a sample template called
- 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.
- This sample binary can now be deployed to a running Geronimo server.
- Create/modify the wiki page for your sample at http://cwiki.apache.org/GMOxDOC20/sample-applications.html.
- Save the complete html of that page in the samples/mySample/docs/wiki directory.
- 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.
- Attach this zip to your sample's wiki page.