ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Toomey <toome...@yahoo.com>
Subject "depends" gets executed before "if"
Date Fri, 01 Sep 2000 13:52:21 GMT
Hello,

Given the build.xml statements below, I expected that my input and
output directories would get deleted only if the property cleanAll was
set. That's not the case. The "depends" targets get executed first,
then the "if" is checked. I can get around this easily enough, by
moving the "if" checks to the two delete_* tasks. 
Am I missing something in thinking that "if" and "unless" should be
checked prior to performing depends"?

Thanks,

Kevin.

<!--===================== -->
<!-- Build all packages = -->
<!-- ==================== -->

<target name="all" depends="clean,
			unzip_source_jar,
			build_all">
</target>

<!-- ========================================== -->
<!-- Clean out source and classes directories = --> 
<!-- ========================================== -->

<target name="clean" if="cleanAll" depends="delete_class_files,
				delete_source_files">
</target>

<!-- ============================================ -->
<!-- Delete everything in the classes directory	= -->
<!-- ============================================ -->

<target name="delete_class_files" depends="init">
	<deltree dir="${outDir}" /> 
</target>

<!-- =========================================== -->
<!-- Delete everything in the source directory = -->
<!-- =========================================== -->

<target name="delete_source_files" depends="init">
	<delete dir="${inDir}" /> 
</target>



__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Mime
View raw message