Modify ↓
Ticket #43 (closed defect: fixed)
Top-level (no target) IfTask doesn't work correctly
| Reported by: | hans | Owned by: | hans |
|---|---|---|---|
| Priority: | major | Milestone: | 2.2.0 |
| Component: | Version: | 2.2.0RC1 | |
| Keywords: | Cc: |
Description
The IfTask is prematurely configured when it is not contained within a target.
Simple reproduction:
<project name="test" default="main" basedir="."> <available file="./build.properties" property="globalBuildPopertiesExists"/> <if> <and> <isset property="globalBuildPopertiesExists"/> </and> <then> <echo>Yeah, the property was set!</echo> </then> </if> <target name="main"> <echo>In main...</echo> </target> </project>
The above will always echo "Yeah, the property was set!" regardless of whether the property was actually set.
Attachments
Change History
comment:2 Changed 6 years ago by hans
- Status changed from new to closed
- Resolution set to fixed
Merged into branch in changeset:76
Note: See
TracTickets for help on using
tickets.

Thanks to Matthias for solution here. Fixed in trunk in changeset:75