JavaSVN The only pure Java Subversion client library in the world!
Home :: Knowledge Base :: How to build JavaSVN Subclipse Extension plugin from sources
Get JavaSVN source code with the svn command line client
$ svn co http://72.9.228.230/svn/jsvn/trunk javasvn
or (to check out specific version):
$ svn co http://72.9.228.230/svn/jsvn/tags/TAG_NAME javasvn
Go to checked out directory
$ cd javasvn
Set ECLIPSE_HOME environment variable (should point to Eclipse 3.1M6 (or newer) home directory)
$ set ECLIPSE_HOME=/home/user/java/eclipse31M6
Use ANT to build javasvn.jar
$ ant deploy
build/eclipse directory will contain Eclipse javasvn plugin, feature and update site files.
To make Eclipse use the plugin you've just built, copy all files
from JAVASVN/build/eclipse/plugins and JAVASVN/build/eclipse/features to corresponding Eclipse directories and restart Eclipse:
$ eclipse -clean
Or use "Local Update Site" at JAVASVN/build/eclipse/site directory to install JavaSVN Subclipse Extension
How to make Subclipse (0.9.30) use JavaSVN library
Though JavaSVN is not yet fully integrated into Subclipse as an extension, you may already try it with Subclipse. Perform the following
easy steps to make Subclipse and JavaSVN work together.
With Eclipse Update Manager (tested with Eclipse 3.1M6, WinXP):
- Add http://tmate.org/svn/ as an update site to Eclipse Update Manager.
Use Help | Software Updates | Find and Install in main menu.
- Install "JavaSVN Subclipse Extension" feature.
HTTP proxy setup
Define your proxy port and host in Eclipse Install/Update preferences page.
Additional proxy settings may be defined in ECLIPSE_HOME/configuration/config.ini file:
http.proxyUser user name if proxy needs authentication
http.proxyPassword password if proxy needs authentication
http.nonProxyHosts , or | delimited host names that should bypass proxy
SVN+SSH authentication with private key
JavaSVN uses pure java JSCH library to establish SSH
connection. This library supports only SSH version 2, with password or private key authentication. Using
password authentication is not a problem with Subclipse, but currently it doesn't provide a way to define
private key and passphrase for private key authentication. You may use the following properties to let JavaSVN
know about your private key and passphrase (you need to provide these properties when starting Eclipse):
$ eclipse -vmargs \
-Djavasvn.ssh2.key=/path/to/private/key/file \
-Djavasvn.ssh2.username=userName \
-Djavasvn.ssh2.passphrase=optionalPassphrase
Note: User name for ssh connection will be taken from SVN Repository properties that may be altered in Subclipse
SVN Repositories view.
To avoid special batch script creation to launch Eclipse you may define ssh related properties in
Eclipse config.ini file ECLIPSE_HOME/configuration/config.ini (tip provided by Andrew Berman):
...
javasvn.ssh2.key=path/to/private/key/file
javasvn.ssh2.passphrase=passphrase
javasvn.ssh2.username=username
In case you work with Mac OS X version of Eclipse it is not
too simple to add arguments that make JSCH look for private
key file at launch. Instead of command line arguments you can
modify Eclipse.app/Contents/Info.plist last array of keys
adding something like that (tip provided by Valentin Alekseev):
<array>
...
<string>-Djavasvn.ssh2.key=/path/to/key/file</string>
</array>
If you have any questions regarding JavaSVN, would like to report a bug or contribute a patch, please write to
support@tmatesoft.com
|