Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How to Build

There are two motivations for building SDO from source and two well tested approaches to doing so. You may be wanting to build a binary release distribution from source code. Alternatively you may be wishing to establish a development environment in order to further the development of the code. The two tested approaches are either to use maven 2 command line builds or to Java source code create projects in the Eclipse SDK.

If you simply want to create a source code distribution, then even if you are an Eclipse user its best to just follow the instructions in the BUILDING.txt file at the top of the source code distribution and run a maven command line build (since the route to establishing an Eclipse environment requires installing maven anyway). Note that SDO for Java is distributed as two source code distributions. You'll need to download two archives, one for the SDO API, and one for the Tuscany implementation of that API.

If you want to work with the SDO projects alone, without the rest of Tuscany, proceed with the following steps.

Set up your environment using the instructions for building the whole of Tuscany, but only download and install Java 5, Maven and Svn (note that only one file, Interface2JavaGenerator.java, has a Java 5 dependency, if you want to work with Java 1.4.2 then just delete this file before building).

Make sure 'mvn' and 'svn' commands are in your PATH environment variable.

Check out the SDO open source projects from Apache.

md <local tuscany dir>
cd <local tuscany dir>
svn co -N https://svn.apache.org/repos/asf/incubator/tuscany/javaImage Added
cd java
svn up sdo
svn up -N spec
cd spec
svn up sdo-api

Run "mvn" under <local tuscany dir>/java directory to install POM files from the root project to the local repository


cd <local tuscany dir>/java
mvn -N
cd spec
mvn -N
cd ../sdo
mvn -N (alternatively, run without the -N option - see Note below)

You can now build SDO project as a whole or build the individual SDO subprojects.

Build SDO project

This step builds all subprojects in the source tree at once

mvn in <local tuscany dir>/java/sdo

If the mvn command completed successfully, you will see BUILD SUCCESSFUL in the output and the results of compilation will be available in jar files created under directories named "target" directly under the root directories of the projects. These jar files are also installed into your local maven repository ($HOME/.m2/repository) and are available as inputs to later build operations.

Maven fetches external resources required for a build process from the internet. These resources are at times unavailable. It may be necessary to run "mvn" again at a later time.

If you are taking time to reply to firewall prompts, this can cause some requests to time out. Set up the firewall to permit the action without prompting.

Build sub projects of SDO individually

Build sdo.spec project


cd <local tuscany dir>/java/spec/sdo-api
mvn
mvn -Peclipse eclipse:eclipse (optional: Run this command if you are using Eclipse for development.)

Build sdo.impl project

cd <local tuscany dir>/java/sdo/impl
mvn
mvn -Peclipse eclipse:eclipse (optional: Run this command if you are using Eclipse for development.)

Build sdo.tools project

cd <local tuscany dir>/java/sdo/tools
mvn
mvn -Peclipse eclipse:eclipse (optional: Run this command if you are using Eclipse for development.)

Build sdo.samples project

cd <local tuscany dir>/java/sdo/sample
mvn
mvn -Peclipse eclipse:eclipse (optional: Run this command if you are using Eclipse for development.)
To be completed.