This documents how to build the Apache Geronimo Server project in command line.
This guide is intended to cover how to build Geronimo 3.0 from the latest
server/branches/3.0. Refer to Building Apache Geronimo in the Development documents for more information on building Geronimo, including this and other branches.
It is recommended that a dedicated computer used to build Geronimo 3.0 have a minimum of 2GB of real memory. The computer will also need a connection to the Internet to download artifact dependencies.
Java Developer Kit (JDK)
You will need a JDK 6.0+ (Java SE 1.6.0+) or compatible JDK to build Apache Geronimo. It is recommended you use SUN's implementation, or something compatible like Apples implementation. Other JDK vendors implementations may work, but use at your own risk.
Apache Maven 2
To execute the build process you need to have Apache Maven version
2.2.1 (or newer) installed.
To check if your installation is working and you have the required minimum version run:
And it should produce something like:
If you have an incompatible version the server build will probably fail with a message complaining
To fetch the source code for the server, you will need to have a Subversion client version 1.5 (or newer, 1.5 is recommended) installed.
You can also use Git mirrors to checkout Geronimo source code, and make sure you have a Git client installed before using the following command:
Preparing to Build for the First Time
Chances are you will need to increase the heap size for Maven. Add the following lines to
If you are using the SUN JDK (or a JDK with compatible flags, like the Apple JDK), you should also increase the maximum permanent size as well as the heap:
To build all changes incrementally:
To perform clean builds, which are sometimes needed after some changes to the source tree:
In some cases you may need to build Geronimo in stages, such as when building OpenEJB from source to pick up local changes. Most users will not need to do this, but its documented here for clarity.
To build modules, configs and maven-plugins:
To build plugins, configs, plugingroups and assemblies:
As mentioned, most users will not need to build Geronimo in stages. But in some cases, when bootstrapping new versions (when no artifacts are deployed into remote repositories for the current version), then you must build the stages separately for the first build and then for all builds afterwards, the staged build is not necessary.
Testing the Assembly
Once you have build the server fully, which will produce a number of
tar.gz archives from the assembly modules, you can use the
geronimo-maven-plugin to start the server. From the project root directory run:
And to stop, either
CTRL-C or from a separate terminal, from the project root directory run:
The server project does not have any IDE files checked in, they are all generated by Maven plugins. Once you have checked out the server tree and built it once, you can generate the project configuration files for your IDE.
For the basic IDEA configuration:
To generate a configuration which includes dependency sources and javadocs:
Troubleshooting and Tips
- Use -DskipTests=true to turn off tests during server build.
- Use -o to avoid searching remote repository.
- Use -X to produce maven debug information.
- Build all Geronimo dependencies to avoid out-of-date code among projects such as openEJB, JSF and so on.