~ubuntu-branches/ubuntu/jaunty/ant/jaunty-proposed

« back to all changes in this revision

Viewing changes to docs/manual/CoreTasks/get.html

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Gybas
  • Date: 2002-02-14 14:28:48 UTC
  • Revision ID: james.westby@ubuntu.com-20020214142848-2ww7ynmqkj31vlmn
Tags: upstream-1.4.1
ImportĀ upstreamĀ versionĀ 1.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
 
 
3
<head>
 
4
<meta http-equiv="Content-Language" content="en-us">
 
5
<title>Ant User Manual</title>
 
6
</head>
 
7
 
 
8
<body>
 
9
 
 
10
<h2><a name="get">Get</a></h2>
 
11
<h3>Description</h3>
 
12
<p>Gets a file from a URL. When the verbose option is &quot;on&quot;, this task
 
13
displays a '.' for every 100 Kb retrieved.</p>
 
14
<p>This task should be preferred above the <a href="cvs.html">CVS task</a> when
 
15
doing automated builds. CVS is significantly slower than loading a compressed
 
16
archive with http/ftp.</p>
 
17
 
 
18
The <i>usetimestamp</i> option enables you to control downloads so that the remote file is
 
19
only fetched if newer than the local copy. If there is no local copy, the download always takes 
 
20
place. When a file is downloaded, the timestamp of the downloaded file is set to the remote timestamp,
 
21
if  the JVM is Java1.2 or later. 
 
22
NB: This timestamp facility only works on downloads using the HTTP protocol. 
 
23
<h3>Parameters</h3>
 
24
<table border="1" cellpadding="2" cellspacing="0">
 
25
  <tr>
 
26
    <td valign="top"><b>Attribute</b></td>
 
27
    <td valign="top"><b>Description</b></td>
 
28
    <td align="center" valign="top"><b>Required</b></td>
 
29
  </tr>
 
30
  <tr>
 
31
    <td valign="top">src</td>
 
32
    <td valign="top">the URL from which to retrieve a file.</td>
 
33
    <td align="center" valign="top">Yes</td>
 
34
  </tr>
 
35
  <tr>
 
36
    <td valign="top">dest</td>
 
37
    <td valign="top">the file where to store the retrieved file.</td>
 
38
    <td align="center" valign="top">Yes</td>
 
39
  </tr>
 
40
  <tr>
 
41
    <td valign="top">verbose</td>
 
42
    <td valign="top">show verbose progress information (&quot;on&quot;/&quot;off&quot;).</td>
 
43
    <td align="center" valign="top">No</td>
 
44
  </tr>
 
45
  <tr>
 
46
    <td valign="top">ignoreerrors</td>
 
47
    <td valign="top">Log errors but don't treat as fatal.</td>
 
48
    <td align="center" valign="top">No</td>
 
49
  </tr>
 
50
  <tr>
 
51
    <td valign="top">usetimestamp</td>
 
52
    <td valign="top">conditionally download a file based on the timestamp of the local copy.
 
53
        HTTP only</td>
 
54
    <td align="center" valign="top">No</td>
 
55
  </tr>
 
56
</table>
 
57
<h3>Examples</h3>
 
58
<pre>  &lt;get src=&quot;http://jakarta.apache.org/&quot; dest=&quot;help/index.html&quot;/&gt;</pre>
 
59
<p>Gets the index page of http://jakarta.apache.org/, and stores it in the file <code>help/index.html</code>.</p>
 
60
 
 
61
<pre>  &lt;get src=&quot;http://jakarta.apache.org/builds/tomcat/nightly/ant.zip&quot; 
 
62
        dest=&quot;optional.jar&quot; 
 
63
        verbose=&quot;true&quot;
 
64
        usetimestamp=&quot;true&quot;/&gt;</pre>
 
65
<p>
 
66
Gets the nightly ant build from the tomcat distribution, if the local copy
 
67
is missing or out of date. Uses the verbose option 
 
68
for progress information.
 
69
</p>
 
70
 
 
71
<hr>
 
72
<p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
 
73
Reserved.</p>
 
74
 
 
75
</body>
 
76
</html>
 
77