从下面
依据一的官方人员的回答,知道getDir是无法获取到commitMessag的,下面提到了用其他方法:
1.getRevisionPropertyValue (可行)
2.getDir 含有includeCommitMessages这个参数的方法,但是试过不可行
最终是按照第一种,
通过最新的版本号,获取提交信息
并且在插件开发的过程中,需要在runtime中添加svnkit库,不然在运行的过程中会提示找不到类;之前搜索的答案都是非插件开发的,比如web或者安卓应用
java.lang.NoClassDefFoundErr
依据一:
From: Alexander Kitaev <Alexander.Kitaev <at> svnkit.com>
Date: Tuesday 3rd November 2009 13:31:57 UTC (over 8 years ago)
Hello Xiaoyu,> my svn http service program is httpd with svn 1.6.1 WebDAV module.> Is this a bug?This is not a bug, but rather expected behavior.Native Subversion client API doesn't provide commit message as part of"getDir" (list) information, whatever access method you use (local, DAVor svn).In SVNKit we've added code that reports commit message as part of getDirreport, when local protocol access is used (because in this case revpropfile is anyway read, so there is no overhead). However, we couldn't dothat for network access methods - in those cases contents of report isserver responsibility.So, as long as you use local repository access you may use thatoptimization we have in SVNKit and get commit message along with otherinformation you receive from getDir method call. And for other accessmethods I'd suggest you to use getRevisionPropertyValue method ofSVNRepository (see SVNRevisionProperty for property names).Another option is to use SVNRepository.getDir with boolean parameter'includeCommitMessages' - this method actually call getRevisionPropertyfor each revision (but also cache retrived messages, so that samemessages is not fetched twice). However, this method is alsoSVNKit-specific and do more than single request, while getDir(...) thatyou're using has standard counterpart in the native Subversion protocol.Alexander Kitaev,TMate Software,
http://svnkit.com/ - Java [Sub]VersioningLibrary!
http://sqljet.com/ - Java SQLite Library!
依据二:Eclipse plugins 插件开发学习 - 第三方Jar包依赖
程序中需要加入的第三方Jar包,不能自己在 Build Path 中手动加入, 必须使用下面的方法
1. 如果第三方 Jar 包属于 eclipse 本身自带的插件之一, 那么可以通过
Dependencies -> Required plugins-ins -> Add
2. 其他的第三方 Jar 包 (包括 Classpath)
Runtime -> Classpath -> Add(New)
META-INF/MANIFEST.MF 文件内容
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.humpic.plugins.helper
Bundle-SymbolicName: com.humpic.plugins.helper
;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: com.humpic.plugins.helper.Activator
Bundle-Localization: plugin
Require-Bundle:
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ui.editors,
org.eclipse.jdt.ui,
org.eclipse.jdt.core,
org.eclipse.jface.text,
org.eclipse.core.resources,
org.apache.log4j
Eclipse-LazyStart: true
Bundle-ClassPath:
.,
classes/,
lib/velocity-1.4.jar,
lib/commons-io-1.3.2.jar,
lib/commons-collections-3.2.jar,
lib/commons-lang-2.3.jar