I've got the following markup:
<?xml version="1.0" ?>
<project name="SampleBuild" default="compile" basedir=".">
<property name="SvnAntDir" value="C:/Program Files/Apache/svnant-1.2.1/doc" />
<property name="src" value="_src_" />
<property name="build" value="_build_"/>
<property name="dist" value="${build}/_jars_" />
<path id= "svnant.classpath" >
<fileset dir= "${SvnAntDir}" >
<include name= "*.jar" />
</fileset>
</path>
<target name="pre-cleanup">
<delete dir="${src}" />
<delete file="${dist}/Project.jar" />
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${build}/_classes_/sevgok/" />
</delete>
<mkdir dir="${src}" />
<tstamp />
</target>
<target name="checkout" depends="pre-cleanup">
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />
<svn>
<checkout url="svn://p-subversion/Project/trunk" revision="HEAD" destPath="${src}" />
</svn>
</target>
<target name="compile" depends="checkout">
<javac srcdir="${src}" destdir="${build}/_classes_" debug="on" debuglevel="lines,vars,source">
<classpath>
<pathelement path="${classpath}" />
<fileset dir="./_libs_">
<include name="*.jar" />
<include name="*.zip" />
</fileset>
</classpath>
</javac>
</target>
</project>
Problem occurs when trying to make a build. The error message is next:
checkout: [svn] <Checkout> started ...
[svn] svn: svn://p-subversion/Project/trunk` doesn't exist
[svn] svn: svn://p-subversion/Project/trunk` doesn't exist
[svn] <Checkout> failed!
Build FAILED
C:\build.minimal.xml: (line of code which points to <svn> openning tag): Can't checkout.`
Simultaneously it is possible to make a checkout with Tortoise SVN client using the url.
Help!
EDIT
I tried using -v key when building and got the following:
Caused by: org.tigris.subversion.svnclientadapter.SVNClientException: org.tigris
.subversion.javahl.ClientException: svn: URL 'svn://p-subversion/Project/trunk
' doesn't exist
EDIT
Is there any alternative to SvnAnt? It would be great if it was also well documentated.
Thanks
EDIT
So code that works for me is:
<target name="checkout" depends="pre-cleanup">
<exec dir="${basedir}" executable="svn" failonerror="true">
<arg line="checkout -r ${revision} ${SvnUrl} ${src}" />
</exec>
</target>
where ${SvnUrl}
is the same URL I used before.