Sunday, December 14, 2008

SVN for Eclipse Installation on Ubuntu

There are two SVN alternatives for Eclipse Subversive and Subclipse. In Windows, both of them seem work out of the box. But in Ubuntu, they require lot more steps to make it works.

Subclipse

For ubuntu and all other linux OS, a library called libsvn is required to install prior installation of Subclipse:

sudo apt-get install libsvn-java

In Eclipse, using Software Updates to obtain Subclipse, make sure include JavaHL adapter and SVNKit adapter. After installation, Eclipse may says that "JavaHL (JNI) Not Available". This is caused by JVM fails to find the libsvn library location (in /usr/lib/jni) which support JavaHL interface. Now, open eclipse.ini in eclipse installation folder and add follow line just after "-vmargs"

-Djava.library.path=/usr/lib/jni

Re-open eclipse the problem should be solved!

Update 16/12/2008 - I could not find a way to save SSH password.. which mean even time accessing the repository you are asked for password.. very annoying..

Subversive

So far, I still could not make Subversive works (the JavaHL part). Subversive contains two components that are required:

  • Subversive SVN Team Provider Plugin (Incubation)
  • Subversive SVN Connectors JavaHL and/or SVNKit

They can be grabbed from two different update URL check here. For some reasons, it may need to select/enable the correct update URL in Software Updates -> Manage Sites. Fail to do so may results to have old version of SVN Team Provider Plugin installed.

It seems that Subversive requires libsvn library as well, and JVM also fail to find libsvn location, but even apply above method, JavaHL still could not be loaded due to either "Could not find library" or "library has been loaded by another class loader"

Update 20/12/2008 - Forget about JavaHL!!! Use SVNKit which is purely bases on Java!!!