mac下eclipse的svn插件的安装

一、

在Eclipse上安装svn插件有两种选择,一种是Subclipse,一种是Eclipse Subversion。前者是svn的官网eclipse插件,后者是eclipse的官方svn插件,具体有什么不同我也不算很清楚,想知道的请自行百度。

网上建议用Subclipse,我也习惯用Subeclipse,所以这里就讲Subeclipse的安装方法。

安装Subeclipse很简单,只要上http://subclipse.tigris.org 找到Eclipse update site URL,然后在Eclipse里直接install就行了(现在最新  http://subclipse.tigris.org/update_1.8.x)

在eclipse中help--》install new software --》add 我选择的subclipse最新的版本http://subclipse.tigris.org/update_1.8.x 

安装完Subclipse后重新启动Eclipse,然后会弹出提示说svn插件需要JavaHL的支持,看了下其实在svn官网说明了(http://subclipse.tigris.org/servlets/ProjectProcess;jsessionid=F40FF3633F5E4229446A81759CCADE2E?pageID=p4wYuA)如下:

One or both of the following Subversion Client API providers must also be installed:

  • JavaHL - this is recommended as it is the API provided as part of Subversion itself.  See this wiki page for more information.
  • SVNKit - this is a pure Java implementation of the Subversion API provided and supported by a 3rd party.
二、
下面就是搞定javaHL
具体了解和安装过程官网地址http://subclipse.tigris.org/wiki/JavaHL
网址中有用的其实就如下:

OS X

OSX comes with a SVN command line client, but unfortunately they do not include the JavaHL library.

The best thing to do is to install one of the OSX package managers for open-source software, such as MacPorts or HomeBrew. If you are doing software development on OSX, you are going to eventually want or need different open-source Unix applications. So it is worth the effort to set one of these up and they make it easy for you to get Subversion and always have the latest version. You will also have easy access to other open source applications via similar simple commands.

For MacPorts, the commands to run are:

 

sudo port install subversion-javahlbindings +no_bdb +universal

For HomeBrew the command is:

 

brew install --universal --java subversion

Pay attention to any post-install instructions related to creating a symlink in /Library/Java/Extensions. You need to follow these instructions so that the JavaHL library is available by default to the JVM.

(在http://www.macports.org/install.php下载MacPorts
在安装完MacPorts以后,在终端下执行下面的命令sudo port install subversion-javahlbindings +no_bdb +universal,安装javahl )
最后重启eclipse,在preferences->Team->svn里,若显示JavaHL的版本信息,说明成功了。

相关推荐