Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Available Sample Applications

Children Display
alltrue

Installing as Prebuilt Plugins

General Instructions

Maven Generated Site for viewing javadoc or source xref

There is a maven generated site for samples which can be used to view javadoc and source. It can be found here:

Geronimo Samples 2.1.2

To navigate to javadoc and source code (xref) for each sample do the following:

  1. select "Geronimo Samples :: Samples" under Modules in the left-hand navigation
  2. select a specific sample from the left-hand navigation under Modules
  3. to view javadoc or source (xref) you must navigate down to a module that includes source such as a war or ejb. For example, if you are interested in viewing the servlets associated with the bank sample you would choose the following modules:
    1. under Modules select "Geronimo Samples :: bank"
    2. under Modules select "Geronimo Samples :: bank :: WAR"
  4. once you are at a module that contains source you can then select "Project Reports" and from the information provided choose either JavaDocs or Source Xref

Obtaining and building

The first time building samples it is required that you build from the top level directory. After the initial build, you can do subsequent builds of specific samples as necessary.

You need svn and maven installed on your system.

Note

Maven v 2.0.9 or later is required for building Geronimo 2.1 samples.

To check out the 2.1.2 samples:

...


svn co https://svn.apache.org/repos/asf/geronimo/samples/tags/samples-parent-2.1.2/ gsamples-2.1.2
Note

Alternatively, you could choose to work with the active 2.1 branch of samples. This will allow you to work with the latest changes in samples but will also expose you to a branch that is under active development and so things may be in flux from day to day:
svn co https://svn.apache.org/repos/asf/geronimo/samples/branches/2.1Image Removed gsamples-2.1

Depending on when you look you may find earlier or released versions of the samples under samples/branches and samples/tags. You can browse in any web browser to see what's there. The trunk for samples always contains samples for the highest level version under development https://svn.apache.org/repos/asf/geronimo/samples/trunkImage Removed

Build using

...


mvn clean install
Note

If you run into the "Could not scan module for TLD files...Filename too long" problem when using Windows platform, please check out samples to a short directory (14 characters or less).

There are minimal integration tests to assure that the sample plugins can be installed on the framework server. To run this tests use

...


mvn clean install -Pit
Note

The integration tests are not available prior to Geronimo Samples 2.2

...

The recommended practice for Geronimo is to set up a workflow using geronimo plugins and maven from development through test and production. To demonstrate this, the samples are built into plugins suitable for the jetty and tomcat web containers in geronimo. Many samples require database access. This is encapsulated into a separate plugin (sample-datasource).

...

For installation you need a geronimo server with a web container installed, such as the geronimo-jetty-minimal or geronimo-jetty6-javaee5 servers (or the equivalent tomcat variations).

Installing through the admin console.

If you are using one of the javaee5 server assemblies you can use the admin console to install the plugins. Go to the plugins page, push the "Show Plugins" button, find the sample(s) you want to install, and click install. Be sure to select only plugins for the web container you have installed (e.g. jetty plugins for the jetty web container). Any necessary dependencies such as the sample-datasource plugin will be installed automatically. There are equivalent command line functions (described next under Installing through gshell) if you are using one of the minimal assemblies that does not include the admin console.

Installing through gshell

For this you can use any geronimo server such as one of the minimal assemblies or even the framework assembly. After starting geronimo, run ./bin/gsh deploy/list-plugins in another terminal window and follow the instructions. Installing a sample plugin will install the sample-datasource plugin and all other dependencies. Alternatively if you build using

...

Note

-Pit is currently only available in the samples trunk (2.2-SNAPSHOT) and not branches/2.1 (2.1.3-SNAPSHOT) or tags/samples-parent-2.1.2 (2.1.2)

Deploying samples as javaee artifacts.

Building from Source

Downloading the Source Code

The first time building samples it is required that you build from the top level directory. After the initial build, you can do subsequent builds of specific samples as necessary.

You need svn and maven installed on your system.

Note

Maven v 2.0.9 or later is required for building Geronimo 2.1 samples.

To check out the 2.1.2 samples:

Code Block
xml
xml

svn co https://svn.apache.org/repos/asf/geronimo/samples/tags/samples-parent-2.1.2/ gsamples-2.1.2
Note

Alternatively, you could choose to work with the active 2.1 branch of samples. This will allow you to work with the latest changes in samples but will also expose you to a branch that is under active development and so things may be in flux from day to day:
svn co https://svn.apache.org/repos/asf/geronimo/samples/branches/2.1Image Added gsamples-2.1

Depending on when you look you may find earlier or released versions of the samples under samples/branches and samples/tags. You can browse in any web browser to see what's there. The trunk for samples always contains samples for the highest level version under development https://svn.apache.org/repos/asf/geronimo/samples/trunkImage Added

Building the Samples

Build using

Code Block
xml
xml

mvn clean install
Note

If you run into the "Could not scan module for TLD files...Filename too long" problem when using Windows platform, please check out samples to a short directory (14 characters or less).

There are minimal integration tests to assure that the sample plugins can be installed on the framework server. To run this tests use

Code Block
xml
xml

mvn clean install -Pit
Note

The integration tests are not available prior to Geronimo Samples 2.2

Deploying the Built Samples as Java EE Artifacts

With the sample datasource installed as a plugin

...

  1. Remove the DBInitializationGBean from the sample plan
  2. In the console DB Manager page, use the Create DB function to create a database named SampleDatabase.
  3. In the console DB Manager page select the SampleDatabase in Use DB, paste the script found in the sql file located in the project (ear or war) that builds the top level javaee artifact into the text box, and run it.
  4. Deploy and run the application using the modified plan.

Maven Generated Site for viewing javadoc or source xref

There is a maven generated site for samples which can be used to view javadoc and source.

...

It can be found here:

Geronimo Samples 2.1.2

To navigate to javadoc and source code (xref) for each sample do the following:

  1. select "Geronimo Samples :: Samples" under Modules in the left-hand navigation
  2. select a specific sample from the left-hand navigation under Modules
  3. to view javadoc or source (xref) you must navigate down to a module that includes source such as a war or ejb. For example, if you are interested in viewing the servlets associated with the bank sample you would choose the following modules:
    1. under Modules select "Geronimo Samples :: bank"
    2. under Modules select "Geronimo Samples :: bank :: WAR"
  4. once you are at a module that contains source you can then select "Project Reports" and from the information provided choose either JavaDocs or Source Xref.

Sample applications available

...