Metacat Source Download and Build Instructions
KNB Home Data People Informatics Biocomplexity Education Software

Table of Contents
Introduction
Get Metacat Source
Source Distribution
SVN Checkout
Build From Source
Prepare Build
Do Ant Build
Introduction

Metacat source can be downloaded either by getting and extracting the source distribution, or by checking out the code from the repository.

Reasons for choosing one versus the other might be:

You will also need Apache Ant to do the build. If you have not already installed Ant and you are running Ubuntu/Debian, you can get it by typing:

sudo apt-get install ant

Otherwise, you can get ant from The Apache Ant homepage

If you are checking out Metacat code from the SVN repository, you will need both Subversion (SVN) and CVS clients installed and configured on your system. Both are needed because, while Metacat has been migrated to SVN, some of its supporting libraries (eml, utilities and seek) have not yet been migrated. Eventually, SVN will be the only versioning client you will need. You will need to make sure you have the appropriate accounts on these systems. You won't have to worry about SVN or CVS if you are installing from a Metacat source distribution. These have all the required dependencies built in.

If you have not already installed Subversion and you are running Ubuntu/Debian, you can get it by typing:

sudo apt-get install subversion

Otherwise, you can get if from The Subversion homepage

If you have not already installed CVS and you are running Ubuntu/Debian, you can get it by typing:

sudo apt-get install cvs

Otherwise, you can get it from The Ximbiot CVS homepage

Get Metacat Source
Source Distribution

To get the Metacat source distribution, browse to the KNB Software Download Page. In the Metacat section, for Linux based systems, select the link that looks like:

metacat-src-X.X.X.tar.gz

for Windows systems, select the link that looks like:

metacat-src-X.X.X.zip

where X.X.X is the latest version of Metacat. Choose to save the file locally in the directory where your source should live.

Extract the Metacat package files on Linux systems by typing:

tar -xvzf metacat-src-X.X.X.tar.gz

or, on Windows, use your system unzip utility to extract the zip file.

Rename the metacat-X.X.X directory to metacat.

SVN Checkout

To check out the code from SVN, go to the directory where you would like the code to live and type:

svn co https://code.ecoinformatics.org/code/metacat/tags/METACAT_<rev> metacat

Where <rev> is the version of the code you want to check out (like 1_9).

If you are trying to check out the head, type:

svn co https://code.ecoinformatics.org/code/metacat/trunk metacat

You should see a list of files as they check out.

Build From Source

You should now have the Metacat source in a directory named "metacat" in your code directory (We will refer to the metacat source directory as <metacat_src_dir>.

Prepare Build

Edit the file at:

<metacat_src_dir>/build.properties

Make sure that the "build.tomcat.dir" property is set to your tomcat installation directory. For instance:

build.tomcat.dir=/usr/local/tomcat

Metacat will use some of the native Tomcat libraries during the build.

If your cvs user is something other than the user your are logged in as, you will need to change the ${env.USER} part of the cvsroot property to be your cvs user. For instance:

cvsroot=:ext:cvs-user@cvs.ecoinformatics.org:/cvs

where your cvs user name is "cvs-user"

Do Ant Build

In the <metacat_src_dir>, run:

ant clean build-metacat

You will see the individual modules get built. You will be prompted for your cvs password several times. You should see a "BUILD SUCCESSFUL" message at the end.

You should see a new file named:

<metacat_src_dir>/dist/knb.war

This file will be used during the Metacat Installation.