Skip to content
November 9, 2010 / jkeznikl

SOFA-J HOWTO: Compilation & Installation

Requirements

The Apache Ant and Apache Ivy tools are used for compilation and distribution ofthe SOFA-J implementation and therefore must be installed and configured onthe host computer. Moreover, the Ant-Contrib Ant task library must be installed.

Compilation

First of all, you must download the current trunk version from the SVNrepository using

svn checkout svn://svn.forge.objectweb.org/svnroot/sofa/trunk .

To compile the current SOFA-J version, run ant in the followingdirectories in the given order (use the default task):

sofa/trunk/buildsofa-j/trunk/buildcushion/trunk/build

Installation

To create the current SOFA-J distribution from the compiled files, runant in the following directories in the given order (use the default task):

cushion/trunk/distsofa-j/trunk/dist

The distribution will be created in the sofa-j/trunk/dist/output/distdirectory.

To complete the installation, the environment variables must be updated.To do this, you could use the following scripts (run them in the currentdirectory)

Windows (sofa-env.bat):

@echo off set PRGDIR=%~dp0 echo Setting SOFA_HOME set SOFA_HOME=%PRGDIR%sofa-jtrunkdistoutputdist echo Setting CUSHION_HOME set CUSHION_HOME=%PRGDIR%cushiontrunkdistoutputdist echo Adding bin dirs to path. set PATH=%PATH%;%SOFA_HOME%bin;%CUSHION_HOME%bin

Unix (sofa-env.sh):

#!/bin/bash PRG="$0" PRGDIR=`pwd "$PRG"` echo "Setting SOFA_HOME" export SOFA_HOME=$PRGDIR/sofa-j/trunk/dist/output/dist echo "Setting CUSHION_HOME" export CUSHION_HOME=$PRGDIR/cushion/trunk/dist/output/dist echo "Adding bin dirs to path." export PATH=$PATH:$SOFA_HOME/bin:$CUSHION_HOME/bin

After this step, the SOFA-J distribution should be fully configured inthe current terminal.

Running a simple application

To run a simple application called ‘logdemo’ (which was installed alongwith the SOFA-J distribution), you have to start several facilities (seedocumentation for explanation).You will need 3 terminals (consoles, shells, …) configured (see theprevious section).Run the following command in each terminal according to the numbers.

  1. start the SOFAnode facilitiessofa-node.sh/bat

  2. start the deployment dock with appropriate name (here ‘nodeA’)sofa-dock.sh/bat nodeA

  3. launch the applicationsofa-launch.sh/batorg.objectweb.dsrg.sofa.examples.logdemo.deplplan.Local current

For information about application development seehttp://sofa.ow2.org/docs/howto.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: