Jayesh,
I cannot see your build.xml and I do not know how you've setup your
environment so all I can do without that is give you a working example of
how to use SvnAnt. Here is a working example:
<project name="project" default="default">
<property name="javahl"
value="C:\dev\java\svnClientAdapter\lib\svnjavahl.jar" />
<property name="javasvn"
value="C:\dev\java\svnClientAdapter\lib\javasvn.jar" />
<property name="wc.root" value="C:\dev\java\svnant" />
<path id="project.classpath">
<pathelement location="C:\dev\java\svnant\build\lib\svnant.jar" />
<pathelement
location="C:\dev\java\svnClientAdapter\build\lib\svnClientAdapter.jar"/>
<pathelement
location="C:\dev\java\svnClientAdapter\lib\svnjavahl.jar"/>
<pathelement
location="C:\dev\java\svnClientAdapter\lib\javasvn.jar"/>
</path>
<!-- Define svnant tasks and types. -->
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml"
classpathref="project.classpath"/>
<target name="default">
<svn javahl="${javahl}" javasvn="${javasvn}">
<checkout url="<your_url>" destPath="<your_dest_path>"
/>
</svn>
</target>
</project>
If your build.xml is setup similarly to this and you get an error regarding
the "svn" task not being available, add svnant.jar to ANT_HOME/lib. Other
than that, this is all I can do without knowing more of your build.xml and
your envinronment.
Take care,
Jeremy
On 2/21/06, Gohil, Jayesh <Jayesh.Gohil@lionbridge.com> wrote:
>
>
>
> Hi
>
> I am trying to checkout files from SVN Repository through svnant.
>
> I have downloaded svnant and put all the jar files from lib to Ant 1.6.5lib.
>
> I have written a target to checkout from svn.But on executing build.xml I
> am getting following error.
>
> Can you explain the reason and solution to this asap.
>
> Thanks.
>
> Regards,
>
> Jayesh
>
> Lionbridge Technologies Ltd.
>
>
>
>
>
> C:\ant\apache-ant-1.6.5\bin>ant -verbose
>
> Apache Ant version 1.6.5 compiled on June 2 2005
>
> Buildfile: build.xml
>
> Detected Java version: 1.4 in: C:\j2sdk1.4.2_07\jre
>
> Detected OS: Windows 2000
>
> parsing buildfile C:\ant\apache-ant-1.6.5\bin\build.xml with URI =
> file:///C:/ant/apache-ant-1.6.5/bin/build.xml
>
> Project base dir set to: C:\ant\apache-ant-1.6.5\bin
>
> [property] Loading C:\ant\apache-ant-1.6.5\bin\build.properties
> *
>
> dropping C:\ant\apache-ant-1.6.5\bin\lib\svnjavahl.jar from path as it
> doesn't exist
>
> dropping C:\ant\apache-ant-1.6.5\bin\lib\svnant.jar from path as it
> doesn't exist
>
> dropping C:\ant\apache-ant-1.6.5\bin\lib\svnClientAdapter.jar from path as
> it doesn't exist
>
> dropping C:\ant\apache-ant-1.6.5\bin\lib\jakarta-regexp-1.3.jar from path
> as itdoesn't exist
>
> dropping C:\ant\apache-ant-1.6.5\bin\lib\commons-lang-2.0.jar from path as
> it doesn't exist
> *
>
> Build sequence for target(s) `try' is [try]
>
> Complete build sequence is [try, checkoutLatest, checkoutThis, clean, ]
>
> BUILD FAILED
> *
>
> C:\ant\apache-ant-1.6.5\bin\build.xml:35: Cannot use javahl nor command
> line svn client
> *
>
> at org.tigris.subversion.svnant.SvnTask.execute(SvnTask.java:269)
>
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>
> at org.apache.tools.ant.Task.perform(Task.java:364)
>
> at org.apache.tools.ant.Target.execute(Target.java:341)
>
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
>
> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>
> at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>
> at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
>
> cutor.java:40)
>
> at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>
> at org.apache.tools.ant.Main.runBuild(Main.java:668)
>
> at org.apache.tools.ant.Main.startAnt(Main.java:187)
>
> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>
> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
>
> Total time: 8 seconds
>
> C:\ant\apache-ant-1.6.5\bin>
>
Received on Tue Feb 21 18:18:34 2006