The main ASF Bugzilla instance will be unavailable for 4 hours starting 19.00 UTC 2016-10-29 for an upgrade to 5.0.3
Bug 56115 - Need to provide parameters to Ant's get task to reliably download behind firewall and proxy
Need to provide parameters to Ant's get task to reliably download behind fire...
Product: Tomcat 7
Classification: Unclassified
Component: Packaging
Sun Solaris
: P2 enhancement (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2014-02-06 22:08 UTC by Anthony
Modified: 2014-02-10 18:19 UTC (History)
0 users

Change of trydownload target in build.xml (304 bytes, text/plain)
2014-02-06 22:14 UTC, Anthony
Additional default properties to add to (53 bytes, text/plain)
2014-02-06 22:15 UTC, Anthony

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony 2014-02-06 22:08:42 UTC
In trying to build at work, when the ant process pulls dependencies for Tomcat, it would often hang and timeout, failing at that particular download.

I debugged some and realized that it was due to default value of get's "usehttpcaches" property set to true.  I edited the build file's trydownload target to be this:

  <target name="trydownload" if="" depends="trydownload.check">
    <!-- Downloads a file if not yet downloaded and the source URL is available -->
    <get src="${sourcefile}" retries="${trydownload.retries}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" />

and I added these in


This would keep the default behavior implied with ant's get task.  Then I overrode that httpusecaches value in my file, and it reliably works all the time.  I left the retries value as it didn't change my results but thought it could prove useful for others.
Comment 1 Anthony 2014-02-06 22:14:24 UTC
Created attachment 31289 [details]
Change of trydownload target in build.xml
Comment 2 Anthony 2014-02-06 22:15:00 UTC
Created attachment 31290 [details]
Additional default properties to add to
Comment 3 Mark Thomas 2014-02-10 18:19:03 UTC
Thanks for the report and the suggested change. I have committed a variation (use just the httpusecaches property for all instances of the get task) to 8.0.x for 8.0.4 onwards and to 7.0.x for 7.0.51 onwards.