jeudi sept. 18, 2008

Building GlassFish v2 from source

Why build from source? First, because as with any open source projects, if there's a bug \*you\* can fix it. Second because you can get money for that. Finally, because even with GlassFish v3 Prelude around the corner, GlassFish v2 is still going to be in production for a long period at many customer sites.

v3 is very easy to build using the latest and greatest svn and mvn while building GlassFish v2 from source still requires CVS, maven 1.0.2 (1.1 doesn't work) and Java 5 (no Java 6). All this is detailed on this wiki page. The following is a stripped down version of the process for GlassFish v2ur2 (tagged SJSAS91_UR2_BRANCH).
Update: the tag for v2.1, released in January 2009 is SJSAS-9_1_1-B60E-23_Dec_2008.
Update: the tag for v2.1.1, released in october 2009 is SJSAS-2_1_1-B31G-19_Oct_2009.

First, make sure you have Java 5 as de default version by setting JAVA_HOME appropriately. Also set MAVEN_HOME to use 1.0.2 and MAVEN_OPTS to "-Xmx1024m". Finally, have $HOME/build.properties configured (or pass those as -D maven options):
glassfish.os.name=<OS Name: Possible values : WINNT | SunOS | Linux | SunOS_X86 | Darwin>
glassfish.cvs.username=<java.net_id>

The first step is the CVS checkout of the bootstrap (first magic string is the branch tag):
% cvs -d :pserver:username-AT-cvs.dev.java-DOT-net:/cvs login
% cvs co -r SJSAS91_UR2_BRANCH glassfish/bootstrap
% cd glassfish/bootstrap

This should complete in a matter of seconds.

The second step combines the full checkout and build process (second magic string is the correct set of maven goals)
% maven bootstrap checkout build build-jarinstaller

Checking out the entire source tree takes 15 minutes (modulo your bandwidth of course). The rest of the process takes another 15 minutes on my fairly recent laptop (and compiles around 10k classes in the process). The resulting installer jar can then be found in the ./publish directory:
% ls ./publish/\*.jar
glassfish-installer.jar

The -Dmodules= flag helps you checkout or build a specific set of modules. This and a lot more is documented on the wiki. Julien discussed building v3 a few weeks back. Whatever the version, remember we like bug reports and patches even more! :)

About

This blog has moved

Alexis Moussine-Pouchkine's Weblog

GlassFish - Stay Connected

Search

Archives
« avril 2014
lun.mar.mer.jeu.ven.sam.dim.
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today
Blogroll

No bookmarks in folder

News

No bookmarks in folder