嵌套編譯時,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是不能再被定義的.