I was provided with an ant build file from someone else which uses svnant and I'm having issues with getting it to work. I extracted out the part that is causing me problems into a separate file:
<project name="rev-check macrodef">
<sequential>
<!-- ant contrib task definition -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="C:/rms-it-apps/ant/taskdefs/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<taskdef resource="org/tigris/subversion/svnant/svnantlib.xml" loaderref="svnant.loader">
<classpath>
<pathelement location="C:/rms-it-apps/ant/taskdefs/svnant-1.3.1/lib/svnant.jar"/>
<pathelement location="C:/rms-it-apps/ant/taskdefs/svnant-1.3.1/lib/svnClientAdapter.jar"/>
<pathelement location="C:/rms-it-apps/ant/taskdefs/svnant-1.3.1/lib/svnjavahl.jar"/>
</classpath>
</taskdef>
</sequential>
<!-- <svn svnkit="false" javahl="false"> -->
<svn>
<info target="C:/dev/workspace/rmsitpew/PEW/src" />
<wcversion prefix="wc" path="C:/dev/workspace/rmsitpew/PEW/src" />
</svn>
<echo>Here 1</echo>
When I try to run it with just the <svn>
tag I get the following output:
C:\dev\svnant>runant
C:\dev\svnant>C:\Programs\eclipse\plugins\org.apache.ant_1.8.2.v20120109-1030\bi
n\ant.bat
Buildfile: C:\dev\svnant\build.xml
[svn] Missing 'javahl' dependencies on the classpath !
BUILD FAILED
C:\dev\svnant\build.xml:19: Cannot find javahl, svnkit nor command line svn clie
nt
Total time: 0 seconds
I saw a suggestion to run it with the tag <svn svnkit="false" javahl="false">
but then I get this output:
C:\dev\svnant>C:\Programs\eclipse\plugins\org.apache.ant_1.8.2.v20120109-1030\bi
n\ant.bat
Buildfile: C:\dev\svnant\build.xml
[svn] Deprecated attribute 'svnkit'. This attribute will disappear with SV
NANT 1.3.2. Use svnSetting instead.
[svn] Deprecated attribute 'javahl'. This attribute will disappear with SV
NANT 1.3.2. Use svnSetting instead.
[svn] svn: The path 'C:\dev\workspace\rmsitpew\PEW\src' appears to be part
of a Subversion 1.7 or greater
[svn] working copy rooted at 'C:\dev\workspace\rmsitpew'.
[svn] Please upgrade your Subversion client to use this working copy.
[svn] <Info> failed.
BUILD FAILED
C:\dev\svnant\build.xml:18: Failed to set 'info' properties
Here are the contents of the directory C:\rms-it-apps\ant\taskdefs\svnant-1.3.1\lib:
04/05/2012 10:44 AM 3,010 GANYMED-LICENSE
04/05/2012 10:44 AM 244,831 ganymed.jar
04/05/2012 10:44 AM 2,800 JAVAHL-LICENSE
04/05/2012 10:44 AM 544 JNA-LICENSE
04/05/2012 10:44 AM 948,100 jna.jar
04/05/2012 10:44 AM 2,276 SEQUENCE-LICENSE
04/05/2012 10:44 AM 76,383 svnant.jar
04/05/2012 10:44 AM 11,935 SVNCLIENTADAPTER-LICENSE
04/05/2012 10:44 AM 215,757 svnClientAdapter.jar
04/05/2012 10:44 AM 89,412 svnjavahl.jar
04/05/2012 10:44 AM 2,695 SVNKit-LICENSE
Some problems:
I'd suggest sticking to the commandline client or using svnkit.
Here you can find a general overview of all available tools, which you can use with the ant task.