我想让svnkit
与svnant
合作。
这是我的构建文件:
<path id="svnant.classpath">
<pathelement location="${env.ANT}/../lib/svnant.jar"/>
<pathelement location="${env.ANT}/../lib/svnClientAdapter.jar"/>
<pathelement location="${env.ANT}/../lib/svnkit.jar"/>
<pathelement location="${env.ANT}/../lib/ganymed.jar"/>
</path>
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />
<svnSetting
svnkit="true"
javahl="false"
id="svn.settings"/>
<target
name="svnTest">
<svn refid="svn.settings">
<wcversion
path="${basedir}\..\"
prefix="svn."
/>
<info
target="${basedir}\..\"
propPrefix="svn.info."/>
</svn>
</target>
运行此构建文件时,我收到以下错误。 svnkit.jar
和ganymed.jar
在我的ant / lib目录中,我在classpath中包含的其他内容也是如此。我做错了什么?
svnTest:
[svn] Missing 'svnkit' dependencies on the classpath !
BUILD FAILED
build.xml:53: Cannot find javahl, svnkit nor command line svn client
详细错误:
repoCheckDev:
[svn] Missing 'svnkit' dependencies on the classpath !
BUILD FAILED
build.xml:line#: Cannot find javahl, svnkit nor command line svn client
at org.tigris.subversion.svnant.SvnFacade.getClientAdapter(Unknown Source)
at org.tigris.subversion.svnant.SvnTask.executeImpl(Unknown Source)
at org.tigris.subversion.svnant.SvnTask.execute(Unknown Source)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
答案 0 :(得分:5)
您错过了svnkit所需的ganymed.jar
和javahl.jar
。
此信息来自guide:
svnkit
svnkit绑定纯粹基于java。使用此绑定需要 jar svnkit.jar用于svnant声明。你也是 需要ganymed.jar,它提供了必要的功能 基于SSH的通信。
ganymed.jar
是svnant下载的一部分或可以下载here
这是类路径的正确运行版本,所有lib都在svnlib文件夹中,相对于
<path id="svnant.classpath">
<pathelement location="svnlib/svnant.jar"/>
<pathelement location="svnlib/svnClientAdapter.jar"/>
<pathelement location="svnlib/svnkit.jar"/>
<pathelement location="svnlib/ganymed.jar"/>
<pathelement location="svnlib/svnjavahl.jar"/>
</path>
如果您在ANT_HOME / lib中拥有所有必需的库,则只需使用以下内容:
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" />