打印文件的内容

要打印文件的内容,我们可以使用 loadfile 将文件读入本地属性,然后使用 echo 打印它的值。

<loadfile property="contents" srcFile="example.txt" />
<echo message="${contents}" />