Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-24-2008, 12:21 PM
|
#1
|
Member
Registered: Jul 2005
Posts: 144
Rep:
|
cvs checkout with Ant
I'm using ant 1.7 and winCVS 1.3. What's wrong with this ant task?
<cvs command="checkout -APR" package="path_to_package_i_want_checked_out" dest="where_i_want_it_to_check_out_to" />
I get CreateProcess error=2
I am using syntax from ant's site: http://ant.apache.org/manual/CoreTasks/cvs.html
I logged into cvs using:
<cvspass cvsroot="my_cvsroot" password="my_password" />
Last edited by ShaqDiesel; 10-24-2008 at 12:23 PM.
|
|
|
10-24-2008, 01:19 PM
|
#2
|
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Rep:
|
From the link you mentioned, http://ant.apache.org/manual/CoreTasks/cvs.html:
Quote:
Important: This task needs "cvs" on the path. If it isn't, you will get an error (such as error 2 on windows). If cvs doesn't work, try to execute cvs.exe from the command line in the target directory in which you are working.
|
|
|
|
10-24-2008, 01:58 PM
|
#3
|
Member
Registered: Jul 2005
Posts: 144
Original Poster
Rep:
|
C:\Program Files\GNU\WinCvs 1.3\wincvs.exe is in my windows path environment variable(start-->my computer properties--->advanced-->environment variables). I also set it to my session PATH environment variable
If ant can't communicate with cvs, then it would have thrown an exception before checkout, when I tried logging in right?
|
|
|
10-24-2008, 02:08 PM
|
#4
|
Member
Registered: Jul 2005
Posts: 144
Original Poster
Rep:
|
I noticed that windows doesnt recognize "wincvs.exe" when I enter it on my current directory. I must not be setting my path variable correctly:
1.for OS environment variable: my computer properties-->advanced-->environment variables-->added "C:\Program Files\GNU\WinCVS 1.3\wincvs.exe" to Path system variable
2.for session environment variable: in my current directory on the windows command line: "set Path=C:\Program Files\GNU\WinCVS 1.3\wincvs.exe"
What is the correct way to set my path? Thanks in advance.
|
|
|
10-24-2008, 02:26 PM
|
#5
|
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Rep:
|
Dude - did you try to execute "cvs" from a command prompt, like the manual suggested?
"ant" isn't looking for "wincvs.exe" - it's looking for "cvs". And that's fine - you'll often need all of "CVS", "WinCVS/NT", Python and a bunch of other stuff in a typical "CVS" environment for Windows.
"Ant" should work fine. "Ant" from Eclipse or Netbeans should work fine even *without* any separate WinCVS install. And WinCVS should work fine with Ant ... if you have the right components, and set your %PATH% correctly (either session *or* system path is fine - you don't have to be duplicate redundant about it).
PS:
I didn't notice your second post.
You will have several CVS related things in your %PATH%, but this is the most important one on my Windows PC:
"C:\PROGRA~1\cvsnt;"
PPS:
Your path entry is actually:
GOOD:
"C:\Program Files\GNU\WinCVS 1.3;",
and *not*
BAD:
"C:\Program Files\GNU\WinCVS 1.3\wincvs.exe".
Right?
Last edited by paulsm4; 10-24-2008 at 02:30 PM.
|
|
|
10-24-2008, 02:30 PM
|
#6
|
Member
Registered: Jul 2005
Posts: 144
Original Poster
Rep:
|
I changed the path both "Path" variables to C:\Program Files\GNU\WinCvs 1.3\CVSNT\cvs.exe but it still doesn't work.
|
|
|
10-24-2008, 02:41 PM
|
#7
|
Member
Registered: Jul 2005
Posts: 144
Original Poster
Rep:
|
I fixed it by doing this in windows cmd:
set Path=C:\Program Files\GNU\WinCvs 1.3\CVSNT\cvs.exe;C:\Program Files\GNU\WinCvs 1.3\CVSNT\;C:\Program Files\GNU\WinCvs 1.3\CVSNT
|
|
|
10-24-2008, 03:51 PM
|
#8
|
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Rep:
|
BAD:
Quote:
Path=C:\Program Files\GNU\WinCvs 1.3\CVSNT\cvs.exe;C:\Program Files\GNU\WinCvs 1.3\CVSNT\;C:\Program Files\GNU\WinCvs 1.3\CVSNT
|
GOOD:
Quote:
Path=C:\Program Files\GNU\WinCvs 1.3\CVSNT;
|
EXPLANATION:
Quote:
Path=
<= "set path" and "path" are equivalent (but *only* for the "special variable" %PATH%)
C:\Program Files\GNU\WinCvs 1.3\CVSNT\cvs.exe;
<= WRONG: you don't put files (like "wincvs.exe") in your path - only directories!
C:\Program Files\GNU\WinCvs 1.3\CVSNT\;
<= GOOD!
C:\Program Files\GNU\WinCvs 1.3\CVSNT
<= WRONG: this is duplicate!
(You can add the trailing slash, or leave it out. Either choice is OK. There are pros/cons either way, but they're basically equivalent)
|
Last edited by paulsm4; 10-24-2008 at 03:55 PM.
|
|
|
10-24-2008, 05:10 PM
|
#9
|
Member
Registered: Jul 2005
Posts: 144
Original Poster
Rep:
|
LOL thanks man, you've been really helpful. I appreciate your explanations.
|
|
|
All times are GMT -5. The time now is 07:40 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|