Ant Flaka이라는 외부 Tasksuite를 기반으로하는 솔루션이 있습니다. Ant Flaka를 사용하면 파일 세트에서 기본 fileobjects 및 해당 속성 (name, mtime, size ..)에 액세스 할 수 있습니다. 를 통해 외부 프로세스를 열 필요가/cmd를
<project name="demo" xmlns:fl="antlib:it.haefelinger.flaka">
<fl:install-property-handler />
<!-- as fileset has no absolute pathnames we need
path combined with pathconvert -->
<path id="foobar">
<fileset dir="/home/gilreb/Downloads">
<include name="*.zip"/>
</fileset>
</path>
<pathconvert property="zipfiles" refid="foobar"/>
<!-- iterate over the listentries, get access to
the underlying fileobject and echo its properties -->
<fl:for var="f" in="split('${zipfiles}', ':')">
<echo>
#{ format('filename %s, last modified %tD, size %s bytes', f.tofile.toabs,f.tofile.mtime,f.tofile.size) }
</echo>
</fl:for>
</project>
출력 =
...
[echo] filename /some/path/apache-ant-1.8.2-bin.zip, last modified 03/16/11, size 10920710 bytes
[echo]
[echo] filename /some/path/apache-ant-1.8.2-src.zip, last modified 03/16/11, size 8803388 bytes
[echo]
[echo] filename /some/path/apache-ant-antunit-1.1-bin.zip, last modified 04/17/11, size 70477 bytes
...
고마워요! 나는 항아리에 들어가서 EL에 약간의 개조를했고 그것은 단지 효과가있었습니다. Flaka는 Ant에 많이 추가되었습니다. –