I am trying to query SVN property values using svnant's propget task but running into problems.
I have written a simple Ant target to update the build file's folder and then query a property:
<project name="svntest" default="test">
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" />
<svnSetting javahl="false" svnkit="true" username="xxx" password="yyy" id="svn.settings" />
<target name="test">
<svn refid="svn.settings">
<update dir="." />
<propget path="file.xml" name="svn:keywords" property="prop.value" />
</svn>
<echo message="${prop.value}" />
</target>
</project>
My SVN repo is on 1.7.5 and I have svnkit 1.7 which should be compatible.
If I comment out the propget and echo lines, it updates the folder fine. But when I try to query the svn:keywords property for a specific file I get this error:
C:\somepath\test.xml:11: java.lang.NoSuchMethodError: org.tigris.subversion.javahl.PropertyData.(Lorg/tigris/subversion/javahl/SVNClientInterface;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[B)V
I have set the svn:keywords property for file.xml to "value" so this does exist, and committed that.
If I change the propget name argument to look for an SVN property (e.g. "testprop") that doesn't exist, it doesn't fail it just returns "${prop.value}", I assume because the prop.value property is not being set. If I actually add the custom "testprop" SVN property to file.xml, I get the above error again - so it only seems to happen when it finds a property and attempts to get the value of it.
I have had previous issues trying to use javahl, hence setting this to false and using svnkit instead. However since the update task works I wouldn't have thought the javahl/svnkit binding is the issue.
Any help appreciated, thanks.
SVNKit's JavaHL bindings are in a file named
svnkit-javahl16-*VERSION*.jar
. This file can be found under thelib
directory of thestandalone.zip
downloaded from the SVNKit web site.This Jar file needs to be on the Ant classpath.
Edit - Follow-up on 10 January 2014:
The "missing" method is definitely in svnkit-javahl16-1.7.11.jar:
Somehow, this constructor isn't being found on Ant's classpath.
Run the following commands in a Command Prompt:
An avalanche of output will be generated. In this will be buried a line like the following:
Let us know what the
file:/...
is on your system. If there isn't an exact match, then see if there are any references to loaded classes with "javahl" in the name.