ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey N. Solofnenko" <A.Solofne...@mdl.com>
Subject Re: Providing input with <exec> to CVS login
Date Fri, 06 May 2005 20:04:38 GMT
Not directly related to your problem, but "cvs login" needs to be 
executed only once. Why do you want to run it from ANT?

- Alexey.

Dominique Devienne wrote:

>Suppose I want to CVS login to a bunch of CVS repos. I've written a XSL
>that generates one target per-repo using code similar to the <exec>
>below.
>
><?xml version="1.0"?>
><project>
>  <exec executable="cvs" failonerror="true">
>    <arg line="-d :pserver:foo@bar.lgc.com:/cvs/baz login" />
>  </exec>
></project>
>
>If I run this on Linux, it works! I.e. I type in the CVS password (which
>is not echo'd on the screen BTW), press return, and I get build
>successful. The output is a bit garbled, i.e. the prompt for the
>password is followed by the info string that should be above. Appendix A
>shows the actual output.
>
>The same script on Windows, OTOH, doesn't work. I get the info message,
>but whatever I type, nothing happens, and only when I CTRL-C Ant does
>the 'CVS password: ' prompt appears, but it's too late. I tried both
>terminate yes or no, to no avail.
>
>I then tried to <input> the password (which appears clear text, but I
>can live with that...), but then there's no way I can find to pass that
>to the CVS login process. Which is confirmed on the command line
>independently of Ant, as neither "echo cvspass | cvs -d CVSROOT login"
>nor "cvs -d CVSROOT login < cvspassinsidefile" works.
>
>So my question is two fold:
>1) How comes it works on Linux and not Windows?
>2) Is there any way to do a CVS login using Ant
>   (that forks cvs) that would work across platform
>   (assuming the cvs executable is in the path)
>
>Any insight would be appreciated. Thanks, --DD
>
>PS: Didn't someone do something about input Handling in Ant CVS?
>    Does that go into Ant 1.6.4? And any chance it would held here?
>
>--- Appendix A: providing good and bad password on Linux ---
>ddevienne@gocad build> ant -f login.xml
>Buildfile: login.xml
>CVS password: Logging in to :pserver:foo@bar.lgc.com:2401/cvs/baz
>
>
>BUILD SUCCESSFUL
>Total time: 12 seconds
>ddevienne@gocad build> ant -f login.xml
>Buildfile: login.xml
>CVS password: Logging in to :pserver:foo@bar.lgc.com:2401/cvs/baz
>
>cvs login: authorization failed: server bar.lgc.com rejected access to
>/cvs/baz for user baz
>
>BUILD FAILED
>/export/home/ddevienne/login.xml:3: exec returned: 1
>
>Total time: 4 seconds
>ddevienne@gocad build>
>
>
>--- Appendix B: Trying to CVS login on Windows ---
>P:\com_lgc>ant -f login.xml
>Buildfile: login.xml
>Logging in to :pserver:foo@bar.lgc.com:2401/cvs/baz
>CVS password:
>Terminate batch job (Y/N)? y
>
>P:\com_lgc>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>  
>

-- 
------------------------------------------------------------------------
/ Alexey N. Solofnenko
home: http://trelony.cjb.net/
/

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


Mime
View raw message