ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey E Care <ca...@us.ibm.com>
Subject Target enablement via nested conditions?
Date Thu, 23 Apr 2009 13:13:24 GMT
Off and on we've discussed more robust ways of determining target 
enablement, such as adding some type of EL syntax to if/unless.

It dawned on me yesterday that we might already have the makings of a very 
robust system: why not use conditions nested in targets to determine if 
the target is enabled? I think effectively this is what people do already 
by having the "real" target depend on a "decision" target that sets (or 
doesn't) the controlling property used in the if attribute of the real 
target.

We can quibble on the schema, but here's an example to illustrate the 
point:

<target name="doSomeWork">
  <target-enabled>
    <and>
      <istrue value="${controlling.property.1}"/>
      <istrue value="${controlling.property.2}"/>
    </and>
  </target-enabled>

  <!-- real work starts here -->
</target>

Thoughts?

____________________________________________________________________________________________


Jeffrey E. (Jeff) Care 
carej@us.ibm.com 
IBM WebSphere Application Server 
WAS Release Engineering 




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