|
@@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
|
<head> |
|
|
<head> |
|
|
<meta http-equiv="Content-Language" content="en-us"> |
|
|
<meta http-equiv="Content-Language" content="en-us"> |
|
|
<title>Apache Ant User Manual</title> |
|
|
|
|
|
|
|
|
<title>Get</title> |
|
|
</head> |
|
|
</head> |
|
|
|
|
|
|
|
|
<body> |
|
|
<body> |
|
@@ -10,16 +10,27 @@ |
|
|
<h2><a name="get">Get</a></h2> |
|
|
<h2><a name="get">Get</a></h2> |
|
|
<h3>Description</h3> |
|
|
<h3>Description</h3> |
|
|
<p>Gets a file from a URL. When the verbose option is "on", this task |
|
|
<p>Gets a file from a URL. When the verbose option is "on", this task |
|
|
displays a '.' for every 100 Kb retrieved.</p> |
|
|
|
|
|
|
|
|
displays a '.' for every 100 Kb retrieved. Any URL schema supported by |
|
|
|
|
|
the runtime is valid here, including http:, ftp:, and the classpath; |
|
|
|
|
|
https: is only valid if the appropriate support is added to the pre-1.4 Java |
|
|
|
|
|
runtimes. |
|
|
|
|
|
|
|
|
|
|
|
</p> |
|
|
<p>This task should be preferred above the <a href="cvs.html">CVS task</a> when |
|
|
<p>This task should be preferred above the <a href="cvs.html">CVS task</a> when |
|
|
doing automated builds. CVS is significantly slower than loading a compressed |
|
|
|
|
|
archive with http/ftp.</p> |
|
|
|
|
|
|
|
|
fetching remote content. CVS is significantly slower than loading a compressed |
|
|
|
|
|
archive compared to http/ftp.</p> |
|
|
|
|
|
|
|
|
The <i>usetimestamp</i> option enables you to control downloads so that the remote file is |
|
|
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 |
|
|
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, |
|
|
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. |
|
|
if the JVM is Java1.2 or later. |
|
|
NB: This timestamp facility only works on downloads using the HTTP protocol. |
|
|
NB: This timestamp facility only works on downloads using the HTTP protocol. |
|
|
|
|
|
<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. |
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
<h3>Parameters</h3> |
|
|
<h3>Parameters</h3> |
|
|
<table border="1" cellpadding="2" cellspacing="0"> |
|
|
<table border="1" cellpadding="2" cellspacing="0"> |
|
|
<tr> |
|
|
<tr> |
|
@@ -40,34 +51,52 @@ NB: This timestamp facility only works on downloads using the HTTP protocol. |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">verbose</td> |
|
|
<td valign="top">verbose</td> |
|
|
<td valign="top">show verbose progress information ("on"/"off").</td> |
|
|
<td valign="top">show verbose progress information ("on"/"off").</td> |
|
|
<td align="center" valign="top">No</td> |
|
|
|
|
|
|
|
|
<td align="center" valign="top">No; default "false"</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">ignoreerrors</td> |
|
|
<td valign="top">ignoreerrors</td> |
|
|
<td valign="top">Log errors but don't treat as fatal.</td> |
|
|
<td valign="top">Log errors but don't treat as fatal.</td> |
|
|
<td align="center" valign="top">No</td> |
|
|
|
|
|
|
|
|
<td align="center" valign="top">No; default "false"</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">usetimestamp</td> |
|
|
<td valign="top">usetimestamp</td> |
|
|
<td valign="top">conditionally download a file based on the timestamp of the local copy. |
|
|
|
|
|
HTTP only</td> |
|
|
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
|
|
|
|
|
<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> |
|
|
</tr> |
|
|
</tr> |
|
|
|
|
|
<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> |
|
|
|
|
|
|
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<pre> <get src="http://jakarta.apache.org/" dest="help/index.html"/></pre> |
|
|
<pre> <get src="http://jakarta.apache.org/" dest="help/index.html"/></pre> |
|
|
<p>Gets the index page of http://jakarta.apache.org/, and stores it in the file <code>help/index.html</code>.</p> |
|
|
<p>Gets the index page of http://jakarta.apache.org/, and stores it in the file <code>help/index.html</code>.</p> |
|
|
|
|
|
|
|
|
<pre> <get src="http://jakarta.apache.org/builds/tomcat/nightly/ant.zip" |
|
|
<pre> <get src="http://jakarta.apache.org/builds/tomcat/nightly/ant.zip" |
|
|
dest="optional.jar" |
|
|
|
|
|
verbose="true" |
|
|
|
|
|
usetimestamp="true"/></pre> |
|
|
|
|
|
|
|
|
dest="optional.jar" |
|
|
|
|
|
verbose="true" |
|
|
|
|
|
usetimestamp="true"/></pre> |
|
|
<p> |
|
|
<p> |
|
|
Gets the nightly ant build from the tomcat distribution, if the local copy |
|
|
Gets the nightly ant build from the tomcat distribution, if the local copy |
|
|
is missing or out of date. Uses the verbose option |
|
|
is missing or out of date. Uses the verbose option |
|
|
for progress information. |
|
|
for progress information. |
|
|
</p> |
|
|
</p> |
|
|
|
|
|
|
|
|
|
|
|
<pre> <get src="https://insecure-bank.org/statement/user=1214" |
|
|
|
|
|
dest="statement.html" |
|
|
|
|
|
username="1214"; |
|
|
|
|
|
password="secret" /></pre> |
|
|
|
|
|
<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. |
|
|
<hr> |
|
|
<hr> |
|
|
<p align="center">Copyright © 2000,2001 Apache Software Foundation. All rights |
|
|
<p align="center">Copyright © 2000,2001 Apache Software Foundation. All rights |
|
|
Reserved.</p> |
|
|
Reserved.</p> |
|
|