将字符串分解为ant build.xml文件中的不同行

时间:2011-08-26 16:31:33

标签: xml ant build.xml

我想知道如何在ant build.xml文件中缩短包含长字符串文字的行。例如:

<target name="foo"
        description="I sure do have a lot to say.  Blah Blah.  This is getting awfully wide, etc."
        depends="A,B,C,D,E,F,G,H,I,...,ZZ">
  ...
</target>

显然,我可以通过创建依赖关系树来缩短depends属性值,但这在其他情况下不起作用,例如描述。处理这个问题的正确方法是什么?

1 个答案:

答案 0 :(得分:8)

插入换行符:

<target name="foo"
        description="I sure do have a lot to say.  Blah Blah.  
                     This is getting awfully wide, etc."
        depends="A,B,C,D,E,F,
                 G,H,I,...,ZZ">
  ...
</target>