ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: CVS with SSH
Date Mon, 30 Mar 2009 18:30:12 GMT
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.passwd}@${cvs.server}:${cvsroot.dir}"/>
    <arg value="co"/>
    <arg value="${cvs.project}"/>
</exec>

On Mon, Mar 30, 2009 at 12:43 PM, Michael Hüttermann
<michael@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-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
--
David Weintraub
qazwart@gmail.com

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


Mime
View raw message