Modify

Ticket #44 (closed defect: fixed)

Opened 6 years ago

Last modified 3 years ago

Copying empty dirs doesn't work

Reported by: hans Owned by: 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

comment:1 Changed 6 years ago by hans

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

comment:2 Changed 6 years ago by hans

  • Status changed from new to closed
  • Resolution set to fixed

This was fixed in changeset:77

comment:3 Changed 5 years ago by anonymous

  • Status changed from closed to reopened
  • Resolution fixed 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.

comment:4 Changed 5 years ago 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>
View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.