2010-05-12 5 views
0

개미에 문제가 있습니다. 나는 개미에게 조건을 사용하는 것을 싫어합니다. 하지만 난의 오류 얻을 :개미 문제

BUILD FAILED 
C:\Projekti\Projekt ANT\build.xml:412: Problem: failed to create task or type 
Cause: The name is undefined. 
Action: Check the spelling. 
Action: Check that any custom tasks/types have been declared. 
Action: Check that any <presetdef>/<macrodef> declarations have taken place. 

를이 코드입니다 :

<target name="test"> 

<input message="Write some text: " addproperty="foo" /> 

<if> 
<equals arg1="${foo}" arg2="bar" /> 
<then> 
    <echo message="The value of property foo is 'bar'" /> 
</then> 

<elseif> 
    <equals arg1="${foo}" arg2="foo" /> 
    <then> 
    <echo message="The value of property foo is 'foo'" /> 
    </then> 
</elseif> 


<else> 
    <echo message="The value of property foo is not 'foo' or 'bar'" /> 
</else> 
</if> 

</target> 

</project> 
+2

코드를 ** 이미지 **로 바꿨습니까? 이제 어떻게 누군가가 그걸 시험해보기를 기대합니까? –

+0

코드를 추가 할 수 없기 때문에 가능합니다. 만약 내가 코드를 복사하면 코드가 stackoverflow에 표시됩니다. – senzacionale

+0

그냥 제대로 추가하지 않는다는 의미입니다. 코드를 선택한 다음 Ctrl-K를 누르거나 코드 아이콘을 클릭하여 제대로 형식을 지정하십시오. –

답변

0

<if>는 개미의 contrib 작업이다. Ant-contrib을 다운로드하고 적절하게 설치 했습니까?

+0

예 이미 ant-contrib을 설치했습니다 – senzacionale

+0

@senzacionale : 글쎄, 제대로 설치하지 않은 것 같아요 ...하지만 어떤 줄 412에 해당하는지 말하지 않았으니 말하기가 약간 어렵습니다. –

+0

thx가 를 추가하는 것을 잊었습니다. – senzacionale