gpt4 book ai didi

svn - 使用 svnant 缺少类路径上的 svnkit 依赖项

转载 作者:行者123 更新时间:2023-12-01 22:36:30 29 4
gpt4 key购买 nike

我正在尝试让 svnkitsvnant 一起使用。

这是我的构建文件:

<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 目录中,我在类路径中包含的其他内容也是如此。我做错了什么?

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)

最佳答案

您缺少 svnkit 所需的 ganymed.jarjavahl.jar。此信息来自guide :

svnkit

The svnkit binding is purely java based. Using this binding requires the jar svnkit.jar to be used for the svnant declaration. You also need the ganymed.jar which provides the necessary functionality for SSH based communication.

ganymed.jar 是 svnant 下载的一部分,或者可以下载 here

通过类路径和taskdef配置svnant

这是类路径的正确且正常运行的版本,所有库都位于 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 中的所有库

如果您在 ANT_HOME/lib 中拥有所有必需的库,您可以简单地使用以下内容:

<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" /> 

关于svn - 使用 svnant 缺少类路径上的 svnkit 依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10721104/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com