Prepend and Append Keywords

One reason to have dependent property loading is to modify a property used by another product. You may need to ensure that your value comes after the other products, or vice versa. When Java reads properties, its default behavior is to override the old value with the new when encountering an identically-named property. This would compel product maintainers to change a product whenever property file changes occurred in the product on which they depend. Such maintenance would increase geometrically, especially with multiple dependencies.

This application supports property appending or prepending through keywords. If you preface the property to be modified with append. or prepend., you can put your own value after or before the original property’s value(s). You must be aware of the original property’s delimiters and either add one at the beginning of your value if appending, or add one at the end of your value if prepending. For example: Given a pre-existing property:,newappend

This produces,newappend,

This produces,original

If the original property is null, the first character (if appending) or last character (if prepending) is stripped (to eliminate the separator) and the property created with the resulting value. Currently, properties permit only one instance of a keyword within a given property file.

For a full list of all ports used, see Ports Used.