2
是否有可能讓ant幫助使用目標描述中的屬性值?只是用$ {}符號似乎並沒有工作有沒有辦法在目標描述中展開一個ant屬性?
構建文件:
<property name="test.report.dir" value="report"/>
...
<target name="test" depends="compile.main, compile.test" description="Runs unit tests. Reports are saved in ${test.report.dir}/">
...
終端:
ant -p
Buildfile: /home/aaron/Projects/DataStore/build.xml
Main targets:
...
test Runs unit tests. Reports are saved in ${test.report.dir}/
...
這被建議作爲Echo target description in Ant一個解決方案,但作爲一個評論者指出的,它不擴大該財產。
我在Ubuntu上使用ant 1.9.3。