Judy:

I can confirm that your CVS Archive does rest on a Unix machine
because the CVS Root is in a Unix format. However, that really
shouldn't make much difference.

I did find this little notice in the <cvs> task definition:

CVSNT Note: CVSNT prefers users to store the passwords inside the
registry. If the cvspass task and the passfile attribute don't seem to
work for you, the most likely reason is that CVSNT ignores your
.cvspass file completely. See bugzilla report 21657 for recommended
workarounds.

If you're executing on Windows, this may be a problem. I find that I
have to embed the CVS password inside my CVSROOT (yuck!).

The other thing is that I don't use the <cvs-checkout> command.
Instead, I use the <cvs> command and give it the "command" parameter:

<cvs
    command="checkout"
    cvsroot="${cvsroot}"
    dest="${cvs.dest.dir}"
    package="${cvs.package}"/>

You're gettina a "File exists" error which happens when a file you're
checking out already exists in the directory where you're checking
everything out.

Normally, you don't do a CVS checkout in Ant. After all, you don't get
the build.xml file until you do the initial checkout. Instead, you
should try the "update" command:

<cvs
    command="update"
    dest="${cvs.dest.dir}"/>

This will keep your working directory and only update the newer files.
It also won't change files that you've already modified. Instead, it
will merge your changes into the newer versions. If this isn't what
you want, you need to add the "-C" command line parameter to the <cvs>
task:

<cvs
    command="update -C"
    dest="${cvs.dest.dir}"/>

This will move your changes to .#filename.1.2.3.4 and then checkout a
clean copy of the file. Most likely, this isn't what you want.

My suggestion is to use the <cvs command="update"> without the "-C"
argument in your task.

On Dec 24, 2007 3:52 PM, Judy Anderson <[EMAIL PROTECTED]> wrote:
> I am a new user of ANT, and the first problem I've been unable to solve on my 
> own is a CVS problem.  (I didn't construct the build.xml file myself; I was 
> handed an incomplete project, on which I'm trying to come up to speed.)
>
>    <property name="cvs.quiet" value="true"/>
>    <macrodef name="cvs-checkout">
>     <attribute name="package"/>
>     <sequential>
>      <cvs cvsRoot=":pserver:[EMAIL PROTECTED]:/cvs/kbm" 
> passfile="${env.CVS_PASSFILE}" package="@{package}" failonerror="true" 
> output="@{package}.cvs.log" quiet="${cvs.quiet}"/>
> ...
>
>   <target name="cvs-checkout-bundle">
>     <cvs-checkout package="bundle"/>
>   </target>
>
> Results in:
>       [cvs] cvs [checkout aborted]: cannot rename file .new.emp-common.jar to 
> emp-common.jar: File exists
>
> BUILD FAILED
>
> However, when I use CVS update directly it works just fine.
>
> The mentioned log file has a nice U line for the mentioned file (though as 
> you see it didn't fully get updated.)  I passed in -Dcvs.quiet=false but that 
> just showed me "[cvs] cvs checkout: Updating" lines for each prior directory, 
> as one would expect.
>
> Searching for similar error messages found me other people who had cannot 
> renames with Permission Denied, but that's not my problem.  One person with 
> CVS problems recommended using an EXEC task instead, which I'm considering, 
> but wanted to see if there was any suggestion to how to debug this using the 
> CVS task.
>
> Extremely strangely, .java files got updated when I ran it on a different 
> package.  Now, unfortunately, I can't make spurious changes to the repository 
> in order to experiment to fins out if it's only .jars, or only THAT .jar, or 
> whatever.  But it's very worrisome to have an unexplained failure in the 
> build -- when this stuff goes live it'll be very bad to have it break at 
> midnight like this!
>
> I'm using Windows XP; I think the CVS repository is on a unix machine, but I 
> don't honestly know (and I don't have access to that machine).  I have Ant 
> 1.7.0.  What could have gone wrong with the CVS task, and what can I do to 
> get more information about the problem?  I hate mysterious messages!
>
> Judy Anderson
> Rocket Software
> [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
--
David Weintraub
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to