Prerequisites
- J2SE SDK 1.4.2
- Apache Maven (2.0.4+)
- Ant (1.6.5+) - Used only to bootstrap
- Subversion (1.2+)
Unless otherwise mentioned, You must use J2SE 1.4.x... NOT 1.5. The build should fail early if you are using the wrong JDK.
Checkout Geronimo
svn co https://svn.apache.org/repos/asf/geronimo/server/trunk server
Windows Tip
Windows users are strongly encouraged to checkout Geronimo into c:\g
.
Using a longer path may cause the build (and Geronimo itself) to behave very strangely when it hits the 260 char limit for filenames on Windows.
Preparing to building for the first time
If you are building for the first time, a little patience is required. The specs have recently been changed and now require Java 1.5 to compile them. The remainder of Geronimo should still be compiled with Java 1.4 (OpenEJB still requires it). Because of this, you will need to follow the step-by-step instructions in order to do the build.
External Dependencies
You will need Ant installed and available in the search path of your shell. You will also need the Subversion svn
client installed and on your path.
Chances are you will need to increase the heap size for Maven. Add the following lines to ~/.mavenrc
:
# Increase the heap and max permission size for Maven MAVEN_OPTS=-Xmx512m
If you are using the SUN JDK, you may also need to increase the maximum permanent size as well as the heap:
# Increase the heap and max permanent size for Maven MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=128m
Windows Tip
Windows users should create mavenrc_pre.bat
under c:\documents and settings\<username>\mavenrc_pre.bat
or c:\mavenrc_pre.bat
depending on how the %HOME%
property is set on your system.
Variables will need to use the batch set syntax:
set <VARIABLE>=<VALUE>
Bootstrapping Step-By-Step
You can run the steps one by one (skipping steps as desired once you are familiar with the build):
bootstrap clean
bootstrap specs
bootstrap modules
bootstrap openejb2
bootstrap assemble
for bootstrap specs
you need Java 1.5.
Distribution binaries
The binaries for distribution can be found in the *.zip
and *.tar.gz
formats in following places
server/assembles/geronimo-jetty-j2ee/target
server/assembles/geronimo-tomcat-j2ee/target
server/assembles/geronimo-jetty-minimal/target
server/assembles/geronimo-tomcat-minimal/target
Testing the assembly
To test an assembly, unpack and startup, as in:
gunzip -c assemblies/geronimo-jetty-j2ee/target/geronimo-jetty-j2ee*-bin.tar.gz | tar xf - ./geronimo-jetty-j2ee*/bin/startup.sh
And then shutdown:
./geronimo-jetty-j2ee*/bin/shutdown.sh
Or, use the geronimo-maven-plugin
to start the server:
mvn -Ptools geronimo:start
Windows Tip
Windows users may need to specify an alternative installDirectory
to avoid long path problems:
mvn -Ptools geronimo:start -DinstallDirectory=c:\g
And to stop, either CTRL-C
or from a separate terminal:
mvn -Ptools geronimo:stop
In order to run with the simple geronimo
prefix, you need to add a pluginGroup for org.apache.geronimo.plugins
to your ~/.m2/settings.xml
:
<?xml version="1.0"?> <settings> <pluginGroups> <pluginGroup>org.apache.geronimo.plugins</pluginGroup> </pluginGroups> </settings>
Windows Tip
Windows users will find ~/.m2/
under c:\documents and settings\<username>\.m2
.
If you don't want to add this to your local settings you can still enable the tools
profile, which will register the prefixes.
Other Useful commands
To prepare Geronimo for IDEA:
mvn idea:idea
To prepare Geronimo for Eclipse, i.e to create .classpath and .project files
mvn eclipse:eclipse
What is Genesis?
Please see Genesis Overview for more information about Genesis.