ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Burgess <li...@vtgroup.com>
Subject RE: Checking out with CVS_RSH=ssh using ant
Date Wed, 25 May 2005 16:06:46 GMT
Since at least one other person is interested, here are the steps I went
through.  Two personal caveats: 

* My client OS is Windows XP.

* I use Pageant for SSH authentication, so it will change your authentication
process if you don't.  (Tip: If you end up using Pageant, and you want it to
always start at boot time, add a shorcut like the following to your Startup
folder: "C:\Putty\PAGEANT.EXE C:\CVS\private.ppk").

(1) Download CVS from "http://www.cvshome.org/" and install.  *** IMPORTANT ***:
There is a bug in the 1-12-x codebase that keeps :ext: over SSH from working.
Make sure you install a 1-11-x version. 

(2) Download Putty from "www.chiark.greenend.org.uk/~sgtatham/putty/" and
install Putty, Plink, (and Pageant).

(3) I've got all of the following environment variables defined:

set JAVA_HOME=...
set ANT_HOME=...
set PUTTY_HOME=...
set CVS_HOME=...
set CVSROOT=:ext:<username>@<server>:<path>
set CVS_RSH=plink
set PLINK_PROTOCOL=ssh
set PATH=%PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;%PUTTY_HOME%;%CVS_HOME%
set CLASSPATH=.;%CLASSPATH%;%JAVA_HOME%\lib;%ANT_HOME%\lib\ant.jar

(4) You should now be able to run CVS from the command line e.g.

D:\Project1>cvs log build.xml

Or from an Ant script e.g.

<cvs command="checkout -d ${name} -r ${label} ${path}" />

Let me know if you have any problems with this, in case I missed a step.

Jay

| Jay Burgess [Vertical Technology Group]
| "Essential Technology Links via RSS"
| http://www.vtgroup.com/
-----Original Message-----
From: Jay Burgess [mailto:lists@vtgroup.com] 
Sent: Wednesday, May 25, 2005 11:36 AM
To: user@ant.apache.org
Subject: RE: Checking out with CVS_RSH=ssh using ant

Todd,

I just implemented something similar this weekend, though our techniques
are
different.  I used command-line CVS in conjunction with Putty to
directly access
CVS from Windows (XP), without the need for CYGWIN.

If this option might be of interest, let me know and I'll provide the
details.

Jay

| Jay Burgess [Vertical Technology Group]
| "Essential Technology Links via RSS"
| http://www.vtgroup.com/

-----Original Message-----
From:  Todd Nine <todd.nine () gmail ! com>
Sent: 2005-05-24 22:04:32
Subject: Checking out with CVS_RSH=ssh using ant

Hi all,
I'm trying to execute an ant target that checks out server configuration

files and uploads them to all of the nodes in a cluster. I have the
upload 
part working if I pull the configurations down from CVS manually, but I 
can't seem to get the cvs task to work correctly. Here is my cvs task.

<!-- check out over ssh -->
<target name="cvscheckout">
<property name="cvsroot" value=":ext:${username}@${cvs.server}:${
cvs.repository.base}"/>
<property name="cvspass" value="temp"/>
<echo>cvsroot ${cvsroot}</echo>
<!-- set our password temporarily , 99.9% sure this is completely
useless 
when CVS_RSH = ssh-->
<cvspass cvsroot="${cvsroot}"
password="${password}"
passfile="${cvspass}"
/>

<echo>checking out from ${cvs.repository}/${environment}</echo>
<echo>environment ${environment}</echo>
<cvs cvsRoot="${cvsroot}"

package="${cvs.repository}"
dest="${environment}"
passfile="${cvspass}"
cvsrsh="ssh"
port="22"

/>

<delete file="temp"/>
</target>

Below is the verbose output from the ssh task.

cvscheckout:
[echo] cvsroot :ext:testuser@foo.bar.com:/a01/proj/CVS
[echo] checking out from serverconfig/atatest
[echo] environment atatest
[cvs] Using cvs passfile: C:\serverconfig\serverconfig\script\temp
[cvs] Executing 'cvs' with arguments:
[cvs] '-d:ext:testuser@foo.bar.com:/a01/proj/CVS'
[cvs] 'checkout'
[cvs] 'serverconfig'
[cvs]
[cvs] The ' characters around the executable and arguments are
[cvs] not part of the command.
[cvs]
[cvs]
[cvs] environment:
[cvs]
[cvs] ALLUSERSPROFILE=C:\Documents and Settings\All Users
[cvs] ANT_HOME=c:/serverconfig/serverconfig/script/apache-ant-1.6.4
[cvs] APPDATA=C:\Documents and Settings\c200506\Application Data
[cvs] COMMONPROGRAMFILES=C:\Program Files\Common Files
[cvs] COMPUTERNAME=PC2888
[cvs] COMSPEC=C:\WINNT\system32\cmd.exe
[cvs] HOME=c:\Documents and Settings\c200506
[cvs] HOMEDRIVE=C:
[cvs] HOMEPATH=\
[cvs] HOSTNAME=PC2888
[cvs] 
INFOPATH=/usr/local/info:/usr/info:/usr/share/info:/usr/autotool/devel/i
nfo:/usr/autot
\
ool/stable/info: [cvs] JAVA_HOME=c:/appdev/jvm/jdk-1.4
[cvs] LOGONSERVER=\\INNT-35
[cvs] MAKE_MODE=unix
[cvs] 
MANPATH=/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man::
/usr/ssl/man
[cvs] NODE_ID=000BCDB207C6
[cvs] NUMBER_OF_PROCESSORS=1
[cvs] NWLANGUAGE=ENGLISH
[cvs] NWUSERNAME=c200506
[cvs] OLDPWD=/cygdrive/c/serverconfig/serverconfig
[cvs] OS2LIBPATH=C:\WINNT\system32\os2\dll;
[cvs] OS=Windows_NT
[cvs] 
PATH=C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\cygwin\bin;C:\cygwin\usr\X
11R6\bin;c:\WI
\
NNT\system32;c:\WINNT;c:\WINNT\System32\Wbem;c:\WINNT\system32\nls;c:\WI
NNT\system32\n
\
ls\ENGLISH;c:\appdev\jvm\jdk- \
1.4\bin;Z;.\;Y;.\;X;.\;.\;c:\serverconfig\serverconfig\script\apache-
ant-1.6.4\bin
[cvs] PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
[cvs] PRINTER=\\AMTRAN\IN_Y2K_HPLJ4000-PRT1.IS.IN.ATA
[cvs] PROCESSOR_ARCHITECTURE=x86
[cvs] PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 7,
GenuineIntel
[cvs] PROCESSOR_LEVEL=15
[cvs] PROCESSOR_REVISION=0207
[cvs] PROGRAMFILES=C:\Program Files
[cvs] PROMPT=$P$G
[cvs] PS1=\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$
[cvs] PWD=/cygdrive/c/serverconfig/serverconfig/script
[cvs] SHLVL=1
[cvs] SYSTEMDRIVE=C:
[cvs] SYSTEMROOT=C:\WINNT
[cvs] TEMP=c:\DOCUME~1\c200506\LOCALS~1\Temp
[cvs] TERM=cygwin
[cvs] TMP=c:\DOCUME~1\c200506\LOCALS~1\Temp
[cvs] USER=c200506
[cvs] USERDOMAIN=ATA_COM
[cvs] USERNAME=c200506
[cvs] USERPROFILE=C:\Documents and Settings\c200506
[cvs] USER_ID=c200506
[cvs] WINDIR=C:\WINNT
[cvs] WINDOWS_LOGIN=0
[cvs] _=./pushconfig.sh
[cvs] CVS_CLIENT_PORT=22
[cvs] CVS_PASSFILE=C:\serverconfig\serverconfig\script\temp
[cvs] CVS_RSH=ssh

Nothing ever happens, it just hangs forever. Has anyone done this 
successfully?





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






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


Mime
View raw message