From: Curt Arnold [mailto:[EMAIL PROTECTED]

> >From: "Jose Alberto Fernandez" <[EMAIL PROTECTED]>
> 
> >Why don't you use the <available> task, then. You could just use
> >it to verify that all the files you need are there, in a target that
> >runs after the optional target for the <get>s task.
> >
> >If anyone is missing the build will fail gracefully.
> 
> Okay, that would allow me to echo a more informative failure 
> notice.  But it
> would still require the user to choose different targets for offline
> building and will still make unnecessary timestamp requests 
> to the server
> when working in on-line mode.

No, you misunderstood.
You want something like:

<propery name="static.content" value="${some.dir}/${some.file}"/>

<target name="check-files">
  <available property="static.exists" file="$static.content"/>
</target>

<target name="get-static" depends="check-files" unless="static.exists">
  <get ..../>
</target>

<target name="main" depends="get-static,compile"/>

Only attempt to do the download if there's no local copy.

If there is no local copy, and no network, then the get will fail.
If there is no local copy, and the network is up, then the get should work
If there is a local copy, then nothing happens.


The information contained in this email is confidential.  If you are not the 
intended recipient, you may not disclose or use the information in this email 
in any way.  Macquarie Bank does not guarantee the integrity of any emails or 
attached files.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to