ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Owen Nichols" <o...@geofolio.com>
Subject suggestion: fix misleading status message
Date Fri, 19 Jul 2002 21:20:44 GMT
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."

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message