source: release-kits/lirk3/bin/ant-installer/web/manual/manual/CoreTasks/loadresource.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 2.8 KB
Line 
1<!--
2 Licensed to the Apache Software Foundation (ASF) under one or more
3 contributor license agreements. See the NOTICE file distributed with
4 this work for additional information regarding copyright ownership.
5 The ASF licenses this file to You under the Apache License, Version 2.0
6 (the "License"); you may not use this file except in compliance with
7 the License. You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17<html>
18<head>
19<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
20<title>LoadResource Task</title>
21</head>
22
23<body>
24
25
26<h2><a name="loadresource">LoadResource</a></h2>
27
28<p><em>Since Ant 1.7</em></p>
29
30<h3>Description</h3>
31<p>
32Load a text resource into a single property. Unless an encoding is
33specified, the encoding of the current locale is used. Resources to
34load are specified as nested <a
35href="../CoreTypes/resources.html">resource</a> elements or single
36element resource collections.
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">property</td>
48 <td valign="top">property to save to</td>
49 <td valign="top" align="center">Yes</td>
50 </tr>
51 <tr>
52 <td valign="top">encoding</td>
53 <td valign="top">encoding to use when loading the resource</td>
54 <td align="center" valign="top">No</td>
55 </tr>
56 <tr>
57 <td valign="top">failonerror</td>
58 <td valign="top">Whether to halt the build on failure</td>
59 <td align="center" valign="top">No, default "true"</td>
60 </tr>
61 <tr>
62 <td valign="top">quiet</td>
63 <td valign="top">Do not display a diagnostic message (unless Ant has been
64 invoked with the <code>-verbose</code> or <code>-debug</code>
65 switches) or modify the exit status to reflect an error. Setting this to
66 "true" implies setting failonerror to "false".
67 </td>
68 <td align="center" valign="top">No, default "false"</td>
69 </tr>
70</table>
71<p>
72The LoadResource task supports nested <a href="../CoreTypes/filterchain.html">
73FilterChain</a>s.
74
75<h3>Examples</h3>
76<pre>
77&lt;loadresource property="homepage"&gt;
78 &lt;url url="http://ant.apache.org/index.html"/&gt;
79&lt;/loadresource&gt;
80</pre>
81Load the entry point of Ant's homepage into property "homepage"; an
82<tt>&lt;echo&gt;</tt> can print this.
83
84<p>For more examples see the <a href="loadfile.html">loadfile</a> task.</p>
85
86
87</body>
88</html>
89
Note: See TracBrowser for help on using the repository browser.