You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by sarancse <sa...@gmail.com> on 2007/07/10 14:05:49 UTC
Checkout source files from subversion using ANT
Folks
I am working with Red Hat Enterprise Linux environment.
I have installed ANT, subversion client and used the following target to
checkout source files from SVN repository.
<!-- path to the svnant libraries. Usually they will be located in
ANT_HOME/lib -->
<path id="project.classpath">
<pathelement location="${svnant.dir}/svnjavahl.jar" />
<pathelement location="${svnant.dir}/svnant.jar" />
<pathelement location="${svnant.dir}/svnClientAdapter.jar" />
</path>
<!-- load the svn task -->
<taskdef resource="svntask.properties"
classpathref="project.classpath"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<!-- Checkout source code from subversion repository -->
<target name="checkout" description="Pulls code from Subversion into the
build directory">
<svn username="${svn.user.id}" password="${svn.user.password}">
<checkout url="${svn.repository.url}" destPath="${basedir}" />
</svn>
</target>
But I am getting the following error while running the target
Cannot use javahl nor command line svn client
What is the solution to this issue or is there any alternative?
Hope this forum will help many friends.
--
View this message in context: http://www.nabble.com/Checkout-source-files-from-subversion-using-ANT-tf4055403.html#a11519468
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Checkout source files from subversion using ANT
Posted by Wascally Wabbit <wa...@earthling.net>.
If you can use thirdparty libraries try the svn4ant library at
http://antxtras.sf.net/
You could do what you need like so:
<svncheckout username="${svn.user.id}" password="${svn.user.password}"
from="${svn.repository.url}" to="${basedir}"/>
User Guide is at:
http://antxtras.sf.net/Svn4Ant/docs/pdf/Svn4Ant_UserGuide.pdf
-The Wabbit
> sarancse wrote:
> Folks
>
> I am working with Red Hat Enterprise Linux environment.
> I have installed ANT, subversion client and used the following target to
> checkout source files from SVN repository.
> <!-- path to the svnant libraries. Usually they will be located in
> ANT_HOME/lib -->
> <path id="project.classpath">
> <pathelement location="${svnant.dir}/svnjavahl.jar" />
> <pathelement location="${svnant.dir}/svnant.jar" />
> <pathelement location="${svnant.dir}/svnClientAdapter.jar" />
> </path>
> <!-- load the svn task -->
> <taskdef resource="svntask.properties"
> classpathref="project.classpath"/>
> <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
>
> <!-- Checkout source code from subversion repository -->
> <target name="checkout" description="Pulls code from Subversion into the
> build directory">
> <svn username="${svn.user.id}" password="${svn.user.password}">
> <checkout url="${svn.repository.url}" destPath="${basedir}" />
> </svn>
> </target>
>
> But I am getting the following error while running the target
> Cannot use javahl nor command line svn client
>
> What is the solution to this issue or is there any alternative?
> Hope this forum will help many friends.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Checkout source files from subversion using ANT
Posted by sarancse <sa...@gmail.com>.
Thank you Steve. This is working fine.
Steve Loughran wrote:
>
> sarancse wrote:
>> Folks
>>
>> I am working with Red Hat Enterprise Linux environment.
>> I have installed ANT, subversion client and used the following target to
>> checkout source files from SVN repository.
>> <!-- path to the svnant libraries. Usually they will be located in
>> ANT_HOME/lib -->
>> <path id="project.classpath">
>> <pathelement location="${svnant.dir}/svnjavahl.jar" />
>> <pathelement location="${svnant.dir}/svnant.jar" />
>> <pathelement location="${svnant.dir}/svnClientAdapter.jar" />
>> </path>
>> <!-- load the svn task -->
>> <taskdef resource="svntask.properties"
>> classpathref="project.classpath"/>
>> <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
>>
>> <!-- Checkout source code from subversion repository -->
>> <target name="checkout" description="Pulls code from Subversion into the
>> build directory">
>> <svn username="${svn.user.id}" password="${svn.user.password}">
>> <checkout url="${svn.repository.url}" destPath="${basedir}" />
>> </svn>
>> </target>
>>
>> But I am getting the following error while running the target
>> Cannot use javahl nor command line svn client
>>
>
> try seeing if you can run svn on the command line; we just use that in
> our commands, such as when we want to make a branch:
>
> <exec failonerror="true"
> executable="svn">
> <arg value="copy"/>
> <arg value="-r"/>
> <arg value="${svn.revision}"/>
> <arg value="${svn.url}/trunk"/>
> <arg value="${svn.url}/tags/${svn.tag}"/>
> <arg value="-m" />
> <arg value="${svn.message}"/>
> </exec>
>
> the error message you saw implies the svntask would like to see svn on
> the path too...
>
> --
> Steve Loughran http://www.1060.org/blogxter/publish/5
> Author: Ant in Action http://antbook.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Checkout-source-files-from-subversion-using-ANT-tf4055403.html#a11520368
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Checkout source files from subversion using ANT
Posted by Steve Loughran <st...@apache.org>.
sarancse wrote:
> Folks
>
> I am working with Red Hat Enterprise Linux environment.
> I have installed ANT, subversion client and used the following target to
> checkout source files from SVN repository.
> <!-- path to the svnant libraries. Usually they will be located in
> ANT_HOME/lib -->
> <path id="project.classpath">
> <pathelement location="${svnant.dir}/svnjavahl.jar" />
> <pathelement location="${svnant.dir}/svnant.jar" />
> <pathelement location="${svnant.dir}/svnClientAdapter.jar" />
> </path>
> <!-- load the svn task -->
> <taskdef resource="svntask.properties"
> classpathref="project.classpath"/>
> <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
>
> <!-- Checkout source code from subversion repository -->
> <target name="checkout" description="Pulls code from Subversion into the
> build directory">
> <svn username="${svn.user.id}" password="${svn.user.password}">
> <checkout url="${svn.repository.url}" destPath="${basedir}" />
> </svn>
> </target>
>
> But I am getting the following error while running the target
> Cannot use javahl nor command line svn client
>
try seeing if you can run svn on the command line; we just use that in
our commands, such as when we want to make a branch:
<exec failonerror="true"
executable="svn">
<arg value="copy"/>
<arg value="-r"/>
<arg value="${svn.revision}"/>
<arg value="${svn.url}/trunk"/>
<arg value="${svn.url}/tags/${svn.tag}"/>
<arg value="-m" />
<arg value="${svn.message}"/>
</exec>
the error message you saw implies the svntask would like to see svn on
the path too...
--
Steve Loughran http://www.1060.org/blogxter/publish/5
Author: Ant in Action http://antbook.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org