tags:

views:

548

answers:

1

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

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.

So, how do I check for:

org.eclipse.rcp_3.5.0.*

instead of:

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

using Ant?

cheers, Ian

+7  A: 

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>
VonC
that sounds perfect - I'm dying to give it a try.If only I'd asked the question 3 years ago, I'd have saved sooo much time.cheers,Ian
ianmayo