故障排除和QUOT;未能创建任务或类型的foreach"当使用与LT;的foreach> [英] Troubleshooting "failed to create task or type foreach" when using <foreach>

查看:146
本文介绍了故障排除和QUOT;未能创建任务或类型的foreach"当使用与LT;的foreach>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用foreach循环在Ant脚本,但我得到的消息:问题:无法创建任务或类型的foreach原因:这个名字是不确定的。

我不明白为什么这是行不通的。这不是一个第三方库。这是一个标准的任务,这将是蚂蚁的最新版本(1.8)的一部分。

 <目标名称=解析>
  <回声消息=的拼音的前五个字母分别是:/>  <的foreach参数=实例列表=A,B,C,D,E>  < /&的foreach GT;
< /目标与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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆