ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject Providing input with <exec> to CVS login
Date Fri, 06 May 2005 20:01:00 GMT
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>

<?xml version="1.0"?>
  <exec executable="cvs" failonerror="true">
    <arg line="-d login" />

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

Total time: 12 seconds
ddevienne@gocad build> ant -f login.xml
Buildfile: login.xml
CVS password: Logging in to

cvs login: authorization failed: server rejected access to
/cvs/baz for user baz

/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
CVS password:
Terminate batch job (Y/N)? y


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message