報錯信息
D:\Projects\CSS\HIS\Build\build.xml:23: Problem: failed to create task or type foreach
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.
- 先看 官方配置
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
// 這里改成 ant-contrib 對應的jar包路徑
<pathelement location="/usr/share/java/lib/ant-contrib-version.jar"/>
</classpath>
</taskdef>
- 看 圖文教程