Summary: should call replaceProperties in the diagnostic output too
Versions affected: all, including 1.5 release
Proposed Change:
Target.java lines 315-321
} else if (!testIfCondition()) {
project.log(this, "Skipped because property '" + this.ifCondition
+ "' not set.", Project.MSG_VERBOSE);
} else {
project.log(this, "Skipped because property '"
+ this.unlessCondition + "' set.", Project.MSG_VERBOSE);
}
should be
} else if (!testIfCondition()) {
project.log(this, "Skipped because property '" +
project.replaceProperties(this.ifCondition)
+ "' not set.", Project.MSG_VERBOSE);
} else {
project.log(this, "Skipped because property '"
+ project.replaceProperties(this.unlessCondition) + "' set.",
Project.MSG_VERBOSE);
}
The reason is that you get an extremely misleading message otherwise in
situations like:
<property name="module.name" value="stdio"/>
<property name="stdio.available" value="true"/>
<target name="build" if="${module.name}.available"/>
In the current behavior, the console says in verbose mode: "Skipped because
property '${module.name}.available' not set."
The desired behavior is that it should say: "Skipped because property
'stdio.available' not set."