Building ODE has been edited by Matthieu Riou (May 31, 2007).

Change summary:

Updated build instructions with buildr to provide more details.

(View changes)

Content:

Ode is still under incubation and doesn't have any official release yet (but we're working on it). So you will have to build from the source code but thanks to Buildr, this is fairly easy.

We're still maintaining a Maven2 build for now but the preferred build mechanism is using Buildr as our Maven2 support will shortly been discontinued.

Getting the source code

First you will have to make sure that you have Subversion. If you don't know what Subversion is or don't have it installed, check here. Once installed run:

$> svn checkout http://svn.apache.org/repos/asf/incubator/ode/trunk ode

For more information or if you have any problem with Subversion (like being behind a proxy or a firewall) check the Source Code section.

Building With Buildr

If you already have Ruby installed on your machine (which is true for most Linux and Mac computers), you will probably find building with Buildr easier. You will need to following things:

  • Ruby 1.8.x with RubyGems 0.9 or later. As mentioned, you probably already have this installed. For Windows users using the Ruby One-Click Installer is the easiest (http://rubyforge.org/projects/rubyinstaller/). For Linux or Mac OS users, a Ruby interpreter is usually preinstalled. Just make sure to have the ruby-dev package (mkmf is needed for RJB).
  • Buildr. Install it by running 'gem install buildr'. You will need to have a proper JAVA_HOME environment variable. Make sure to choose either win32 or ruby platforms (don't choose java for Antwrap, that's JRuby).

Building is then pretty simple. Open a command in the source root directory and run:

rake TEST=no package

To try the test cases bundled with ODE:

rake test

To generate Eclipse project files:

rake eclipse

It just works! For more information about Buildr see http://buildr.rubyforge.org/.

Building With Maven2

You'll need to install Maven2 to build Ode. Just follow the installation instructions. Then open a command in the source root (usually in ode if you checked out using the previous command) and type:

mvn install

This will compile and install all necessary artifacts in your local repository.

Isn't it pretty to think so?
You may find that the optimistic claim made above is---well, let's just say, not reflected by reality. In fact you are likely to experience the following problems:
  • tools.jar library cannot be found: make sure JAVA_HOME points to a Java JDK, /not/ a JRE.
  • OpenJPA enhancer cannot find necessary libraries: re-run the mvn install and all should be well.
  • Build fails because you're missing dao-jpa-ojpa-derby or dao-hibernate-db-derby. Go into the directory of the missing module, run mvn install, go back to the root directory and run Maven again.

After everything has been compiled, it's rather easy to produce a standalone distribution of ODE. Just go into the distro-axis2 directory (or distro-jbi if you're interested in the JBI integration) and type:

mvn install

You should find the full distribution in the distro-axis/target directory.

Reply via email to