Ticket #44 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

Copying empty dirs doesn't work

Reported by: hans Assigned to: hans
Priority: major Milestone: 2.2.0
Component: cruisecontrol-builder-plugin Version: 2.2.0RC1
Keywords: Cc:

Description

Setting includeEmptyDirs="true" in the <copy> task doesn't seem to make any difference.

Attachments

Change History

06/12/06 19:41:40 changed by hans

  • summary changed from Copy emptydirs doesn't work to Copying empty dirs doesn't work.

06/16/06 13:51:55 changed by hans

  • status changed from new to closed.
  • resolution set to fixed.

This was fixed in changeset:77

07/18/07 22:41:09 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

Maybe I'm missing something, but this doesn't seem to make a difference.

1. You can't copy directories with copy alone, you have to use a fileset because the dir attribute isn't supported by copy. 2. Filesets don't allow the includeEmptyDirs attribute, so the fileset itself doesn't have them so copying the fileset fails.

In other words, I'd have to copy each one of these directories manually instead of just telling it to move my entire source directory. This is problematic.

07/29/07 21:28:47 changed by hans

  • status changed from reopened to closed.
  • resolution set to fixed.
  • component set to cruisecontrol-builder-plugin.

Did you confirm that this actually doesn't work for you? I verified the expected behavior when this ticket was closed and just confirmed it again. It works fine to copy empty dirs. Here's a sample build file that does just that:

Assumptions: * test1/ is a directory that contains 1 or more other empty directories. * target/ is an existing directory where empty dirs will be copied.

<project name="foo" default="build">
  <target name="build">
    <copy todir="target" includeemptydirs="true">
      <fileset dir=".">
        <include name="test1/**"/>
      </fileset>
    </copy>
  </target>
</project>

Add/Change #44 (Copying empty dirs doesn't work)




Action