• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Steps to check out from svn by ANT script:

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is your question?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mehul, welcome to JavaRanch!

I should point out that the forums are used for asking questions about Java technologies. They are not intended to be blogs where you post tutorials on how to do various things. I do encourage you, however, to either post your own questions or post answers to other's questions.

Also, when making a lengthy post, please take the time to format it properly so that it is easy to read and understand. Use the 'code' UBBCode tag to format any source code, especially XML. You can edit your post to fix the formatting by clicking on the paper-and-pencil icon.
 
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic