My favorites | Sign in
Logo
                
Search
for
Updated Jul 17, 2009 by larsga
HowToBuild  
Describes how to build the source code.

Introduction

This document explains how to set up a minimal build environment so that you can compile the Ontopia source code and build the .jar files, tests, web applications, and complete distributions. For the time being it only covers .jar files and tests.

Prerequisites

To be able to build the Ontopia source code you must have the following installed:

- Java 1.5 (specifically 1.5, and not Java 1.6, as the 1.6 JDBC APIs are incompatible with those in 1.5)
- Apache Ant 1.6 (or later)
- Apache Ivy 2.0 (or later)

Installing Java

  1. Download and install the distribution from the Java site.
  2. Make sure that you have set the JAVA_HOME environment variable.
  3. Make sure that you include $JAVA_HOME/bin in the PATH environment variable.

Installing Apache Ant

  1. Download and unzip the distribution from the Apache site.
  2. Make sure that you have set the ANT_HOME environment variable.
  3. Make sure that you include $ANT_HOME/bin in the PATH environment variable.

Installing Apache Ivy

  1. Download and unzip the distribution from the Apache site.
  2. Copy ivy.jar to $ANT_HOME/lib.

Getting the source code

  1. Check out the source code from Subversion.
  2. Now you should have a directory called ontopia or ontopia-read-only. This is the trunk of the source code tree. Go into this directory.
  3. Go to the ontopia directory. Inside this directory you see a list of files that looks like this:
drwxr-xr-x   7 grove  staff     238 Jun 15 14:38 3rdparty
drwxr-xr-x   6 grove  staff     204 Jun 15 17:47 build
-rw-r--r--   1 grove  staff     270 Jun 15 14:38 build.properties
-rw-r--r--   1 grove  staff  211169 Jun 15 18:56 build.xml
drwxr-xr-x   8 grove  staff     272 Jun 15 14:36 doc
-rw-r--r--   1 grove  staff    3107 Jun 15 19:08 ivy.xml
-rw-r--r--@  1 grove  staff     538 Jun 15 14:38 ivysettings.xml
drwxr-xr-x  55 grove  staff    1870 Jun 15 19:08 lib
drwxr-xr-x   8 grove  staff     272 Jun 15 18:00 src

Building the .jar

  1. Run ant bootstrap to initialize the project. This only has to be done once.
  2. To build the Ontopia jar file, run ant dist.jar.ontopia. This will compile all the Java classes and build build/jars/ontopia.jar.
  3. Run the test suite with the ant test command.

Using the .jar

The ontopia.jar file needs a number of other .jar files to actually work. These are downloaded by Apache Ivy into ontopia/lib. At the moment you need to put these on the classpath manually, but we are working to make that unnecessary.

Building the Ontopia distribution

  1. To build the full Ontopia distribution as a zip file, run ant dist.ontopia. The finished zip file will be located in the build/dists directory, e.g. build/dists/ontopia-5.0.0-20090622.zip.

Troubleshooting

If you run into this problem with Ivy, or any similar problems, then you may want to run the ant -f build-ivy.xml clean.ivy command to empty the local Ivy cache. When this command has been run all the dependencies will have to be downloaded again

Users/larsga/cvs-co/ontopia/build.xml:81: impossible to build ivy path: java.lang.IllegalStateException: Report file '/Users/larsga/.ivy2/cache/net.ontopia-ontopia-build.xml' does not exist.

Sign in to add a comment
Hosted by Google Code