Search code examples
ant

Ant property with multiple values each on separate line


I have a property that has to contain long list of strings and to improve readability I would like to define each value (that are quite long) in separate line, something like:

<property name="items" separator=",">
   <item>A</item>
   <item>B</item>
</property>

as equivalent to

<property name="items" value="A,B" />

Or something similar to <path> + <pathconvert> but not expanding paths.

Is it possible ?


Solution

  • Turns out there are string resources and a generic resource container:

    <resources id="items">
      <string>A</string>
      <string>B</string>
    </resources>
    <pathconvert property="items" refid="items" pathsep="," />