Bug 58808 - Delete task shows no message for nested sets if not verbose
Summary: Delete task shows no message for nested sets if not verbose
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.9.6
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-06 06:32 UTC by Robert Flaherty
Modified: 2017-11-05 03:00 UTC (History)
0 users



Attachments
A patched version of Delete.java from 1.9.6 with "//CHANGE:" for changed lines (29.22 KB, text/x-csrc)
2016-01-06 06:32 UTC, Robert Flaherty
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Flaherty 2016-01-06 06:32:05 UTC
Created attachment 33411 [details]
A patched version of Delete.java from 1.9.6 with "//CHANGE:" for changed lines

Without verbose set, the Delete task only shows a message when a single "file" or "dir" is specified, but nothing if nested fileset/dirset are specified.  If you set verbose on, then you'll see individual delete messages.

The Copy task shows a count based message when not verbose, otherwise individual copy messages when it is set.

I'm including a patch that's adds a log() call for this, and clarifies other log() calls that don't specify "file" or "directory".

I used the following to try the changes out:

		<echo message="" />
		<mkdir dir="${build.dir}/foo" />
		<delete dir="${build.dir}/foo" />
		
		<echo message="foo1" file="${build.dir}/foo.bar" />
		<delete file="${build.dir}/foo.bar" />
		
		<mkdir dir="${build.dir}/foo" />
		<mkdir dir="${build.dir}/foo/bar1" />
		<mkdir dir="${build.dir}/foo/bar2" />
		<echo message="foo" file="${build.dir}/foo.bar1" />
		<echo message="foo" file="${build.dir}/foo.bar2" />
		<delete verbose="true">
			<fileset dir="${build.dir}">
				<include name="foo.bar1" />
				<include name="foo.bar2" />
			</fileset>
			<dirset dir="${build.dir}/foo" />
		</delete>

The uploaded file has "//CHANGE:" for the lines I altered.