有没有办法在目标描述中扩展ant属性?
是否可以让ant帮助在目标描述中使用属性值?仅仅使用${}符号似乎不起作用 生成文件:有没有办法在目标描述中扩展ant属性?,ant,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}/">
<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}/">
...
这是在中作为解决方案提出的,但正如一位评论员所指出的,它并没有扩展属性
我正在Ubuntu上使用ant 1.9.3。不,这是不可能的。目标描述按原样读取:未进行属性评估。这是有道理的,因为:
- 目标描述应提供有关目标行为的一般信息,这与特定属性的值无关
- 项目帮助
选项不执行构建文件中包含的Ant任务,因此无法评估使用-p
属性
任务定义的属性
ant -p
Buildfile: /home/aaron/Projects/DataStore/build.xml
Main targets:
...
test Runs unit tests. Reports are saved in ${test.report.dir}/
...