How to put a newline in ant property

后端 未结 2 2139
隐瞒了意图╮
隐瞒了意图╮ 2021-02-12 06:11

This doesn\'t seem to work:


I use the property value in the body of an e-mail message (whi

相关标签:
2条回答
  • 2021-02-12 06:54

    These all work for me:

    <property name="foo" value="bar${line.separator}bazz"/>
    
    <property name="foo">bar
    bazz2</property>
    
    <property name="foo" value="bar&#10;bazz"/>
    
    0 讨论(0)
  • 2021-02-12 07:04

    You want ${line.separator}. See this post for an example. Also, the Ant echo task manual page has an example using ${line.separator}.

    By using ${line.separator} you're simply using a Java system property. You can read up on the list of system properties here, and here is Ant's manual page on Properties.

    0 讨论(0)
提交回复
热议问题