Bug 64078 - [PATCH] targets produce confusing verbose messages when using if/unless attributes
Summary: [PATCH] targets produce confusing verbose messages when using if/unless attri...
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: nightly
Hardware: PC
: P2 minor (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-15 22:14 UTC by Artem Bisyarin
Modified: 2020-01-15 22:14 UTC (History)
0 users



Attachments
the build-file, and patch (1.73 KB, application/x-zip-compressed)
2020-01-15 22:14 UTC, Artem Bisyarin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Artem Bisyarin 2020-01-15 22:14:33 UTC
Created attachment 36966 [details]
the build-file, and patch

For example, I use a target with 'if' attribute, which value expands to a boolean:
<property name="run_test-if" value="no" />
<target name="test-if" if="${run_test-if}" />

In this case in verbose messages I expected to see some information on skipping the target because of a falsy value after property expansion. Instead I saw this: "Skipped because property 'no' no set".

Please, see the attachment containing a build-file, and my humble patch with a possible solution.

Run the build-file as:
ant -v test-if
ant -v test-unless
ant -v test-if-non-boolean-expansion
ant -v test-unless-non-boolean-expansion
(the last two targets are more for testing the patch)