Saturday, June 27, 2009

Building Apache ODE

I found it little bit hard to build Apache ODE for the first time. I followed the steps in the Building ODE guide as it is. But I was not able to build the ODE source. The appeared error was

Permission denied - Permission denied - /tmp/axis2-adb-1.4.1.jar.16179.53314 or /home/.../.m2/repository/org/apache/axis2/axis2-adb/1.4.1/axis2-adb-1.4.1.jar
Buildr aborted!
Failed to download org.apache.axis2:axis2-adb:jar:1.4.1, tried the following repositories:
http://pxe.intalio.org/public/maven2/
http://people.apache.org/repo/m2-incubating-repository/
http://repo1.maven.org/maven2/
http://people.apache.org/repo/m2-snapshot-repository/
http://download.java.net/maven/2/
http://ws.zones.apache.org/repository2/

(Note well, this error only appears, if you build the ODE for the first time or build it with a cleaned repository.)
Therefore, I tried my best to grant the permission to the relevant directories, but, it did not help. I tried to build it as a super user, then it worked. But, it will not help because all the dependencies are copied to the root's .m2 repository.

Actually there was not a single clue to find the fault. After trying out several tests, I was able to figure out that the root cause is the version of the Apache Buildr. Let me explain in detail, how I installed Buildr.

Installing Apache Buildr in jRuby
First of all I downloaded the jRuby 1.2.0. After following the steps in the Guide, I use the following command to install Apache Buildr in jRuby.

jruby -S gem install buildr

The above command installed the Buildr version 1.3.4 which caused me immense trouble. To solve the problem, I uninstalled the Buildr version 1.3.4 using the command:

jruby -S gem uninstall buildr -v 1.3.4

Then re-installed the older version 1.3.2 again, which relieved me a lot. I still could not figure out the exact wrong with the Buildr version 1.3.4, even though, I posted about the problem in the Buildr dev mailing list. Finally I made my mind by assuming it was a bug in Buildr version 1.3.4. This is a serious because the Buildr version 1.3.4 is not backword compatible :(

There is another important fact about installing Buildr in jRuby instead of Ruby. Quoting Apache ODE Building Guide,

Note that for now, even though ODE can run on JDK 1.6.x, building ODE only works with JDK 1.5.x. So before building, make sure you JAVA_HOME points to a JDK 1.5.x installation

The above statement valid only when using Buildr which installed in Ruby. If You installed the Buildr in jRuby, JDK 1.6.x can be used to build ODE.

Happy ODEing...

No comments:

Post a Comment