2006-09-11 04:19:00 +00:00
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2001-02-13 12:32:01 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Language" content="en-us">
|
2005-04-29 18:58:16 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
2002-02-03 22:00:42 +00:00
|
|
|
<title>Get Task</title>
|
2001-02-13 12:32:01 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h2><a name="get">Get</a></h2>
|
|
|
|
<h3>Description</h3>
|
|
|
|
<p>Gets a file from a URL. When the verbose option is "on", this task
|
2002-01-02 05:16:04 +00:00
|
|
|
displays a '.' for every 100 Kb retrieved. Any URL schema supported by
|
2002-01-07 05:54:57 +00:00
|
|
|
the runtime is valid here, including http:, ftp: and jar:;
|
2002-01-02 05:16:04 +00:00
|
|
|
https: is only valid if the appropriate support is added to the pre-1.4 Java
|
|
|
|
runtimes.
|
|
|
|
|
|
|
|
</p>
|
2001-02-13 12:32:01 +00:00
|
|
|
The <i>usetimestamp</i> option enables you to control downloads so that the remote file is
|
|
|
|
only fetched if newer than the local copy. If there is no local copy, the download always takes
|
|
|
|
place. When a file is downloaded, the timestamp of the downloaded file is set to the remote timestamp,
|
|
|
|
if the JVM is Java1.2 or later.
|
|
|
|
NB: This timestamp facility only works on downloads using the HTTP protocol.
|
2002-01-02 05:16:04 +00:00
|
|
|
<p>
|
|
|
|
A username and password can be specified, in which case basic 'slightly encoded
|
|
|
|
plain text' authentication is used. This is only a secure authentication
|
|
|
|
mechanism over an HTTPS link.
|
2002-10-31 07:29:31 +00:00
|
|
|
<p>
|
|
|
|
If you need to go through a firewall, use
|
|
|
|
<a href="../OptionalTasks/setproxy.html"><setproxy></a>
|
|
|
|
to set up the proxy first.
|
2002-01-02 05:16:04 +00:00
|
|
|
</p>
|
|
|
|
|
2001-02-13 12:32:01 +00:00
|
|
|
<h3>Parameters</h3>
|
|
|
|
<table border="1" cellpadding="2" cellspacing="0">
|
|
|
|
<tr>
|
|
|
|
<td valign="top"><b>Attribute</b></td>
|
|
|
|
<td valign="top"><b>Description</b></td>
|
|
|
|
<td align="center" valign="top"><b>Required</b></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">src</td>
|
|
|
|
<td valign="top">the URL from which to retrieve a file.</td>
|
|
|
|
<td align="center" valign="top">Yes</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">dest</td>
|
|
|
|
<td valign="top">the file where to store the retrieved file.</td>
|
|
|
|
<td align="center" valign="top">Yes</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">verbose</td>
|
|
|
|
<td valign="top">show verbose progress information ("on"/"off").</td>
|
2002-01-02 05:16:04 +00:00
|
|
|
<td align="center" valign="top">No; default "false"</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">ignoreerrors</td>
|
|
|
|
<td valign="top">Log errors but don't treat as fatal.</td>
|
2002-01-02 05:16:04 +00:00
|
|
|
<td align="center" valign="top">No; default "false"</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">usetimestamp</td>
|
2002-01-02 05:16:04 +00:00
|
|
|
<td valign="top">conditionally download a file based on the timestamp of the
|
|
|
|
local copy. HTTP only</td>
|
|
|
|
<td align="center" valign="top">No; default "false"</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
2002-01-02 05:16:04 +00:00
|
|
|
<tr>
|
|
|
|
<td valign="top">username</td>
|
|
|
|
<td valign="top">username for 'BASIC' http authentication</td>
|
|
|
|
<td align="center" valign="top">if password is set</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">password</td>
|
|
|
|
<td valign="top">password: required </td>
|
|
|
|
<td align="center" valign="top">if username is set</td>
|
|
|
|
</tr>
|
|
|
|
|
2001-02-13 12:32:01 +00:00
|
|
|
</table>
|
|
|
|
<h3>Examples</h3>
|
2003-01-24 08:55:06 +00:00
|
|
|
<pre> <get src="http://ant.apache.org/" dest="help/index.html"/></pre>
|
|
|
|
<p>Gets the index page of http://ant.apache.org/, and stores it in the file <code>help/index.html</code>.</p>
|
2001-02-13 12:32:01 +00:00
|
|
|
|
2003-11-20 14:56:56 +00:00
|
|
|
<pre> <get src="http://www.apache.org/dist/ant/KEYS"
|
|
|
|
dest="KEYS"
|
2002-01-02 05:16:04 +00:00
|
|
|
verbose="true"
|
|
|
|
usetimestamp="true"/></pre>
|
2001-02-13 12:32:01 +00:00
|
|
|
<p>
|
2003-11-20 14:56:56 +00:00
|
|
|
Gets the PGP keys of Ant's (current and past) release managers, if the local copy
|
2001-02-13 12:32:01 +00:00
|
|
|
is missing or out of date. Uses the verbose option
|
|
|
|
for progress information.
|
|
|
|
</p>
|
|
|
|
|
2002-01-02 05:16:04 +00:00
|
|
|
<pre> <get src="https://insecure-bank.org/statement/user=1214"
|
|
|
|
dest="statement.html"
|
|
|
|
username="1214";
|
2002-09-04 11:05:19 +00:00
|
|
|
password="secret"/></pre>
|
2002-01-02 05:16:04 +00:00
|
|
|
<p>
|
|
|
|
Fetches some file from a server with access control. Because https is being used the
|
|
|
|
fact that basic auth sends passwords in plaintext is moot.
|
2006-09-11 04:33:25 +00:00
|
|
|
|
2001-02-13 12:32:01 +00:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|