You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Collin VanDyck <co...@hannonhill.com> on 2004/07/09 18:01:26 UTC

Problems using Ant CVS command

Hello,

I'm trying to use Ant (1.5.1) to automate grabbing latest source code 
from our CVS (CVSNT) and I'm running into some problems authenticating.  
Here's my test case that is supposed to 'ls' the latest from my JWebUnit 
package:


    <property name="cvsroot"    
value=":pserver:Administrator@server:/cvsroot"/>
    <property name="cvscommand" value="ls"/>
    <property name="cvssource"    value="."/>
    <property name="cvspass"    value="cvspass"/>
    <property name="cvspackage" value="JWebUnit"/>
   
    <target name="cvs">
        <cvspass cvsroot="${cvsroot}"
            password="password"
            passfile="${cvspass}"
        />
       
        <cvs
            cvsroot="${cvsroot}"
            command="${cvscommand}"
            passfile="${cvspass}"
            package="${cvspackage}"
        />
       
    </target>


This is my target and how I'm trying to test connecting.  The result of 
this target execution is:

cvs:
      [cvs] Using cvs passfile: C:\Java\eclipse3\workspace\JWebUnit\cvspass
      [cvs] cvs ls: Empty password used - try 'cvs login' with a real 
password

      [cvs] cvs [ls aborted]: authorization failed: server server 
rejected access to /cvsroot for user Administrator


I'm guessing that my client cvs.exe does not support  reading from a 
passfile. Indeed, I can't really find an option for specifying that when 
I execute cvs --help-commands or cvs --help-options.

I've tried the cvs.exe that comes with CVSNT, TortoiseCVS, and WinCVS, 
and they all actually seem to be the same binary (they have the same 
file size).  Is there a CVS that I could get for the windows platform 
that would support the use of CVS with ant ?

Or, am I missing something completely obvious?

I searched the mailing lists archives and could not find a solution.  
Someone mentioned that the WinCVS cvs.exe binary works for this case, 
but I tried that with no success. :(

thanks for any help!
Collin





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


Re: Problems using Ant CVS command

Posted by Collin VanDyck <co...@hannonhill.com>.
This worked great, thanks.

One thing is remaining -- I want to, though, be able to automate this so 
that all that has to be done is to run a script that logs in and then 
executes Ant via a .bat file.

I thought maybe I could execute an external shell command via ant to 
perform this login, but I can't seem to redirect standard in to enter 
the password automatically from a file.  In other words, I always have 
to be at the keyboard to enter the password.

If this is outside the scope of this list, that's ok I can look 
elsewhere, just hoping someone has been able to completely automate this 
process using Ant.

Thanks,
Collin


Andrew Craig wrote:

>Prior to running ant, run 'cvs login' on the command prompt from your
>sandbox directory, and enter your password.  This will store the
>password in wherever that version of CVS needs it.
>
>If you need to have the password that way, try using the version of
>cvs that comes with cygwin (http://www.cygwin.com) which does support
>reading the password file that way.
>
>Andrew
>
>
>On Fri, 09 Jul 2004 12:01:26 -0400, Collin VanDyck
><co...@hannonhill.com> wrote:
>  
>
>>Hello,
>>
>>I'm trying to use Ant (1.5.1) to automate grabbing latest source code
>>from our CVS (CVSNT) and I'm running into some problems authenticating.
>>Here's my test case that is supposed to 'ls' the latest from my JWebUnit
>>package:
>>
>>    <property name="cvsroot"
>>value=":pserver:Administrator@server:/cvsroot"/>
>>    <property name="cvscommand" value="ls"/>
>>    <property name="cvssource"    value="."/>
>>    <property name="cvspass"    value="cvspass"/>
>>    <property name="cvspackage" value="JWebUnit"/>
>>
>>    <target name="cvs">
>>        <cvspass cvsroot="${cvsroot}"
>>            password="password"
>>            passfile="${cvspass}"
>>        />
>>
>>        <cvs
>>            cvsroot="${cvsroot}"
>>            command="${cvscommand}"
>>            passfile="${cvspass}"
>>            package="${cvspackage}"
>>        />
>>
>>    </target>
>>
>>This is my target and how I'm trying to test connecting.  The result of
>>this target execution is:
>>
>>cvs:
>>      [cvs] Using cvs passfile: C:\Java\eclipse3\workspace\JWebUnit\cvspass
>>      [cvs] cvs ls: Empty password used - try 'cvs login' with a real
>>password
>>
>>      [cvs] cvs [ls aborted]: authorization failed: server server
>>rejected access to /cvsroot for user Administrator
>>
>>I'm guessing that my client cvs.exe does not support  reading from a
>>passfile. Indeed, I can't really find an option for specifying that when
>>I execute cvs --help-commands or cvs --help-options.
>>
>>I've tried the cvs.exe that comes with CVSNT, TortoiseCVS, and WinCVS,
>>and they all actually seem to be the same binary (they have the same
>>file size).  Is there a CVS that I could get for the windows platform
>>that would support the use of CVS with ant ?
>>
>>Or, am I missing something completely obvious?
>>
>>I searched the mailing lists archives and could not find a solution.
>>Someone mentioned that the WinCVS cvs.exe binary works for this case,
>>but I tried that with no success. :(
>>
>>thanks for any help!
>>Collin
>>
>>---------------------------------------------------------------------
>>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


Re: Problems using Ant CVS command

Posted by Andrew Craig <an...@gmail.com>.
Prior to running ant, run 'cvs login' on the command prompt from your
sandbox directory, and enter your password.  This will store the
password in wherever that version of CVS needs it.

If you need to have the password that way, try using the version of
cvs that comes with cygwin (http://www.cygwin.com) which does support
reading the password file that way.

Andrew


On Fri, 09 Jul 2004 12:01:26 -0400, Collin VanDyck
<co...@hannonhill.com> wrote:
> Hello,
> 
> I'm trying to use Ant (1.5.1) to automate grabbing latest source code
> from our CVS (CVSNT) and I'm running into some problems authenticating.
> Here's my test case that is supposed to 'ls' the latest from my JWebUnit
> package:
> 
>     <property name="cvsroot"
> value=":pserver:Administrator@server:/cvsroot"/>
>     <property name="cvscommand" value="ls"/>
>     <property name="cvssource"    value="."/>
>     <property name="cvspass"    value="cvspass"/>
>     <property name="cvspackage" value="JWebUnit"/>
> 
>     <target name="cvs">
>         <cvspass cvsroot="${cvsroot}"
>             password="password"
>             passfile="${cvspass}"
>         />
> 
>         <cvs
>             cvsroot="${cvsroot}"
>             command="${cvscommand}"
>             passfile="${cvspass}"
>             package="${cvspackage}"
>         />
> 
>     </target>
> 
> This is my target and how I'm trying to test connecting.  The result of
> this target execution is:
> 
> cvs:
>       [cvs] Using cvs passfile: C:\Java\eclipse3\workspace\JWebUnit\cvspass
>       [cvs] cvs ls: Empty password used - try 'cvs login' with a real
> password
> 
>       [cvs] cvs [ls aborted]: authorization failed: server server
> rejected access to /cvsroot for user Administrator
> 
> I'm guessing that my client cvs.exe does not support  reading from a
> passfile. Indeed, I can't really find an option for specifying that when
> I execute cvs --help-commands or cvs --help-options.
> 
> I've tried the cvs.exe that comes with CVSNT, TortoiseCVS, and WinCVS,
> and they all actually seem to be the same binary (they have the same
> file size).  Is there a CVS that I could get for the windows platform
> that would support the use of CVS with ant ?
> 
> Or, am I missing something completely obvious?
> 
> I searched the mailing lists archives and could not find a solution.
> Someone mentioned that the WinCVS cvs.exe binary works for this case,
> but I tried that with no success. :(
> 
> thanks for any help!
> Collin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


-- 
Andrew

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


Re: Problems using Ant CVS command

Posted by Ivan Ivanov <ra...@yahoo.com>.
--- Juergen.Melzer@betasystems.com wrote: 
> Don't forget that cvsnt stroes the cvspass in the
> registry.

I think I do not understand you. I used to use CVSNT
as a cvs server plus WinCVS as a cvs client and I am
100% sure that WinCVS allows changing of the .cvspass
file location from WinCVS Preferences->HOME folder:
http://www.wincvs.org/winhtml/wincvs11.htm#_Toc453646178.

CVSNT might stores .cvspas in registry, but you are
not bound to use that .cvspass.

Regards Ivan

P.S. Here is a simple ant script that uses different
.cvspass files (not tested)

<property name="apache.cvspass"
value="C:\apache\.cvspass"/>
<property name="apache.cvsroot"
value=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"/>
<cvspass cvsroot="${apache.cvsroot}"
    password="anoncvs" passfile="${apache.cvspass}"/>
<cvs cvsRoot="${apache.cvsroot}"
passfile="${apache.cvspass}" package="ant"
dest="C:\apache\ant"
/>

<property name="sourceforge.cvspass"
value="C:\sf\.cvspass"/>
<property name="sf.cvsroot"
value=":pserver:anonymous@cvs.sourceforge.net:/cvsroot/blah/>
<cvspass cvsroot="${sf.cvsroot}"
    password="" passfile="${sourceforge.cvspass}"/>
<cvs cvsRoot="${sf.cvsroot}" passfile="${sf.cvspass}"
package="blahblah" dest="C:\sf\blahblah"
/>


		
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/


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


Re: Problems using Ant CVS command

Posted by Ju...@betasystems.com.



Don't forget that cvsnt stroes the cvspass in the registry.

Regards,
Juergen Melzer



                                                                           
             Ivan Ivanov                                                   
             <rambiusparkisani                                             
             us@yahoo.com>                                              To 
                                       Ant Users List                      
             19.07.2004 11:00          <us...@ant.apache.org>               
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
             "Ant Users List"          Re: Problems using Ant CVS command  
             <user@ant.apache.                                             
                   org>                                                    
                                                                           
                                                                           
                                                                           
                                                                           




--- Johan Vromans CPWR
<jo...@nl.compuware.com> wrote:
> Ivan Ivanov wrote:
> > I think <property name="cvspass" value="cvspass"/>
> > must be <property name="cvspass"
> value=".cvspass"/>
> >
> > CVS usually stores its passwords in .cvspass files
>
> ... which is located in your HOME directory, not in
> the current directory.

By default CVS stores the password in $HOME/.cvspass.
but location of .cvspass can be changed with Ant:
<cvs command="-q diff -u -N" output="patch.txt"
passfile=${cvspass}/>,
and you can set cvspass property to point whereever
you like.

I also sure that .cvspass location can be changed
using clients like WinCVS and maybe LinCVS, but I do
not know how this can be done with the command-line
client. A quick google found this thread[1] (pretty
old however but mentions Ant) about changing .cvspass
location.

Regards Ivan

[1]http://lists.gnu.org/archive/html/info-cvs/2002-02/msg00099.html
>
> -- Johan
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
>




__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/


---------------------------------------------------------------------
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


Re: Problems using Ant CVS command

Posted by Ivan Ivanov <ra...@yahoo.com>.
--- Johan Vromans CPWR
<jo...@nl.compuware.com> wrote:
> Ivan Ivanov wrote:
> > I think <property name="cvspass" value="cvspass"/>
> > must be <property name="cvspass"
> value=".cvspass"/>
> > 
> > CVS usually stores its passwords in .cvspass files
> 
> ... which is located in your HOME directory, not in
> the current directory.

By default CVS stores the password in $HOME/.cvspass.
but location of .cvspass can be changed with Ant:
<cvs command="-q diff -u -N" output="patch.txt"
passfile=${cvspass}/>,
and you can set cvspass property to point whereever
you like.

I also sure that .cvspass location can be changed
using clients like WinCVS and maybe LinCVS, but I do
not know how this can be done with the command-line
client. A quick google found this thread[1] (pretty
old however but mentions Ant) about changing .cvspass
location.

Regards Ivan

[1]http://lists.gnu.org/archive/html/info-cvs/2002-02/msg00099.html
> 
> -- Johan
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/


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


Re: Problems using Ant CVS command

Posted by Johan Vromans CPWR <jo...@nl.compuware.com>.
Ivan Ivanov wrote:
> I think <property name="cvspass" value="cvspass"/>
> must be <property name="cvspass" value=".cvspass"/>
> 
> CVS usually stores its passwords in .cvspass files

... which is located in your HOME directory, not in the current directory.

-- Johan

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


Re: Problems using Ant CVS command

Posted by Ivan Ivanov <ra...@yahoo.com>.
I think <property name="cvspass" value="cvspass"/>
must be <property name="cvspass" value=".cvspass"/>

CVS usually stores its passwords in .cvspass files

--- Collin VanDyck <co...@hannonhill.com> wrote:
> Hello,
> 
> I'm trying to use Ant (1.5.1) to automate grabbing
> latest source code 
> from our CVS (CVSNT) and I'm running into some
> problems authenticating.  
> Here's my test case that is supposed to 'ls' the
> latest from my JWebUnit 
> package:
> 
> 
>     <property name="cvsroot"    
> value=":pserver:Administrator@server:/cvsroot"/>
>     <property name="cvscommand" value="ls"/>
>     <property name="cvssource"    value="."/>
>     <property name="cvspass"    value="cvspass"/>
>     <property name="cvspackage" value="JWebUnit"/>
>    
>     <target name="cvs">
>         <cvspass cvsroot="${cvsroot}"
>             password="password"
>             passfile="${cvspass}"
>         />
>        
>         <cvs
>             cvsroot="${cvsroot}"
>             command="${cvscommand}"
>             passfile="${cvspass}"
>             package="${cvspackage}"
>         />
>        
>     </target>
> 
> 
> This is my target and how I'm trying to test
> connecting.  The result of 
> this target execution is:
> 
> cvs:
>       [cvs] Using cvs passfile:
> C:\Java\eclipse3\workspace\JWebUnit\cvspass
>       [cvs] cvs ls: Empty password used - try 'cvs
> login' with a real 
> password
> 
>       [cvs] cvs [ls aborted]: authorization failed:
> server server 
> rejected access to /cvsroot for user Administrator
> 
> 
> I'm guessing that my client cvs.exe does not support
>  reading from a 
> passfile. Indeed, I can't really find an option for
> specifying that when 
> I execute cvs --help-commands or cvs --help-options.
> 
> I've tried the cvs.exe that comes with CVSNT,
> TortoiseCVS, and WinCVS, 
> and they all actually seem to be the same binary
> (they have the same 
> file size).  Is there a CVS that I could get for the
> windows platform 
> that would support the use of CVS with ant ?
> 
> Or, am I missing something completely obvious?
> 
> I searched the mailing lists archives and could not
> find a solution.  
> Someone mentioned that the WinCVS cvs.exe binary
> works for this case, 
> but I tried that with no success. :(
> 
> thanks for any help!
> Collin
> 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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