Font size:
PropertySort
Description
Looks up all properties in the current project context that match the specified regular expression, and then sorts them accordingly.
Parameters
| Attribute | Description | Required |
|---|---|---|
| match | Regular expression to match property names | Yes |
| property | The name of the property to store results | Yes |
| by | Specifies what to sort. Takes either value or name | Yes |
| order | Specifies sort order. Takes either ascending or descending | Yes |
Examples
The following properties defined in a file called ports.properties:
setting.TomcatPort.ajp13Port.value=8209 setting.TomcatPort.httpPort.value=8280 setting.TomcatPort.httpsPort.value=8643 setting.TomcatPort.shutdownPort.value=8205
and the following code
<property file="ports.properties"/>
<propertysort match="setting.TomcatPort.*.value" by="value" order="ascending"
property="ports"/>
<echo>${ports}</echo>
would yield
8205, 8209, 8280, 8643



