Hyrax - OLFS Build Instructions

From OPeNDAP Documentation
Revision as of 22:52, 26 April 2013 by Ndp (talk | contribs) (From Subversion)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How to build the OLFS from either a source code distribution, or directly from our Subversion repository.

1 Dependencies

1.1 Java 5 Enterprise Edition (J2EE)

Minimum: Java 1.5

Recommended: Java 1.5.0 or newer.

This software was developed and tested against the 1.5.0_06-112 JVM on OS-X.

1.2 Apache Tomcat

Minimum: 5.5

Recommended: 6.x

The servlets were developed and tested using Jakarta/Tomcat 6.0.14. In particular, the code was linked against the servlet.jar bundled with this particular version of Tomcat.

1.3 ANT

Minimum: 1.6.5

Recommended: 1.6 or higher

This software now builds entirely with ANT. If you haven't already got ANT, then go get it: You need it. There is a build file in the top level directory, olfs/build.xml which relies on a couple of build files located in the olfs/buildfiles directory. The serious developer will want to read and understand all of the build related files.

Compiling the source: This should be straight forward. Just go to the top level directory and type "ant compile". For more detailed instructions you should read the master build file, olfs/build.xml

1.4 Additional Libraries

The core software depends on several third part libraries. All of these are included with the distribution, and these (should) be the ones that the code was compiled against for development and testing purposes. It is possibly (in fact likely) that newer versions of these libraries are available from the various development teams that create these products. Replace them at your own risk.

2 Getting The Source Code

2.1 As A Source Code Distribution

The most recent source code distribution will available at both the Hyrax download page and the OLFS download page. If you are attempting to build the OLFS in conjunction with the BES - for example you are building Hyrax - then get both the source distributions from the same Hyrax release on the Hyrax download page, other wise you may experience compatibility issues.

Got get the source code bundle. It will be a file named something like olfs-x.x.x-src.jar

Unpack the bundle using the command:

jar -xvf olfs.x.x.x-src.jar

This will unpack the source code distribution into a directory called olf.x.x.x-src

2.2 From Subversion

svn co https://scm.opendap.org/svn/trunk/olfs

3 Building the code

Building the OLFS software should be very simple.

  1. Make sure you have installed the current J2EE and ANT (see above)

  2. Enter the top level directory of the OLFS source code tree (olfs if you got the source code from Subversion, olfs-.x.x.x-src if you got it from a distribution bundle.)

  3. Run the command:

    ant compile

    This will compile all of the distributed software, but nothing more. For more detailed information you should read (and try to understand) the ANT build file, build.xml and the related files in the buildfiles directory. For those of you using an IDE you will have to follow your own "path" to get this going.

  4. To perform an end to end compile that builds the webb application and bundles it in a .war file, run the command:

    ant server

    Find the file olfs/build/dist/opendap.war, that's the thing you want!

4 Installing the OLFS from a source code build

  1. Copy the file olfs/build/dist/opendap.war tp $CATALINA_HOME/webapps
  2. (Re)start Tomcat.
  3. Done!