diff --git a/WHATSNEW b/WHATSNEW
index a317a66cb..dce6cb819 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -985,6 +985,10 @@ Other changes:
makes it ignore differences between / and \ separators.
Bugzilla Report 47858.
+ * Gets a file from a URL. When the verbose option is "on", this task
+ Gets files from URLs. When the verbose option is "on", this task
displays a '.' for every 100 Kb retrieved. Any URL schema supported by
the runtime is valid here, including http:, ftp: and jar:;
-https: is only valid if the appropriate support is added to the pre-1.4 Java
-runtimes.
-
A username and password can be specified, in which case basic 'slightly encoded
plain text' authentication is used. This is only secure over an HTTPS link.
-Proxies. Since Ant1.7, Ant running on Java1.5 or later defaults to
- using
- the proxy settings of the operating system. There is also the
- <setproxy> task for
- earlier Java versions. With proxies turned on, Proxies. Since Ant 1.7.0, Ant running on Java1.5 or later can
+ use the proxy settings of the operating
+ system if enabled with the
+ Resource
+ Collections are used to select groups of URLs to download. If
+ the collection contains more than one resource, the dest attribute
+ must point to a directory if it exists or a directory will be
+ created if it doesn't exist. The destination file name use the
+ last part of the path of the source URL unless you also specify a
+ mapper. You can define name transformations by using a
+ nested mapper element. You
+ can also use any filenamemapper type in place of the mapper
+ element. The mapper will receive the resource's name as argument. Any
+ resource for which the mapper returns no or more than one mapped
+ name will be skipped. If the returned name is a relative path, it
+ will be considered relative to the dest attribute. Gets the index page of http://ant.apache.org/, and stores it in the file Get
Description
-<get>
requests against
- localhost may not work as expected, if the request is relayed to the proxy.
- The -noproxy
option can be used to turn this feature off.
--autoproxy
option. There is also the
+ <setproxy> task
+ for earlier Java versions. With proxies turned
+ on, <get>
requests against localhost may not work
+ as expected, if the request is relayed to the proxy.Parameters
@@ -62,11 +58,12 @@ plain text' authentication is used. This is only secure over an HTTPS link.
+
src
the URL from which to retrieve a file.
- Yes
+ Yes or a nested resource collection
dest
- the file where to store the retrieved file.
+ the file or directory where to store the
+ retrieved file(s).
Yes
@@ -97,15 +94,15 @@ plain text' authentication is used. This is only secure over an HTTPS link.
maxtime
- Maximum time in seconds the download may take,
- otherwise it will be interrupted and treated like a download
+ Maximum time in seconds a single download may take,
+ otherwise it will be interrupted and treated like a download
error. Since Ant 1.8.0
No: default 0 which means no
maximum time
@@ -125,6 +122,29 @@ plain text' authentication is used. This is only secure over an HTTPS link.
retries
- the number of retries on error
+ the per download number of retries on error
since Ant 1.8.0No; default "3"
No; default "true"
Parameters specified as nested elements
+any resource collection
+
+mapper
+
+Examples
<get src="http://ant.apache.org/" dest="help/index.html"/>
help/index.html
.
+<get dest="downloads"> + <url url="http://ant.apache.org/index.html"/> + <url url="http://ant.apache.org/faq.html"/> +</get> ++
Gets the index and FAQ pages of http://ant.apache.org/, and stores
+ them in the directory downloads
which will be created if
+ necessary.