The Source for Java Technology Collaboration




Building the Portal Project

This page documents the instructions for building the portal server source code from the Subversion trunk.

Building

A full build of the project requires about 2.5GB of disk space for the source code, the downloaded dependencies, and the build output.

The build is supported on:

  • Solaris 5.9+ (x86/amd and sparc)
  • Linux (RedHat? 4)
  • Windows (2003, XP, Vista)

The following tools, in addition to what comes with the host operating system, are needed to build the Portal Server software:

  • Subversion client SVNKit (aka JavaSVN?) is a good choice)
  • Java Development Kit 1.5, specifically 1.5.0_09 or later. Note: 1.6 does not work at this time.
  • Apache Ant, version 1.6.5 or later. ant 1.7.0 is known to work.
  • C/C++ compiler
  • For Windows, the Cygwin environment, including
    • gmake (called make in cygwin, need symbolic link to gmake)
    • perl
    • sh (called ash in cygwin, need symbolic link to sh)
    • zip and unzip

Windows Build Environment Setup

On Windows, the build must be run from within the cygwin environment. When installing cygwin, you have to select ash, make, perl, zip and unzip; they are not selected by default. After the cygwin installation is complete, create symbolic links from make to gmake and ash to sh in the /bin directory.

To configure the PATH and other environment variable settings for MSVC, JDK, and ant, download the bashrc-win script and run it before you do the build. You'll need to edit the script to put in the values for your install directories.

Build Procedure

1. Check out the code from Subversion:

 
$ svn checkout https://portal.dev.java.net/svn/portal/trunk/portal portal --username you

For subversion use through a proxy, you will need to modify proxy settings in the "global" section at bottom of $HOME/.subversion/servers.

2. Set environment variables ...

  • Make sure Java 1.5.0_09 or later is in your PATH and set JAVA_HOME to the location of the JDK
  • Make sure ant 1.6.5 or later is in your PATH and set ANT_HOME is set
  • If a proxy is required to access java.net:

$ export ANT_OPTS="-Dhttps.proxyHost=cache.somedomain.com -Dhttps.proxyPort=someport -Dhttp.proxyHost=cache.somedomain.com -Dhttp.proxyPort=someport"

  • Make sure the appropriate C compiler is in your PATH. Portal Server requires Sun Studio 11 for Solaris (sparc and x86) and gcc for Linux. Sun users, this is the following for Solaris:

$ export PATH=/usr/dist/share/sunstudio_`uname -p`,v11.0/SUNWspro/bin:$PATH

For a Solaris Express Developer Edition Solaris Express Developer Edition Sun Studio 12 and ant are already installed, thus the following is sufficient:

$ export PATH=/usr/sfw/bin:$PATH

For Windows users, see the script mentioned above for setting up the build environment variables.

  • Make sure the archiver (ar) is in your PATH. On Solaris this in /usr/ccs/bin.

3. Run the build from the "portal" directory:

$ ant package

Building an image (Solaris and Linux only)

The image target requires the location of the JES5 or JES5U1? GA

1. Set the JES_LOCATION environment variable

e.g
$ export JES_LOCATION="/net/samplehost.domain/space/jes5/nightly/Solaris_x86"
or
$ebxport JES_LOCATION="/net/samplehost.domain/export/products/jes5u1/Solaris_sparc"

2. Run 'ant' from top level root dir. The default top-level target is image.

3. Run the installer from "rootdir"/image/build to bring up portal installer. Optional step - Zip up the image/build directory to create a zip image.


Dependencies

OpenPortal? uses Ivy to download build / package time dependencies. The first time you build, it will take some time to populate the dependencies/private-repository directory. Subsequent builds will only validate that you have the most recent copy of the dependency.

An ant clean from the top level will not remove the downloaded dependencies. To remove them, invoke the clean.dependencies target from the top level build, or the clean target from the dependencies module.

Signing

By default, no applet signing will occur in a build (and therefore, the applets will not function). To get JARs (+ applets) signed, copy buildutil/sign.properties.sample to buildutil/sign.properties . Edit the the file appropriately, and build.

You must either have a certificate loaded into your keystore, or create a phony one first.

Offline Builds

If you are offline, but you'd previously built the dependencies module, you can pass ant the offline property. This will keep it from checking for updated Ivy JARs, and from validating the private (local) repository built by the dependencies module.

$ ant -Doffline=true

The build will fail if any of the dependencies are missing locally.

64-bit Builds

OpenPortal? contains some C code. To build with 64-bit support, pass ant the sixtyfourbit property:

$ ant -Dsixtyfourbit=true

The build scripts have support for 64-bit only for Solaris SPARC and Solaris x86 platforms. However, the 64-bit dependencies have not been uploaded to the repository. Therefore, when running on 64 bit Solaris, use a 32 bit JVM with 32 bit dependencies.


#1 Otherwise, Cygwin's /usr/bin/link will conflict with MSVC's link.exe

Useful links

MSVC++ 2005 Express Edition

MS Platform SDK

Topic PortalBuildInstructions . { Edit | Ref-By | Printable | Diffs r2 < r1 | More }
 XML java.net RSS

Revision r2 - 20 Oct 2007 - 22:21:20 - Main.tmueller
Parents: WebHome