ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31513] New: - task dependencies are being executed even if 'if' attribute do not match
Date Sat, 02 Oct 2004 20:15:01 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31513>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31513

task dependencies are being executed even if 'if' attribute do not match

           Summary: task dependencies are being executed even if 'if'
                    attribute do not match
           Product: Ant
           Version: 1.6.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: Svante.U.Schubert@gmx.de


Trying to run the build only if some preconditions are set, like the property
containing a the path to an existing directory.

Unfortunately all preconditions of an tasks are being addressed although the
'if' attribute of the task is not set and the task itself won't, this seems not
to be the correct behavior.

EXAMPLE:

  <target name="all" depends="check-preconditions, build" />
  
  <target name="check-preconditions" depends="test-jcc-dir, casual-error-msg" />
  
  <target name="test-jcc-dir">
    <available file="${jcc_home.dir}" type="dir" property="valid-precondition" />
  </target>  
  
  <target name="casual-error-msg" unless="valid-precondition">
      <echo message="ERROR: Please set the path of 'jcc_home.dir' in the
build.xml file!" />
  </target>    
  
  <target name="build" depends="clean, compile, test, dist"
if="valid-precondition" />

All targets listed as dependencies of 'build' are being addressed, although
there is no valid precondition.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message