Apache Ant - Intellij Idea 社区无法识别循环命令
Apache Ant - Intellij Idea Community don't recognize for loop command
我想创建一个 for 循环来遍历文件的行。
我做到了:
<loadfile property="download.file" srcfile="download_list.txt"/>
<target name="criarArvore">
<mkdir dir="${download.dir}"/>
<mkdir dir="${domain.dir}"/>
</target>
<target name="download" depends="criarArvore">
<for param="line" list="${download.file}" delimiter="${line.separator}">
<sequential>
<echo>@{line}</echo>
</sequential>
</for>
</target>
但是在 <for>
intellij 警告我:'cannot resolve symbol "for"'。
当我 运行 我收到的脚本时:
c:\xxx\build.xml:22: Problem: failed to create task or type for
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.
<for>
task is from the third-party Ant-Contrib library.
要使用 Ant-Contrib,请下载 ant-contrib-1.0b3-bin.zip, extract ant-contrib-1.0b3.jar from it, and follow the instructions on how to install Ant-Contrib。
我想创建一个 for 循环来遍历文件的行。 我做到了:
<loadfile property="download.file" srcfile="download_list.txt"/>
<target name="criarArvore">
<mkdir dir="${download.dir}"/>
<mkdir dir="${domain.dir}"/>
</target>
<target name="download" depends="criarArvore">
<for param="line" list="${download.file}" delimiter="${line.separator}">
<sequential>
<echo>@{line}</echo>
</sequential>
</for>
</target>
但是在 <for>
intellij 警告我:'cannot resolve symbol "for"'。
当我 运行 我收到的脚本时:
c:\xxx\build.xml:22: Problem: failed to create task or type for
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.
<for>
task is from the third-party Ant-Contrib library.
要使用 Ant-Contrib,请下载 ant-contrib-1.0b3-bin.zip, extract ant-contrib-1.0b3.jar from it, and follow the instructions on how to install Ant-Contrib。