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] - task dependencies are being executed even if 'if' attribute do not match
Date Sun, 03 Oct 2004 14:15:18 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





------- Additional Comments From Svante.U.Schubert@gmx.de  2004-10-03 14:15 -------
Many thanks for your help, I become aware of 'antcall' as well this morning and
updated / simplified my earlier build.xml to:

<!-- Default task -->
<target name="build" depends="precondition_warning" if="build.possible">
  <antcall target="clean" />
  <antcall target="compile" />
  <antcall target="smoke-test" />
  <antcall target="dist" />
</target>

<!-- Gives out an error message if preconditions are not met -->  
<target name="precondition_warning" depends="check-preconditions"
unless="build.possible">
  <antcall target="_error-msg" /> 
</target>

<!-- set 'build.possible' property, when the JCC directory exists  -->
<target name="check-preconditions">
  <available file="${jcc_home.dir}" 
    type="dir" property="build.possible" />
</target>

<target name="_error-msg" depends="check-preconditions" unless="build.possible">
  <echo level="error" 
    message="ERROR: No valid path for 'jcc_home.dir' set in build.xml file!" />
</target>

How multiple conditions will be checked and connected to their related warning
messages, I will think about when such a scenario occurs. ;)

As I am not aware of your bughandling, I leave it up to you to verify and close
this issue.
You helped me a lot. Thanks again.

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


Mime
View raw message