Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
830 views
in Technique[技术] by (71.8m points)

ant - Cannot find javahl, svnkit nor command line svn client

I've done numerous svn / ant set-ups and but this time cann't figure out what's wrong.

Using Linux,

svn 1.6.6
ant 1.8.2
svnant 1.3.1

I've copied the svnant jar files into $ANT_HOME/lib

top@secret:~/apps/apache-ant-1.8.2/lib$ ls -l
-rw-r--r-- 1 root root  244831 2011-06-23 07:55 ganymed.jar
-rw-r--r-- 1 root root  948100 2011-06-23 07:55 jna.jar
-rw-r--r-- 1 root root   76383 2011-06-23 07:55 svnant.jar
-rw-r--r-- 1 root root  215757 2011-06-23 07:55 svnClientAdapter.jar
-rw-r--r-- 1 root root   89412 2011-06-23 07:55 svnjavahl.jar

etc...

My build file specifies:

<taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask"   />

But whenever I execute

   <target name="update">
                <svn>
                        <update dir="."/>
                </svn>
        </target>

I get the dreaded:

update:
      [svn] Missing 'javahl' dependencies on the classpath !

BUILD FAILED
/home/top/apps/utils/build.xml:26: Cannot find javahl, svnkit nor command line svn client

Any ideas what I'm doing wrong?

I assumed copying the svnant jars into $ANT_HOME/lib should be enough?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Javahl way always needs some kind of os-dependent driver. This is mostly hard to set-up and I don't recommend using it.

You should try using svnkit:

<svn svnkit="true">

This uses the pure java library, but needs svnkit.jar to be in the classpath.

References:

  1. http://subclipse.tigris.org/svnant/svn.html
  2. http://subclipse.tigris.org/wiki/JavaHL

I only use the fallback/commandline version, where the svn executable is in the PATH. This works in most cases without problems with the following settings:

<svn svnkit="false" javahl="false">

Note: These settings are for svnant 1.31 and prior. Since version 1.32 you can use <svnSetting />, which is described in the other answer


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...