{"id":1919,"date":"2017-12-06T11:35:43","date_gmt":"2017-12-06T11:35:43","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=1919"},"modified":"2020-01-09T09:42:34","modified_gmt":"2020-01-09T09:42:34","slug":"how-to-put-new-line-in-apache-ant-message","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-to-put-new-line-in-apache-ant-message\/","title":{"rendered":"How to put new line in apache ant message"},"content":{"rendered":"<p><strong>rajeshkumar created the topic: How to put new line in apache ant message<\/strong><br \/>\nHow to put new line in Apache Ant echo task and mail task:<\/p>\n<p>Answer:<br \/>\nline.separator is Java System Properties which can be used for this purpose.<br \/>\nFound the solution (tried with Ant 1.7.0):<\/p>\n<p>1. You might wrap the message-texts within the XML file.<br \/>\n2. If you put ${line.separator} in front of the line every space before that line separator will be trimmed away.<\/p>\n<p>Example Program:\n<project default=\"play\" name=\"sandbox\">\n<target name=\"-private\"><br \/>\n<echo message=\"Private message... never reached.\"\/><br \/>\n<\/target><\/p>\n<p><target name=\"play\"><br \/>\n<echo message=\"Lorem Ipsum Dolor\"\/><br \/>\n<echo message=\"\n\n\"\/><br \/>\n<echo message=\"Lorem${line.separator} Ipsum${line.separator} Dolor\"\/><br \/>\n<echo message=\"\n\"\/><br \/>\n<echo message=\"Lorem ${line.separator}Ipsum ${line.separator}Dolor\"\/><br \/>\n<echo message=\"\n\"\/><br \/>\n<fail message=\"Failure Title ${line.separator} Ipsum ${line.separator} Dolor\"\/><br \/>\n<\/target>\n<\/project>\n<p>Note:<br \/>\nIf new properties get added (it happens), expect them to appear under the &#8220;ant.&#8221; and &#8220;org.apache.tools.ant&#8221; prefixes, unless the developers have a very good reason to use another prefix. Accordingly, please avoid using properties that begin with these prefixes. This protects you from future Ant releases breaking your build file.<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>rajeshkumar created the topic: How to put new line in apache ant message How to put new line in Apache Ant echo task and mail task: Answer: line.separator is Java&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[12],"tags":[420],"class_list":["post-1919","post","type-post","status-publish","format-standard","hentry","category-apache-ant","tag-apache"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=1919"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1919\/revisions"}],"predecessor-version":[{"id":1920,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1919\/revisions\/1920"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=1919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=1919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=1919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}