This tag creates a FileScanner
object so that you can loop over the contents of an Ant
fileset.
The FileScanner
object has the following useful methods:
Iterator iterator()
: returns an iterator of the files in the nested filesets.Iterator directories()
: returns an iterator of the directories in the nested filesets.boolean hasFiles()
: returns true if there are files in the nested filesets..<j:jelly xmlns:j="jelly:core" xmlns:ant="jelly:ant"> <ant:fileScanner var="pluginProjects"> <ant:fileset dir="${basedir}"> <ant:include name="jelly-tags/*/project.xml" /> </ant:fileset> </ant:fileScanner> <j:forEach items="${pluginProjects.iterator()}" var="plugin"> <!-- process using ${plugin} variable --> </j:forEach> </j:jelly>