Pages

Monday, November 22, 2010

Installing Oscar

About half-way my Oscar project now. I blogged about the Oscar Java API, the command line utility, and the Taverna plugin (all in development). Also, David Jessop joined in, boosting the refactoring. The meeting with the ChEBI team last week was great too. We worked out details for the use cases, involving Oscar and Lezan's ChemicalTagger.

Here follow some install instructions to get going. Please give things a try, even though we are under heavy development. You can monitor the stability of the code via these Hudson pages for oscar4, oscar4-cli, ChemicalTagger, and others. This continuous building of software should be set up for any scientific code.

Requirements
The follow the below instructions, you will need a working environment with a tool to process zip files (or equivalent), Java DK, and Maven. Having wget makes things easier. Oh, and you need a working internet connection.

The pattern is otherwise the same for all above tools. I will demonstrate the process with oscar4-cli.

Ubuntu and Debian users can use:
$ sudo aptitude install unzip maven2 \\
  openjdk-6-jdk wget
Downloading the source
The source code for the above tools is all hosted on BitBucket, using the Mercurial version control system. However, there is no need to worry about that, because BitBucket provides source drops. At this page you can download a .zip file for the command line utilities, which you can unzip with your favorite tool.

If you have wget installed you could do from the command line:
$ wget http://bitbucket.org/egonw/oscar4-cli/get/tip.zip
$ unzip tip.zip
which downloads and unzips the latest version in the repository. (This is where monitoring Hudson comes in; there you can check if there are failing unit tests.)

Compiling the code
With the source code locally installed, it is same for Maven to come into action. Again, I have no clue how to do this on Windows (other than with Cygwin, which every Windows users should have installed, if a virtual machine with a full Linux is no option), but maven should run the 'assembly:single' target. Or, from the command line:
$ cd oscar4-cli/
$ mvn assembly:assembly
$ cp target/oscar4-cli-4.0-SNAPSHOT-jar-with-dependencies.jar \\
  ./oscar4-cli-4.0-SNAPSHOT.jar
That should do: the created oscar4-cli-4.0-SNAPSHOT.jar can be used now to run the command line utilities. Actually, it should also do fine for using the Oscar4 Java API.

Provide feedback
We most welcome feedback, or any kind. Feature requests can be posted here, and bug reports here. You can also send email to the oscar3-chem-developers mailing list.

Update: mvn assembly:assembly should be used instead of mvn assembly:single.