While it is possible to build each sample separately you may be less likely to run into odd maven problems if you check out and build all the samples at once. This is a small amount of code so should not be a major burden on anyone.
You need svn and maven installed on your system.
To check out the trunk samples:
svn co https://svn.apache.org/repos/asf/geronimo/samples/trunk
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.
mvn clean install
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
Recommended practice for geronimo is to set up a workflow using geronimo plugins and maven from development through test and production. To demonstrate part of this the samples are built into plugins suitable for the jetty and tomcat web containers in geronimo. Many samples require database access and this is encapsulated into a separate plugin.
In any case, to install samples as plugins you need to build them first.
For this you need a geronimo server with a web container installed, such as the geronimo-jetty-minimal or geronimo-jetty6-javaee5 servers. 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 SampleDatabase 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.
For this you can use any geronimo server such as geronimo-framework. 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 database plugin and all other dependencies such as the required web container. Alternatively if you build using mvn clean install
After building the sample projects you can find suitable geronimo plans for a sample <sample> in <sample>/<sample>-jetty/target/resources/META-INF/plan.xml (or the equivalent -tomcat directory). For most samples you will need to install the sample database plugin first. Samples can be deployed from the admin console "deploy new" on a suitable server or using gshell ./bin/gsh deploy/deploy. Note that in this case you need to start with a server with all the required bits already installed, not the framework server. Since this installation method is not tested automatically it is more likely to be broken than the plugin method.