From b9421dc80af485591a9c50cc8921f912e0def11e Mon Sep 17 00:00:00 2001 From: Ashlee Young Date: Fri, 23 Oct 2015 10:05:40 -0700 Subject: Removing sources to replace with download links instead. Change-Id: Ie28789a725051aec0d1b04dd291b7690a7898668 Signed-off-by: Ashlee Young --- .../manual/Tasks/propertyfile.html | 249 --------------------- 1 file changed, 249 deletions(-) delete mode 100644 framework/src/ant/apache-ant-1.9.6/manual/Tasks/propertyfile.html (limited to 'framework/src/ant/apache-ant-1.9.6/manual/Tasks/propertyfile.html') diff --git a/framework/src/ant/apache-ant-1.9.6/manual/Tasks/propertyfile.html b/framework/src/ant/apache-ant-1.9.6/manual/Tasks/propertyfile.html deleted file mode 100644 index e4030f89..00000000 --- a/framework/src/ant/apache-ant-1.9.6/manual/Tasks/propertyfile.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - -PropertyFile Task - - - - -

PropertyFile

- -
-

Introduction

-

Apache Ant provides an optional task for editing property files. This is -very useful when wanting to make unattended modifications to -configuration files for application servers and -applications. Currently, the task maintains a working property file -with the ability to add properties or make changes to existing -ones. Since Ant 1.8.0 comments and layout of the original properties -file are preserved.

- -

Since Ant 1.8.2 the linefeed-style of the original file - will be preserved as well, as long as style used to be consistent. - In general, linefeeds of the updated file will be the same as the - first linefeed found when reading it.

- -
-

PropertyFile Task

-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
AttributeDescriptionRequired
fileLocation of the property file to be editedYes
commentHeader for the file itselfno
jdkpropertiesUse java.lang.Properties, which will - loose comments and layout of file (default is 'false'). since - Ant 1.8.0no
- -

The boolean attribute 'jdkproperties' is provided to recover the -previous behaviour of the task, in which the layout and any comments -in the properties file were lost by the task.

- -

Parameters specified as nested elements

-

Entry

-

Use nested <entry> -elements to specify actual modifications to the property file itself.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeDescriptionRequired
keyName of the property name/value pairYes
valueValue to set (=), to add (+) or subtract (-)At least one must be specified, if operation is not delete
defaultInitial value to set for a property if it is not - already defined in the property file.
- For type date, an additional keyword is allowed: "now"
typeRegard the value as : int, date or string (default)No
operationOne of the following operations:

- for all datatypes:
    -
  • "del" : deletes an entry
  • -
  • "+" : adds a value to the existing value
  • -
  • "=" : sets a value instead of the existing value (default)
  • -

for date and int only:
    -
  • "-" : subtracts a value from the existing value
  • -
-
No
patternFor int and date type only. If present, Values will - be parsed and formatted accordingly.No
unitThe unit of the value to be applied to date +/- operations. - Valid Values are: -
    -
  • millisecond
  • -
  • second
  • -
  • minute
  • -
  • hour
  • -
  • day (default)
  • -
  • week
  • -
  • month
  • -
  • year
  • -
- This only applies to date types using a +/- operation. -
No
-

The rules used when setting a property value are shown below.  The -operation occurs after these rules are considered.

- - -

 

- -

Examples

- -

The following changes the my.properties file. Assume my.properties look like:

- -
# A string value
-akey=original value
-
-# The following is a counter, which will be incremented by 1 for
-# each time the build is run.
-anint=1
- -

After running, the file would now look like -

-
#My properties
-#Wed Aug 31 13:47:19 BST 2005
-# A string value
-akey=avalue
-
-# The following is a counter, which will be incremented by 1 for
-# each time the build is run.
-anint=2
-
-adate=2005/08/31 13\:47
-
-formated.int=0014
-
-formated.date=243 13\:47
-

-The slashes conform to the expectations of the Properties class. The file will be stored in a manner so that each character is examined and escaped if necessary. -

- -

-The layout and comment of the original file is preserved. New properties are added at the end of the file. Existing properties are overwritten in place. -

- -
<propertyfile
-    file="my.properties"
-    comment="My properties">
-  <entry  key="akey" value="avalue"/>
-  <entry  key="adate" type="date" value="now"/>
-  <entry  key="anint" type="int" default="0" operation="+"/>
-  <entry  key="formated.int" type="int" default="0013" operation="+" pattern="0000"/>
-  <entry  key="formated.date" type="date" value="now" pattern="DDD HH:mm"/>
-</propertyfile>
-
-

-To produce dates relative from today :

-
<propertyfile
-    file="my.properties"
-    comment="My properties">
-  <entry  key="formated.date-1"
-      type="date" default="now" pattern="DDD"
-      operation="-" value="1"/>
-  <entry  key="formated.tomorrow"
-      type="date" default="now" pattern="DDD"
-      operation="+" value="1"/>
-</propertyfile>
-
- -

-Concatenation of strings :

-
<propertyfile
-    file="my.properties"
-    comment="My properties">
-  <entry  key="progress" default="" operation="+" value="."/>
-</propertyfile>
-
-

Each time called, a "." will be appended to "progress" -

- -

Pumps the project version to the next minor version (increase minor and set path=0): -

<target name="nextMinorVersion">
-   <property
-     name="header"
-     value="##Generated file - do not modify!"/>
-   <propertyfile file="version.properties" comment="${header}">
-     <entry key="product.build.major"   type="int"  value="3" />
-     <entry key="product.build.minor"   type="int"  operation="+" />
-     <entry key="product.build.patch"   type="int"  value="0" />
-     <entry key="product.build.date"    type="date" value="now" />
-  </propertyfile>
-</target>
-
-After running this target the version changed e.g. from 3.2.2 to 3.3.0. -

- - - - -- cgit 1.2.3-korg