Problem running CVS via Ant

N

NullBock

I'm trying to do a simple checkout from CVS via ant; my target looks
like this:

<target name="func">
<cvs command="-Q checkout -P MyProject"/>
</target>

Running this returns an "authorization failed" error, with CVS saying
I need to login. The following works from the command line, however:

cvs -Q checkout -P MyProject

when called from the same directory from which I called the Ant
script.

I'm using Ant 1.5.3-1 on a Windows 2000 (sp1) machine. The ANT_HOME
and JAVA_HOME variables are properly set. The script works fine on
other machines.

Any ideas? TIA

Walter Gildersleeve
Freiburg, Germany
emai1: contact AT springbock.net
 
G

Greg Larkin

I'm trying to do a simple checkout from CVS via ant; my target looks
like this:

<target name="func">
<cvs command="-Q checkout -P MyProject"/>
</target>

Running this returns an "authorization failed" error, with CVS saying
I need to login. The following works from the command line, however:

cvs -Q checkout -P MyProject

when called from the same directory from which I called the Ant
script.

I'm using Ant 1.5.3-1 on a Windows 2000 (sp1) machine. The ANT_HOME
and JAVA_HOME variables are properly set. The script works fine on
other machines.

Any ideas? TIA

Walter Gildersleeve
Freiburg, Germany
emai1: contact AT springbock.net

Hi Walter,

My guess is that the environment that Ant is using does not have the
HOMEDRIVE and HOMEPATH variables set for some reason. Looking into
the CVS source code indicates that both of these variables need to be
set so that CVS can find the .cvspass file, which is where your cached
password is stored.

Run this command in a DOS window:

set | find "HOME"

That will tell you what your HOMEDRIVE and HOMEPATH variables are set
to. Then make sure Ant has those same values in its environment.
It's been a little while since I used Ant, but there might be a task
that you can use to manually set environment variables from build.xml,
if you have to do it that way.

Hope that helps,
Greg Larkin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top