Steps to check out from svn by
ANT script:
1] SvnAnt
You can find latest version of svnant on
http://subclipse.tigris.org 2] extract the zip and get the jar file from lib folder
3] Put the svnant.jar and svnClientAdapter.jar files to classpath of your ant build file.
(Or directly to your ANT_HOME/lib directory.)
4] In the build file, load the <svn> task.
E.g. like this:
<taskdef resource="svntask.properties" classpathref="project.classpath"/>
(where svnant.jar lies in the "project.classpath")
5] To provide access to the Subversion API, svnant uses svnClientAdapter on top of
either the JavaHL native Subversion
Java (JNI) bindings or Subverion's
command line programs (which must be installed and in your PATH).
FOR Subversioning ,SVN needs to be recognized by your system.
Get COMMAND LINE PROGRAM for this recognition.
Most preferable is SLIK Subversion for 32 -bit
Link is :
http://www.sliksvn.com/en/download/ 6] After installing restart the computer
7] now go to command prompt and write
Svn �version
It will get recognized�.as follows:
Type svn_help for more
8] Write the build.xml and build.properties to check out the file from SVN and place them under your WORK_DIR.
Sample of build.xml:
<?xml version="1.0"?>
<project name="svn-test" basedir="." default="checkoutThis">
<property file="build.properties" />
<path id="project.classpath">
<pathelement location="jsvn.jar" />
<pathelement location="svnant.jar" />
<pathelement location="svnClientAdapter.jar" />
<pathelement location="commons-lang-2.0.jar" />
<pathelement location="jakarta-regexp-1.3.jar" />
<pathelement location="svnjavahl.jar" />
</path>
<taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
<target name="checkoutThis">
<svn username="${svnant.repository.user}" password="${svnant.repository.passwd}">
<checkout url="${svnant.this.url}" revision="HEAD" destPath="${svnant.latest.url}" />
</svn>
</target>
</project>
Sample of build.properties:
# -----------------------------------------------------------------------------
# build.properties
# This file is referenced by the build.xml file.
#
# $Id$
# -----------------------------------------------------------------------------
svnant.version=0.6.0
# -----------------------------------------------------------------------------
# all jar needed
# -----------------------------------------------------------------------------
jsvn.jar=jsvn.jar
svnant.jar=svnant.jar
svnClientAdapter.jar=svnClientAdapter.jar
svnant.latest.url=�Desination directory�
svnant.this.url=�SVN URL from where to checkout file�
svnant.repository.user=�Username for SVN athentication�
svnant.repository.passwd="password for SVN athentication"
9To checkout file, open command prompt and cd to WORK_DIR.
1.Execute ant.
2.If the build is successful, the following message will appear. Your files have been successfully checkout to the desination path.
3]if your file name is other then build.xml
Then write command as follows:
Ant �f file_name.xml