具有多个值的Ant属性,每个值在单独的行上

Mar*_*cki 3 ant

我有一个属性,必须包含很长的字符串列表,并提高可读性我想在单独的行中定义每个值(很长),如:

<property name="items" separator=",">
   <item>A</item>
   <item>B</item>
</property>
Run Code Online (Sandbox Code Playgroud)

相当于

<property name="items" value="A,B" />
Run Code Online (Sandbox Code Playgroud)

或类似于<path>+ <pathconvert>但不扩展路径的东西.

可能吗 ?

Mar*_*cki 8

原来有字符串资源和通用资源容器:

<resources id="items">
  <string>A</string>
  <string>B</string>
</resources>
<pathconvert property="items" refid="items" pathsep="," />
Run Code Online (Sandbox Code Playgroud)