ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Vernum <>
Subject RE: better <get> behavior when disconnected
Date Mon, 19 Nov 2001 06:41:12 GMT
From: Curt Arnold []

> >From: "Jose Alberto Fernandez" <>
> >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 name="get-static" depends="check-files" unless="static.exists">
  <get ..../>

<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:   <>
For additional commands, e-mail: <>

View raw message