Browse Source

Added a location attribute to <property> to provide easy access to the

Project.resolvePath functionality to the user.

Submitted by:	Jose  Alberto Fernandez <JFernandez@viquity.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268082 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
e88e9617e2
2 changed files with 14 additions and 2 deletions
  1. +10
    -2
      docs/index.html
  2. +4
    -0
      src/main/org/apache/tools/ant/taskdefs/Property.java

+ 10
- 2
docs/index.html View File

@@ -26,7 +26,7 @@
<li>Dave Walend (<a href="mailto:dwalend@cs.tufts.edu">dwalend@cs.tufts.edu</a>)</li> <li>Dave Walend (<a href="mailto:dwalend@cs.tufts.edu">dwalend@cs.tufts.edu</a>)</li>
</ul> </ul>


<p>Version 1.2 - 2000/10/12</p>
<p>Version 1.2 - 2000/10/13</p>


<hr> <hr>
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
@@ -3411,7 +3411,7 @@ This also holds for properties loaded from a property file.</p>
<tr> <tr>
<td valign="top">value</td> <td valign="top">value</td>
<td valign="top">the value of the property.</td> <td valign="top">the value of the property.</td>
<td valign="middle" align="center" rowspan="4">Yes</td>
<td valign="middle" align="center" rowspan="5">Yes</td>
</tr> </tr>
<tr> <tr>
<td valign="top">refid</td> <td valign="top">refid</td>
@@ -3427,6 +3427,14 @@ This also holds for properties loaded from a property file.</p>
<td valign="top">file</td> <td valign="top">file</td>
<td valign="top">the filename of the property file .</td> <td valign="top">the filename of the property file .</td>
</tr> </tr>
<tr>
<td valign="top">location</td>
<td valign="top">Sets the property to the absolute filename of the
given file. If the value of this attribute is an absolute path, it
is left unchanged (with / and \ characters converted to the
current platforms conventions). Otherwise it is taken as a path
relative to the project's basedir and expanded.</td>
</tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<pre> &lt;property name=&quot;foo.dist&quot; value=&quot;dist&quot; /&gt;</pre> <pre> &lt;property name=&quot;foo.dist&quot; value=&quot;dist&quot; /&gt;</pre>


+ 4
- 0
src/main/org/apache/tools/ant/taskdefs/Property.java View File

@@ -85,6 +85,10 @@ public class Property extends Task {
return name; return name;
} }


public void setLocation(File location) {
setValue(location.getAbsolutePath());
}

public void setValue(String value) { public void setValue(String value) {
this.value = value; this.value = value;
} }


Loading…
Cancel
Save