This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes cvs problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "cvs problem" Watch "cvs problem" New topic

cvs problem

Nijeesh Balan
Ranch Hand

Joined: Oct 09, 2000
Posts: 116
Hi All,
Whenever I try to execute any "CVS" commands from Ant(v1.5.3) it fails with an errorcode of 2. When I copy paste the same command into WinCVS it gets executed successfully. Am I missing something?
one of the sample commands which i tried is...

Any hints would be really helpful !!
[ April 28, 2003: Message edited by: Nijeesh BH ]

Thanks & Regards,<br />Nijeesh.
Greg Charles

Joined: Oct 01, 2001
Posts: 2969

Other than the smiley, and you typed destdir when you probably meant dest, the syntax seems to be fine. It's possible that you need to authorize yourself to access the archive. Take a look at the cvsPass task. I have to admit, though, I've never accessed a password-protected CVS archive through Ant. Let us know how you get it working! (If you do. )
joe abate

Joined: Feb 17, 2003
Posts: 7
When you use winCVs you are all ready logged into the cvs server that is why the command works. When you use the cvs tags in ant you are not logged into cvs Here is a line from one of my build files and it works just fine. under ant 1.5
<cvs command="checkout -r${cvs.tag}" package="xxx" dest="${checkout.dir}" cvsroot="${cvs.root}"
passfile="${cvs.passfile}/.cvspass" />
cvs.tag the tag number you want to get
checkout.dir the root location location you want to put it Ie. c:\work
cvs.root the root of the cvs server Ie. server:${cvs.username}@cvsserver:/var/cvsrepos"
cvs.passfile is the location of the .cvspass file fore the user you are going to use. Ie C:\
cvs.username the user you want to use.
you need to generate a .cvspass file from cvs for the cvs user you want to use with the build.
Nijeesh Balan
Ranch Hand

Joined: Oct 09, 2000
Posts: 116
Sorry guys it was my blunder. I din't think i had to install cvs command line tool.
Now I just installed the latest version of the exe and renamed that exe to cvs.exe and it started working after adding it to the path variable.
Thanks for your inputs.
Madana Tamisetty

Joined: Feb 16, 2004
Posts: 1
I had a similar problem exceuting cvs tasks. I had to give the path to cvs.exe is the PATH variable on windowsNT. It started working from then.
Ty this, it might help you.
I agree. Here's the link:
subject: cvs problem
It's not a secret anymore!