4
NAnt 0.92에서 속성을 정의하고이를 검사 한 직후에 속성을 정의합니다. 그것은 존재하지 않지만 호출 된 타겟에 존재합니다. 버그 또는 기능입니까?!? 나는 문서를 검색하지만 그것에 대한 언급을 찾을 수 없었다.새로 정의 된 속성이있는 NAnt property :: exists()?
<target name="test">
<property name="testprop" value="test value" />
<echo message="property value = ${testprop}" />
<if test="${property::exists(testprop)}">
<echo message="property exists, as it should!" />
</if>
<if test="${not property::exists(testprop)}">
<echo message="property doesn't exists... WTF?" />
</if>
<call target="test2" />
</target>
<target name="test2">
<echo message="property value in sub-target = ${testprop}" />
</target>
출력 :
시험 :
[echo] property value = test value
[echo] property doesn't exists... WTF?
TEST2 :
[echo] property value in sub-target = test value
LOL OH! 나는 이미 그것을 알고 있었다! 가끔은 바보 같은 실수를 지적 할 누군가가 필요할 때가 있습니다. 감사! – dstj
정의되지 않은 속성을 참조하는 동작은 무엇입니까? ' '는 오류로 끝나거나 빈 문자열입니까? –
jxramos
은 정의되지 않은 속성을 참조 할 수 없습니다. '속성 평가에 실패했습니다. 표현식 :이 속성이 존재하지 않습니다 $ {gibberishXYZ} "속성 '$ {gibberishXYZ'이 (가) 설정되지 않았습니다. – jxramos