Clean Text Formatting in Apache Ant
Is there something in Apache Ant in helping to better format Text output from <echo>
's ? For example, my build scripts are formatted with tab spacing, and the tabbing is outputted in the output. I was wondering if there was something to 开发者_JAVA技巧help clean up the formatting without making my build script look untidy.
Hope that makes sense,
Steve
If you are looking to change the format of the echo statements I don't think you can with out modifying Ant or making a new Ant task. However you do have 2 options to hide messages entirely.
The first option is to send them to a log file. You can do this with the file or output attribute of the echo task.
The second option is to give your messages levels. This means that depending on how you run Ant only certain messages will be printed. This is nice because if you need to debug your build you can get more info on what went wrong with out any code changes.
For more info on all of this check out this page http://ant.apache.org/manual/Tasks/echo.html
精彩评论