故障排除和QUOT;未能创建任务或类型的foreach&QUOT;当使用与LT;的foreach&GT; [英] Troubleshooting "failed to create task or type foreach" when using <foreach>
问题描述
我尝试使用foreach循环在Ant脚本,但我得到的消息:问题:无法创建任务或类型的foreach原因:这个名字是不确定的。
我不明白为什么这是行不通的。这不是一个第三方库。这是一个标准的任务,这将是蚂蚁的最新版本(1.8)的一部分。
&lt;目标名称=解析&GT;
&LT;回声消息=的拼音的前五个字母分别是:/&GT; &LT;的foreach参数=实例列表=A,B,C,D,E&GT; &LT; /&的foreach GT;
&LT; /目标与GT;
有一个标准的任务,这将是
蚂蚁的最新版本的一部分
(1.8)。
块引用>没有,它不是。至少我不能在蚂蚁手动的核心任务和可选任务列表中找到它。
这似乎是蚂蚁的contrib项目的一部分,因此需要单独安装。I'm trying to use the foreach loop in an Ant script but I get the message: Problem: failed to create task or type foreach Cause: The name is undefined.
I don't understand why this doesn't work. It is not a 3rd party library. It is a standard task that would be part of the latest version of Ant (1.8).
<target name="parse"> <echo message="The first five letters of the alphabet are:"/> <foreach param="instance" list="a,b,c,d,e"> </foreach> </target>
解决方案It is a standard task that would be part of the latest version of Ant (1.8).
No, it's not. At least I can't find it in the list of core and optional tasks in the ant manual. It seems to be part of the ant-contrib project and thus needs to be installed separately.
这篇关于故障排除和QUOT;未能创建任务或类型的foreach&QUOT;当使用与LT;的foreach&GT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!