From 0f2ab7fa915b56f0c27995e813d16b25d392e0cc Mon Sep 17 00:00:00 2001
From: Steve Loughran
Date: Fri, 1 Aug 2003 06:30:01 +0000
Subject: [PATCH] bug #20735 "Resource" is not explained;
explained what a resource is, clarified what property files do, to field off recurrent bugreps and show property expansion.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275001 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/CoreTasks/property.html | 34 ++++++++++++++++++++++++++---
1 file changed, 31 insertions(+), 3 deletions(-)
diff --git a/docs/manual/CoreTasks/property.html b/docs/manual/CoreTasks/property.html
index 016e8761f..f6cc1150c 100644
--- a/docs/manual/CoreTasks/property.html
+++ b/docs/manual/CoreTasks/property.html
@@ -19,13 +19,14 @@ resource) in the project. Properties are case sensitive.
By supplying both the name and refid attribute.
By setting the file attribute with the filename of the property
file to load. This property file has the format as defined by the file used
- in the class java.util.Properties.
+ in the class java.util.Properties, with the same rules about how
+ non-ISO8859-1 characters must be escaped.
By setting the url attribute with the url from which to load the
properties. This url must be directed to a file that has the format as defined
by the file used in the class java.util.Properties.
By setting the resource attribute with the resource name of the
- property file to load. This property file has the format as defined by the
- file used in the class java.util.Properties.
+ property file to load. A resource is a property file on the current
+ classpath, or on the specified classpath.
By setting the environment attribute with a prefix to use.
Properties will be defined for every environment variable by
prefixing the supplied name and a period to the name of the variable.
@@ -164,6 +165,33 @@ Note that this only works on select operating systems.
Two of the values are shown being echoed.
+Property Files
+
+As stated, this task will load in a properties file stored in the file
+system, or as a resource on a classpath. Here are some interesting facts
+about this feature
+
+- If the file is not there, nothing is printed except at -verbose log
+level. This lets you have optional configuration files for every
+project, that team members can customize.
+
- The rules for this format are laid down
+by Sun.
+This makes it hard for Team Ant to field bug reports about it.
+
- Trailing spaces are not stripped. It may have been what you wanted.
+
- Want unusual characters? Escape them \u0456 or \" style.
+
- Ant Properties are expanded in the file.
+
+In-file property expansion is very cool. Learn to use it.
+
+Example:
+
+build.compiler=jikes
+deploy.server=lucky
+deploy.port=8080
+deploy.url=http://${deploy.server}:${deploy.port}/
+
+
+
Copyright © 2000-2003 Apache Software Foundation. All rights
Reserved.