You can set the CVSROOT via the <cvs> task, but what you cannot do is
set CVS_RSH environment variable which is needed to point to your ssh
command that you're using to access CVS.

The only way around this is to execute CVS via the <exec> <task>. The
<exec> task allows you to set environment variables and then run the
executable command.

This might sound like an awful way to handle CVS --- especially since
there is a <cvs> task in Ant. However, that CVS task basically calls
the CVS command directly anyway. CVS doesn't have an API, so almost
all CVS aware programs call CVS directly via an internal "exec".

So, you can do something like this:

<exec executable="cvs">
    <env key="CVS_RSH" value="/usr/bin/ssh"/>
    <env key="CVSROOT"
value="ext:${cvs.user}:${cvs.pass...@${cvs.server}:${cvsroot.dir}"/>
    <arg value="co"/>
    <arg value="${cvs.project}"/>
</exec>

On Mon, Mar 30, 2009 at 12:43 PM, Michael Hüttermann
<mich...@huettermann.net> wrote:
> Hello,
>
> what is the recommended way to connect CVS via SSH using Ant ?
>
> Thank you !
>
>
> Regards
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
>
>



-- 
--
David Weintraub
qazw...@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to