ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Judy Anderson <JAnder...@rocketsoftware.com>
Subject RE: CVS task failure: cannot rename
Date Tue, 25 Dec 2007 21:50:49 GMT
I have done some more experimentation with my problem.  It only happens on binary files (flag
"-kb").  CVS is doing a different kind of update that involves delete/rename.  I tried using
<exec> on cvs with no help.

It seems that, although I can "del" such a file manually, I cannot use ant's <delete>
task on one.  So perhaps the problem is unrelated to CVS (well, excepting that the file was
created by CVS.)

<delete file="c:/bt/mainline/bundle/bundle.jar"/>

   [delete] Deleting: c:\bt\mainline\bundle\bundle.jar

BUILD FAILED
build.xml:9: Unable to delete file c:\bt\mainline\bundle\bundle.jar

So, now I wonder if there's some weirdness within Ant about user permissions.  I can delete
a file I created by hand.  I cannot see any interesting difference in the Properties dialog
for either of these files in the explorer.  (The CVS created files have a "Summary" tab, but
my files don't.  It is blank.)  I'm really mystified.  I wish that I had the Windows error
code that led the <delete> task to decide it could not delete the file.

-----Original Message-----
From: Judy Anderson [mailto:JAnderson@rocketsoftware.com]
Sent: Monday, December 24, 2007 3:53 PM
To: user@ant.apache.org
Subject: CVS task failure: cannot rename

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:${env.USERNAME}@rscvs02.rocketsoftware.com:/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
janderson@rocketsoftware.com

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


Mime
View raw message