From e88e9617e2b78e53f0b9d650379fc94255f5fa16 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 13 Oct 2000 09:14:37 +0000 Subject: [PATCH] Added a location attribute to to provide easy access to the Project.resolvePath functionality to the user. Submitted by: Jose Alberto Fernandez git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268082 13f79535-47bb-0310-9956-ffa450edef68 --- docs/index.html | 12 ++++++++++-- src/main/org/apache/tools/ant/taskdefs/Property.java | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/index.html b/docs/index.html index c19a7e30d..d0524dffd 100644 --- a/docs/index.html +++ b/docs/index.html @@ -26,7 +26,7 @@
  • Dave Walend (dwalend@cs.tufts.edu)
  • -

    Version 1.2 - 2000/10/12

    +

    Version 1.2 - 2000/10/13


    Table of Contents

    @@ -3411,7 +3411,7 @@ This also holds for properties loaded from a property file.

    value the value of the property. - Yes + Yes refid @@ -3427,6 +3427,14 @@ This also holds for properties loaded from a property file.

    file the filename of the property file . + + location + 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. +

    Examples

      <property name="foo.dist" value="dist" />
    diff --git a/src/main/org/apache/tools/ant/taskdefs/Property.java b/src/main/org/apache/tools/ant/taskdefs/Property.java index f0b4e6b35..962b7ae22 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Property.java +++ b/src/main/org/apache/tools/ant/taskdefs/Property.java @@ -85,6 +85,10 @@ public class Property extends Task { return name; } + public void setLocation(File location) { + setValue(location.getAbsolutePath()); + } + public void setValue(String value) { this.value = value; }