You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David Weintraub <qa...@gmail.com> on 2008/07/29 00:23:33 UTC
Subversion Ant Tasks
I'm having some difficulties with Subversion's Ant tasks.
I am on SUSE 9.0 which has the latest Subversion release of 1.3.
However, I am building with Hudson that is using svnkit which is using
a release 1.4.6 revision. The problem is I build with Hudson, it
creates a 1.4.6 compatible workspace, then I attempt to do something
in my Ant file, and I get the message that my Subverison client is too
old.
I went to subclipse and got the svnant task. This includes a
svnant.jar and a svnClientAdapter.jar. Apparently, the svnjavahl.jar I
am using is a 1.3 client version. According to the documentation,
svnClientAdapter.jar can use the svnjavahl, the svnkit, or the command
line.
I've removed the "svn" command from my path, and setup the following build.xml:
<project name="test" default="test" basedir=".">
<!-- Subversion Setup -->
<path id="svn.task.path">
<pathelement location="${ant.home}/lib-svn/svnant.jar"/>
<pathelement location="${ant.home}/lib-svn/svnClientAdapter.jar"/>
<pathelement location="${ant.home}/lib-svn/svnkit-javahl.jar"/>
</path>
<taskdef resource="svntask.properties" classpathref="svn.task.path"/>
<property file="${user.home}/.subversion/svn.properties"/> <!--
User Name & Pword -->
<target name="test">
<svn
javahl="true"
username="svnant"
password="SNVant123">
<cat
url="http://subversion.solbright.com/dev/modules/foundation/trunk/build.xml"
destfile="foo.xml"/>
</svn>
</target>
</project>
I get the following errors:
Buildfile: build.xml
test:
BUILD FAILED
/solbright/tools/build/build.xml:18: Cannot use javahl nor command
line svn client
I have tried modifying the file to use svnjavahl.jar, but get the same
error. It only works if I put the svn command back into the PATH, so
it can execute via the svn command line. Unfortunately, that's 1.3,
and I need a 1.4.6 compatible client.
Has anyone else used the Subversion tasks in Ant? Any help in configuring them?
--
David Weintraub
qazwart@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Subversion Ant Tasks
Posted by David Weintraub <qa...@gmail.com>.
The Hudson people told me of a Hudson plugin that forces Hudson to use
Subversion 1.3 format in the work directory. That solved this
particular issue
--
David Weintraub
qazwart@gmail.com
On Tue, Jul 29, 2008 at 7:04 AM, Rod Mackenzie
<ro...@googlemail.com> wrote:
> I used svnant a while back, here's a bit of the build file I used
>
> <target name="init-svn">
> <!--property name="svnant.home" value="svnant-1.0.0"/-->
> <property name="svnant.home" value="svnant-1.1.0-RC2"/>
>
> <!-- path to the svnant libraries. -->
> <path id="svn.classpath">
> <fileset dir="${svnant.home}/lib">
> <include name="*.jar"/>
> </fileset>
> </path>
>
> <!-- load the svn task -->
> <!--taskdef resource="svntask.properties"
> classpathref="svn.classpath"/-->
> <typedef resource="org/tigris/subversion/svnant/svnantlib.xml"
> classpathref="svn.classpath"/>
> </target>
>
> The differences to your example is that I include all the jars from the
> svnant lib directory which includes the javasvn.jar and use the antlib to
> include the tasks. Also the version of svnant maybe important I tried using
> 1.0.0 but kept getting exceptions which is why I moved to 1.1.0-RC2
>
> Rod
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Subversion Ant Tasks
Posted by Rod Mackenzie <ro...@googlemail.com>.
I used svnant a while back, here's a bit of the build file I used
<target name="init-svn">
<!--property name="svnant.home" value="svnant-1.0.0"/-->
<property name="svnant.home" value="svnant-1.1.0-RC2"/>
<!-- path to the svnant libraries. -->
<path id="svn.classpath">
<fileset dir="${svnant.home}/lib">
<include name="*.jar"/>
</fileset>
</path>
<!-- load the svn task -->
<!--taskdef resource="svntask.properties"
classpathref="svn.classpath"/-->
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml"
classpathref="svn.classpath"/>
</target>
The differences to your example is that I include all the jars from the
svnant lib directory which includes the javasvn.jar and use the antlib to
include the tasks. Also the version of svnant maybe important I tried using
1.0.0 but kept getting exceptions which is why I moved to 1.1.0-RC2
Rod