Date: 2004-04-28T15:27:25
Editor: 208.42.65.236 <>
Wiki: Apache Geronimo Wiki
Page: Building
URL: http://wiki.apache.org/geronimo/Building
no comment
New Page:
This page exists to collect details of problems (and their solutions) in
building or running a fresh copy of Geronimo. This is an add-on to the geronimo
distribution file README.txt. The intention is that it will be the first port
of call when such issues arise, and that developers will update it as
problems/solutions are found. Hopefully it will become less necessary as
Geronimo nears a formal release process ;-)
First start with :
* the default build process available in the Geronimo distribution file
README.txt
* a list of KnownWorkingConfigurations
'''Contents'''
[[TableOfContents]]
----
= For the impatient ... =
Assuming you have Maven 1.0-RC1 (note that the build doesn't complete with
Maven 1.0-rc2) installed.
{{{
$ cvs -qz3 -d:pserver:[EMAIL PROTECTED]:/home/cvspublic co incubator-geronimo
$ cd incubator-geronimo
$ cvs -qz3 update -dP
$ maven
$ java -jar target/bin/server.jar org/apache/geronimo/Server
}}}
Run server with the debug console web application
{{{
$ java -jar target/bin/server.jar org/apache/geronimo/DebugConsole
}}}
Connect to the debug console:
[http://localhost:8080/debug-tool/]
You should check back here occasionally as things may well change.
----
= New To Maven? =
You don't build this project with Ant (directly), you build it with Maven.
Maven manages downloading all the external dependencies for you, as well as
handling the large number of modules to build and then creating one
consolidated Geronimo build based on that.
To start with, download maven from http://maven.apache.org/ then install it and
put its bin directory on your path (or put a script to run it on your path or
whatever).
Now to build (and test) Geronimo, go to the geronimo directory you checked out
of CVS and run `maven` (you must be online at the time, so Maven can download
all the dependencies of Geronimo).
There are a variety of parameters and options you can pass to maven to affect
how it builds. Some are listed in the topics below. If you run `maven -g` you
will get a huge list of options, separated into categories. To use one, run
"maven category:command", so to run the "compile" command in the "java"
category, you'd run `maven java:compile` (and you can also add multiple
commands to the command line).
If you have common options you always want to pass to maven, you can put them
in a file called `build.properties` either in the directory you run maven from
(to affect only that project) or your home directory (to affect everything you
run maven for). See
http://maven.apache.org/reference/user-guide.html#Behavioural%20Properties and
http://maven.apache.org/apidocs/constant-values.html for some common property
names.
For further reference on the available commands it may be a good idea to change
into a subdirectory of incubator-geronimo/modules and have a look at the
respective maven.xml files.
----
= Building the full server =
Simply type `maven` in the root of the Geronimo source tree. Once the build
successfully completes, the assembled server will be available in the target
directory.
= Building Offline =
If you're not online (so Maven fails to download), use the -o flag to maven
(i.e. run `maven -o`).
= Build Just One Module =
cd to the directory holding the module (i.e. modules/core) and run `maven` from
there.
Alternately, set the "modules" system property to the name of the directory
under "modules" or "specs" that you want to affect. For example, {{{maven
-Dmodules=core}}} (for modules/core) or `maven -Dmodules=j2ee-deployment` (for
specs/j2ee-deployment)
= Compile Only =
Try `maven java:compile test:compile` or some variation thereof.
= Cleaning your workspace =
To clean your workspace, type `maven clean`.
= Testing Build =
Start the server with the debug console:
{{{
$ cd target
$ java -jar bin/server.jar org/apache/geronimo/DebugConsole
}}}
Connect to the debug console:
[http://localhost:8080/debug-tool/]
To stop the server use ctrl-C or an equivalent; a proper shutdown command will
be made available when the deployment includes the remoting framework.
You can also start the server using "maven run:server" or "maven debug:server",
but startup using maven disables the ctrl-C proper shutdown.
= Bypassing Tests =
If you don't want to run test at all, try adding `-Dmaven.test.skip=true` to
your maven command line.
If you want to run all the tests but not stop if there's a failure, try adding
`-Dmaven.test.failure.ignore=true` to your maven command line.
= Problems? =
If having problems building Geronimo, make sure it isn't simply because your
Maven repository has become 'corrupted' or out of sync:
Delete (or temporarily rename) the .maven directory in your home directory and
try building Geronimo again.
(Under UNIX this is typically in /home/yourusername whilst under Windows this
is typically in C:\Documents and Settings\yourusername)
Running the command `maven site` seems to take up a lot of memory. If you get
an out of memory error, try setting MAVEN_OPTS=-Xmx512m.
= Remoting Tests Hang =
Make sure the host name of your machine (myworkstation.mydomain.com or
whatever) is resolvable in DNS. Worst case, add it to the 127.0.0.1 line in
`/etc/hosts` or `c:\windows\system32\drivers\etc\hosts`
If you use a windows system,try upgrading the JDK to the latest version. There
are few bugs in older versions of JDK 1.4, which causes the infinite wait while
a server is being closed.