Build Instructions  for Sailfin

TOC

  What are the prerequisites to build SailFin?
  How to build SailFin without downloading Glassfish from scratch?
  How to build SailFin with Glassfish from scratch?
  How to create Installer jar for SailFin?
  How to checkout the source of individual module?
  How to build the source of individual module?
  How to clean build and uninstall server?
  Is there a list of commands available ?
  FAQs


Pre-requisites

1. The build system and workspace is based on the GlassFish build system and workspace. If you are not familiar with the GlassFish build system and workspace, please refer here
2. Here is a doc that lists the requirements for this project
Note : SailFin currently builds only on JDK 1.5

Back to Top

Building SailFin without checking out and building Glassfish

Checkout the workspace

1. Create a parent folder for the entire workspace. Lets call it $WS .

2. Check out sailfin/bootstrap under $WS :

cvs -d:pserver:<java.net.id>@cvs.dev.java.net:/cvs co sailfin/bootstrap

  NOTE : If you are using ${HOME}/build.properties, edit that file alone. Steps 3 and 4 are not necessary.
       If not you need to edit sailfin/bootstrap/project.properties.

3.  This step is necessary if you are running build behind the proxy.
 Goto the the $WS/sailfin/bootstrap directory. Edit the project.properties in this directory to customize the values of the following properties.

  maven.proxy.host  -  Hostname of the proxy if any
  maven.proxy.port  -   Port No. of the proxy if any

4.   Run the following command (from $WS/sailfin/bootstrap)
  maven setup

This command would create build.properties file in user home direcory (${HOME}/build.properties). Note than an existing build.properties file in ${HOME} would be overwritten by this command.
The contents of the build.properties file is mentioned here

5. Run the following command  (from $WS/sailfin/bootstrap)
   maven bootstrap
This command would checkout sailfin-image and sailfin dependencies which is needed to build sailfin modules and extract them under $WS/publish/glassfish.

6. Run the following command  (from $WS/sailfin/bootstrap)
   maven checkout-sailfin
This command would checkout sailfin modules under sailfin directory.

Building SailFin binaries

7. Run the following command  (from $WS/sailfin/bootstrap)
   maven build-sailfin
This command would build sailfin modules.

Creating a installation of SailFin

8.  In the same directory run the following command :
     maven configure-runtime

This step would create a domain (domain1) with the Sip Servlet functionality provided by SailFin. The instance(s) under this domain are enabled to receive and send SIP traffic and Sip Servlet applications can be deployed on them. This is available under $WS/publish/glassfish.

Note : Before doing this , ensure that the port 4848, 8080, 8181, 7676,8686 , 3700 are free


Back to Top

Building SailFin and GlassFish

Checkout the workspace

1. Create a parent folder for the entire workspace. Lets call it $WS .

2. Check out sailfin/bootstrap under $WS :

cvs -d:pserver:<java.net.id>@cvs.dev.java.net:/cvs co sailfin/bootstrap

NOTE : If you are using ${HOME}/build.properties, edit that file alone. Steps 3 and 4 are not necessary.
       If not you need to edit sailfin/bootstrap/project.properties.

3.  This step is necessary if you are running build behind the proxy.
Goto the the $WS/sailfin/bootstrap directory. Edit the project.properties in this directory to customize the values of the following properties.

  maven.proxy.host  -  Hostname of the proxy if any
  maven.proxy.port  - Port No. of the proxy if any

4.   Run the following command (from $WS/sailfin/bootstrap)
      maven setup

This command would create build.properties file in user home direcory (${HOME}/build.properties). Note than an existing build.properties file in ${HOME} would be overwritten by this command.
The contents of the build.properties file is mentioned here


6. Run the following command  (from $WS/sailfin/bootstrap)
   maven checkout
This command would checkout the modules under sailfin ( sip-stack and ssa-api) and all the GlassFish modules.

After this step the workspace would look like
$WS
     |------ glassfish
           |------- <<< all glassfish module>>
     |------ glassfish_dependencies
     |------ sailfin
           |------- sip-stack
           |------- ssa-api
           |------- bootstrap

7.  Goto the the $WS/sailfin/bootstrap directory

8.  Note that we are still in $WS/sailfin/boostrap . Run the following command :
    maven bootstrap-all
(if there is a problem in downloading any one of the dependencies, please re-run the command)

After this step the workspace would look like

$WS
     |------ glassfish
           |------- <<< all glassfish modules>>
     |------ glassfish_dependencies
     |------ publish
           |------ glassfish
     |------ sailfin
           |------- sip-stack
           |------- ssa-api
           |------- bootstrap


Building SailFin and GlassFish binaries

10.  In the same directory ($WS/sailfin/boostrap) run the following command :
       maven build

This will build all the glassfish modules and the sailfin modules (ssa-api and sip-stack).


Creating a installation of GlassFish with SailFin

11.  In the same directory run the following command :
     maven configure-runtime

This step would create a GlassFish domain (domain1) with the Sip Servlet functionality provided by SailFin. The instance(s) under this domain are enabled to receive and send SIP traffic and Sip Servlet applications can be deployed on them.
This is available under $WS/publish/glassfish.

Note : Before doing this , ensure that the port 4848, 8080, 8181, 7676,8686 , 3700 are free


Back to Top

Creating a installer jar for SailFin

To create SailFin installable jar you have to fllow steps 1 to 10 as mentioned under section 'How to build SailFin with Glassfish from scratch?' or steps 1 to 7 as mentioned under section 'How to build SailFin without downloading Glassfish from scratch?'. You would create a SailFin installable jar by running following command. It normalizes the jar file and packs it again to get maximum jar compression and creates sailfin-image-SNAPSHOT.jar. This is available under $WS/publish.

To create SailFin installable jar, do following
  • % cd sailfin/bootstrap
  • % maven build-jarinstaller
Back to Top

Checkout the sources

SailFin 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 SailFin source modules, do following
  • % cd sailfin/bootstrap
  • % maven checkout

If you want to checkout subset of SailFin modules that you want to develop, use "-Dmodules=" flag.
  • % cd sailfin/bootstrap
  • % maven -Dmodules=sip-stack,ssa-api checkout-sailfin
Back to Top

Build the sources

After you checkout sources using above step, developer can select the 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.
  • % cd sailfin/bootstrap
  • % maven bootstrap-all build

If you want to build subset of SailFin modules that you want to develop, use "-Dmodules=" flag.
  • % cd sailfin/bootstrap
  • % maven -Dmodules=sip-stack,ssa-api build-sailfin
Back to Top

Clean Build, Uninstall Server

You can 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. "clean" can be used to delete build files and ready to compile.
  • % cd sailfin/bootstrap
  • % maven clean

If you want to clean subset of SailFin modules that you want to develop, use "-Dmodules=" flag.
  • % cd sailfin/bootstrap
  • % maven -Dmodules=sip-stack,ssa-api clean-sailfin

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 /workspace/publish/glassfish. "clobber" goal can be used to delete your server to get new server.
  • % cd sailfin/bootstrap
  • % maven clobber

To clean the server configured use below command 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.
  • % cd sailfin/bootstrap
  • % maven clean-config

Frequently asked Questions

1. I work on two modules in Sailfin and nothing else . Do I have to build Sailfin by checking out the entire workspace and building it ?
 Answer : No. You can use the instructions here. Do a checkout of the modules that you need using maven -Dmodules=<module names> checkout-sailfin. Do a maven bootstrap -Dmodules=<module-names> build-sailfin

2.
I work on two modules in Sailfin and one module in GlassFish. Do I have to build Sailfin by checking out the entire workspace and building it ?
Answer : You could checkout only the modules that you need in Sailfin and GlassFish by using maven -Dmodules=<module-names> checkout . After that you could use the maven bootstrap command to get the latest Sailfin image and build the checked out modules by using maven -Dmodules=<module-name> build


Content of the build.properties file

This File contains following properties which is required to build Sailfin
  glassfish.os.name - The name of the Operating where you are running the build (WINNT, SunOS, Linux, SunOS_X86, Darwin)
  glassfish.cvsroot - Your Glassfish cvs root
  sailfin.cvsroot - Your SailFin cvs root
  appserv.cvs.username  - Your appserv cvs usernam
  maven.proxy.host  -  Hostname of the proxy if any
  maven.proxy.port  - Port No. of the proxy if any



List of commands available in the build system ?


Here is a table that lists all the commands available in the build system
Command
Base directory
Function
Comments
maven setup
${ws}/sailfin/bootstrap
To create a ${home}/build.properties with the cvsroot, glassfish.os.name set automactically.
This command should be run in lieu of either creating a ${home}/build.properties manually or editing the sailfin/bootstrap/project.properties OR glassfish/bootstrap/project.properties
maven checkout
${ws}/sailfin/bootstrap Checks out the source code of the entire GlassFish and Sailfin code base from CVS at cvs.dev.java.net
A subset of the modules could be checked by using the -Dmodules=<module-name> command
maven bootstrap
${ws}/sailfin/bootstrap Downloads the latest image of Sailfin an d its dependencies and explodes them in the form of a Sailfin installation
Typically used in conjunction with maven checkout -D and maven build -D
maven bootstrap-all
${ws}/sailfin/bootstrap Downloads the dependencies for Sailfin ( GlassFish)

maven checkout-sailfin
${ws}/sailfin/bootstrap Checks out the modules in  sailfin

maven build
${ws}/sailfin/bootstrap Builds the entire workspace
Use of -D <module-name> is used to build select modules alone
maven build-sailfin
${ws}/sailfin/bootstrap Builds all the modules in Sailfin

maven clean
${ws}/sailfin/bootstrap To clean the modules to delete build generated files like .class, .properties and ready to recompile, run following command. "clean" can be used to delete build files and ready to compile.
maven clean-config
${ws}/sailfin/bootstrap To clean the server configured use below command 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.
maven clobber
${ws}/sailfin/bootstrap 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 /workspace/publish/glassfish. "clobber" goal can be used to delete your server to get new server.


Back to Top

Terms of Use; Privacy Policy; Copyright ©2013-2016 (revision 20160708.bf2ac18)
 
 
Close
loading
Please Confirm
Close