Skip to end of metadata
Go to start of metadata

Information on GlassFish Builds

Also See : Continuous Build Info | V2 Full Instructions| V3 Build Instructions

GlassFish Build Quickstart

This page describes how to build GlassFish V2.1.1, currently the "Trunk" (SJSAS91_FCS_BRANCH) is under development phase. To build GlassFish V3, see here.

Prerequisites to building GlassFish

  • The users must have Maven (1.0.2) installed: This will create the local repository needed by Maven to store GlassFish dependencies.
  • The user must have a login on and must have access to the CVS repository for the GlassFish project.
  • The user must login to the GlassFish CVS repository once (so CVS saves the password in the .cvspass file in the user's
    home directory)
  • J2SE 5.0
    (1.5.0_11) must be installed (you can't use Java SE 6), configured as JAVA_HOME env variable and in your binary path. We recommend that you use the latest GlassFish nightly tested version.
  • Setup cvs client per instructions.
  • Research per client instructions.

GlassFish Build Quickstart Guide

Assuming you have Apache Maven 1.0.2 and JDK 5.0 (1.5.0_11) installed and configured as specified in the prerequisites

  • Checkout glassfish/bootstrap module : This is the top-level build module consisting of building all or subset of the modules.
  • Configure Build Variables : Create workspace/glassfish/bootstrap/ or for re-usable GlassFish workspace, one-time process is to create ${HOME}/ (Unix) or %HOMEPATH%\ (Windows) and set following variables.

Following two variables don't need to be configured, this is just for information. Default values are set to:

  • Checkout the sources :
    GlassFish workspace has option to build all the modules or subset of modules. Usually developers want to checkout and build only their required modules, so in such situations checkout out subset of modules make sense. But if you are making major integrations including adding/deleting class/module, new feature etc then, you need to checkout and build all the modules so that intermodule dependencies are verified.
  • To checkout all the GlassFish source modules, do following
  • If you want to checkout subset of modules that you want to develop, use -Dmodules= flag.
  • Build the sources: After you checkout sources using Step 3, developer can select the option of "bootstrap" which downloads the pre-built server and builds only subset of the modules. Other option "bootstrap-all" is to create the server from scratch (this requires to checkout all the modules using "maven checkout"), and build all the modules to verify the intermodule or binary dependencies version change.
  • bootstrap-all option: Building all the modules from the source.
  • *bootstrap option: Build your own module using pre-built server
  • Configure or Install Server :
    This step will configure or install server to use runtime. This will create the asadmin script, run create-domain, etc which are needed to run the GlassFish server.
  • To create single-instance domain similar to GlassFish V1, run following command.
  • To create cluster mode domain of GlassFish V2, run following command:
  • Start the Server:
    All GlassFish server commands are located in the ${glassfish.home}/bin directory.
  • To start the server, run following command.
  • To stop server, run following command.
  • *Clean Build, Uninstall Server: *
    You can use any of the above three goals during your development process. Update the sources using your favorite IDE,
    2000 and use any of the following commands on already built workspace to bring the workspace to its original stage to rebuild and verify your changes.
  • To clean the modules to delete build generated files like .class, .properties and ready to recompile, run
    following command
  • To delete or uninstall the server, that may be corrupted or you want to get new updated server, run following command. This will remove all the scripts and jar files used to run the server. It will remove everything under {{ ${glassfish.home} }} which is
  • To clean the server configured in step 5 above, use command below to clean the server which deletes Administration Server, domain1 and preserves the server back to original installed stage. (Deletes newly generated token replaced
    files in ${glassfish.home}/bin, config directories.)
  • You can use "maven clean-config" if you want to verify your changes related to domain and administration server startup related. "clobber" goal can be used to delete your server to get new server. "clean" can be used to delete build files and ready to compile.
  • Run Quicklook Tests :
    Quicklook Tests are meant to give the developer a way of testing major functionality in the Application Server and of running a sanity check to ensure that nothing major is broken.
  • Checkout the required test failes from glassfish/appserv-tests as below.
  • Set APS_HOME. This is the directory where you checked out the
    workspace including the workspace root name (e.g. /workspace/glassfish/appserv-tests)
  • Set S1AS_HOME. This is installation directory for the GlassFish Server (e.g. /workspace/publish/glassfish)
  • The installation properties are under ${APS_HOME}/ to match your installation (e.g. admin.password, http.port, etc.). If you changed any default values, edit this
  • Make sure the server is NOT running before running the tests, stop the server if its already running.
  • Quicklook: Run the test on Single instance Domain on Domain Admin Server (domain1).

Quicklook for Cluster mode : Run the test on Cluster mode Domain (which is created by using "maven configure-cluster"). This will run test on Remote instance sqe-server, created and managed by nodeagent, sqe-agent that will be automatically created by the following target.

To run both Quicklook types above to verify your changes for all server combinations, use following command (which may take longer sinceits going to run the tests on both, domain1 and sqe-server as above)

  • Open the ${APS_HOME}/test_results.html file in a browser and examine the results.
  • You can find the detailed instructions to run Quicklook tests HERE.

See the complete build instructions for details of how to build GlassFish. For Building from branch, see GlassFish Branch build instructions.

Old URL (read-only):
New Page:

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.

The individuals who post here are part of the extended Oracle community and they might not be employed or in any way formally affiliated with Oracle. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Oracle nor any other party necessarily agrees with them.