How do I return a filename as an ANT property?
I have a property file that is name app_id-*.app (where * = any application name that can be created) that I need to pass as an arg to an ANT exec call.
I was wondering if there is a way to 开发者_运维百科return the full filename of the filename based on the wildcard as a property that I can then pass to another target.
I ended up creating a fileset and passing that to a property which worked great:
<path id="app-id-file">
<fileset dir="@{path}">
<include name="app_id_*.app"/>
</fileset>
</path>
<property name="application.id.file" refid="app-id-file"/>
<echo message="Application ID filename is ${application.id.file}" />
精彩评论