如何使用通配符在Ant的可用命令 [英] How to use wildcard in Ant's Available command

查看:249
本文介绍了如何使用通配符在Ant的可用命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Ant构建脚本整理分发基于我的Eclipse的应用程序。

I'm using an Ant build script to collate my Eclipse-based application for distribution.

构建的一个步骤是检查正确的库在构建文件夹present。我目前使用Ant命令这一点。不幸的是,我有我每次切换到一个新的Eclipse构建时修改脚本(因为版本号将已更新)。

One step of the build is to check that the correct libraries are present in the build folders. I currently use the Ant command for this. Unfortunately, I have to amend the script each time I switch to a new Eclipse build (since the version numbers will have updated).

我并不需要检查版本号,我只需要检查该文件的存在。

I don't need to check the version numbers, I just need to check that the file's there.

那么,我该如何检查:

org.eclipse.rcp_3.5.0.*

而不是:

org.eclipse.rcp_3.5.0.v20090519-9SA0FwxFv6x089WEf-TWh11

使用Ant?

欢呼声,
伊恩

cheers, Ian

推荐答案

您的意思是,像(基于 pathconvert任务这种想法):

You mean, something like (based on the pathconvert task, after this idea):

<target name="checkEclipseRcp">
  <pathconvert property="foundRcp" setonempty="false" pathsep=" ">
    <path>
      <fileset dir="/folder/folder/eclipse"
               includes="org.eclipse.rcp_3.5.0.*" />
    </path>
  </pathconvert>
</target>

<target name="process" depends="checkEclipseRcp" if="foundRcp">
  <!-- do something -->
</target>

这篇关于如何使用通配符在Ant的可用命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆