Мне нужно написать задачу ant для выборочного удаления файлов.
В каталоге у меня есть следующие jar:
acme.jar acme-201105251330.jar
Я хочу удалить acme.jar, потому что существует acme - *. Jar.
Вот что я пробовал:
<target name="-check-use-file">
<available property="file.exists">
<filepath> <fileset dir=".">
<include name="./test-*.jar"/> </fileset>
</filepath>
</available>
</target>
<target name="use-file" depends="-check-use-file" if="file.exists">
<!-- do something requiring that file... -->
</target>
Спасибо