嵌套编译时,property的是不能重新设置的;也就是说在使用<ant ><property name="type" value="release"/></ant>时,下级编译接收不到type的值;
这时候我去官网上查看了一些资料,发现property的定义也是后有level区分的:
Properties defined on the command line cannot be overridden by nested <property>
elements. Since Ant 1.8.0, the same is true for nested structures of <ant>
tasks: if a build file A invokes B via an <ant>
task setting a property with a nested <property>
element and B contains an <ant>
tasks invoking C, C will see the value set in A, even if B used a nested <property>
element as well.
网址:http://ant.apache.org/manual/,这里介绍了更多的property的定义。
我们的项目中在使用ant时,使用了ant -Dtype=debug,命令行中定义了type,这时候subproject中的type是不能再被定义的.