내가 개미와 함께 사용하는 build.xml 파일을 가지고, 내가 목표 내에서 조건을 넣어려고 :ant에서 condition 요소를 사용하여 다른 속성을 설정하는 방법은 무엇입니까?
먼저 내가 여기있는 속성을 설정 확인을 작동합니다
<condition property="isWindows">
<os family="windows"/>
</condition>
그럼 난 시도 대상에서 사용하는 것 :
<target name="-post-jar">
<condition property="isWindows" value="true">
<!-- set this property, only if isWindows set -->
<property name="launch4j.dir" location="launch4j" />
</condition>
<!-- Continue doing things, regardless of property -->
<move file="${dist.jar.dir}" tofile="myFile"/>
<!-- etc -->
</target>
"조건이 중첩 된"속성 "요소를 지원하지 않습니다."라는 오류가 나타납니다. 질문은 다음과 같습니다. 대상 내부에 조건을 올바르게 넣는 방법과 '중첩'속성을 참조하는 오류가있는 이유는 무엇입니까?
을 사용합니다. 조건 작업 내에 요소를 만들지 않으시겠습니까? (여기서 "do things in here")? –
아 ... 거기에 또 다른 속성을 만들었습니다 (다음 줄은 해당 항목은 아니요 아니오) –
Pete855217