source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/docs/manual/CoreTasks/get.html@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 3.9 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>Get Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="get">Get</a></h2>
12<h3>Description</h3>
13<p>Gets a file from a URL. When the verbose option is &quot;on&quot;, this task
14displays a '.' for every 100 Kb retrieved. Any URL schema supported by
15the runtime is valid here, including http:, ftp: and jar:;
16https: is only valid if the appropriate support is added to the pre-1.4 Java
17runtimes.
18
19</p>
20<p>This task should be preferred above the <a href="cvs.html">CVS task</a> when
21fetching remote content. CVS is significantly slower than loading a compressed
22archive compared to http/ftp.</p>
23
24The <i>usetimestamp</i> option enables you to control downloads so that the remote file is
25only fetched if newer than the local copy. If there is no local copy, the download always takes
26place. When a file is downloaded, the timestamp of the downloaded file is set to the remote timestamp,
27if the JVM is Java1.2 or later.
28NB: This timestamp facility only works on downloads using the HTTP protocol.
29<p>
30A username and password can be specified, in which case basic 'slightly encoded
31plain text' authentication is used. This is only a secure authentication
32mechanism over an HTTPS link.
33<p>
34If you need to go through a firewall, use
35<a href="../OptionalTasks/setproxy.html">&lt;setproxy&gt;</a>
36to set up the proxy first.
37</p>
38
39<h3>Parameters</h3>
40<table border="1" cellpadding="2" cellspacing="0">
41 <tr>
42 <td valign="top"><b>Attribute</b></td>
43 <td valign="top"><b>Description</b></td>
44 <td align="center" valign="top"><b>Required</b></td>
45 </tr>
46 <tr>
47 <td valign="top">src</td>
48 <td valign="top">the URL from which to retrieve a file.</td>
49 <td align="center" valign="top">Yes</td>
50 </tr>
51 <tr>
52 <td valign="top">dest</td>
53 <td valign="top">the file where to store the retrieved file.</td>
54 <td align="center" valign="top">Yes</td>
55 </tr>
56 <tr>
57 <td valign="top">verbose</td>
58 <td valign="top">show verbose progress information (&quot;on&quot;/&quot;off&quot;).</td>
59 <td align="center" valign="top">No; default "false"</td>
60 </tr>
61 <tr>
62 <td valign="top">ignoreerrors</td>
63 <td valign="top">Log errors but don't treat as fatal.</td>
64 <td align="center" valign="top">No; default "false"</td>
65 </tr>
66 <tr>
67 <td valign="top">usetimestamp</td>
68 <td valign="top">conditionally download a file based on the timestamp of the
69 local copy. HTTP only</td>
70 <td align="center" valign="top">No; default "false"</td>
71 </tr>
72 <tr>
73 <td valign="top">username</td>
74 <td valign="top">username for 'BASIC' http authentication</td>
75 <td align="center" valign="top">if password is set</td>
76 </tr>
77 <tr>
78 <td valign="top">password</td>
79 <td valign="top">password: required </td>
80 <td align="center" valign="top">if username is set</td>
81 </tr>
82
83</table>
84<h3>Examples</h3>
85<pre> &lt;get src=&quot;http://ant.apache.org/&quot; dest=&quot;help/index.html&quot;/&gt;</pre>
86<p>Gets the index page of http://ant.apache.org/, and stores it in the file <code>help/index.html</code>.</p>
87
88<pre> &lt;get src=&quot;http://www.apache.org/dist/ant/KEYS&quot;
89 dest=&quot;KEYS&quot;
90 verbose=&quot;true&quot;
91 usetimestamp=&quot;true&quot;/&gt;</pre>
92<p>
93Gets the PGP keys of Ant's (current and past) release managers, if the local copy
94is missing or out of date. Uses the verbose option
95for progress information.
96</p>
97
98<pre> &lt;get src=&quot;https://insecure-bank.org/statement/user=1214&quot;
99 dest=&quot;statement.html&quot;
100 username="1214";
101 password="secret"/&gt;</pre>
102<p>
103Fetches some file from a server with access control. Because https is being used the
104fact that basic auth sends passwords in plaintext is moot.
105<hr>
106<p align="center">Copyright &copy; 2000-2004 The Apache Software Foundation. All rights
107Reserved.</p>
108
109</body>
110</html>
111
Note: See TracBrowser for help on using the repository browser.