--- Greg Akins <[EMAIL PROTECTED]> wrote: [SNIP] > <target name="main" > > <condition property="file.exists"> > <length file="${fileToCheck}" > when="greater" length="0"/> > </condition> > > <echo message="File Exists ${file.exists}" > /> > > <antcall target="checkout"> > <param name="destination" > value="${destination}"/> > <param name="file.exists" > value="${file.exists}" /> > </antcall> > <antcall target="update"> > <param name="destination" > value="${destination}"/> > <param name="file.exists" > value="${file.exists}" /> > </antcall> > > </target> > <target name="checkout" unless="file.exists"
This is as far as we need to go. Here you don't want to run "checkout" unless the property "file.exists" is set. So you do an antcall, but you are setting "file.exists" in the _antcall_ project context to the value of ${file.exists} (set or not) in the _top-level_ project context. So in the subcontext, the property will _always_ be set. The lesson here is not to use antcalls unless there is no other option. You would do better to restructure such as: <target name="init">...</target> <target name="checkout" unless="file.exists"> ... </target> <target name="update" if="file.exists"> ... </target> <target name="main" depends="init,checkout,update" /> This is "the Ant way," ordinarily. HTH, Matt __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]