ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bailey, Darragh" <>
Subject RE: Constructing patterns for use in fileset includes
Date Thu, 01 Jul 2010 13:26:40 GMT
> -----Original Message-----
> From: Matt Benson [] 
> Sent: 30 June 2010 15:57
> To: Ant Users List
> Subject: Re: Constructing patterns for use in fileset includes

> You're in luck.  I would recommend using antcontrib:for to 
> iterate over a <tokens> resourcecollection built from your 
> property + the new <augment> task.  See 
> for a discussion 
> of a similar strategy for another problem.
> HTH,
> Matt

It helped lots thanks! 
That augment task seems very useful, solves the problem perfectly. Never would have occurred
to me to use it.

Not sure about how you were suggesting to use the <tokens> resource collector though?

Here's what I came up with:

Property is set to a list of package names to build, minus version and
src.rpm extension and comma delimited.

    <fileset dir="${src}" id="rpmstobuild" />
    <!-- perform some manipulations using ant-contrib -->
    <antcontrib:for list="${}" param="rpmpkg">
        <augment id="rpmstobuild">
          <include name="**/@{rpmpkg}*" />

    <apply executable="/usr/bin/rpmbuild" os="Linux" >
      <arg value="--rebuild" />
      <arg value="--define" />
      <arg value="_topdir ${rpm.topdir}" />
      <fileset refid="rpmstobuild" />

How would the <tokens> resource collector fit into this?

Obviously I've a little bit of work to do with adding a mapper to track the outputted rpms
to help stop the task re-running if it's not necessary.

Darragh Bailey

Systems Software Engineer
Hewlett Packard Galway Ltd.

Postal Address:    Hewlett Packard Galway Limited, Ballybrit Business Park, Galway
Registered Office: Hewlett Packard Galway Limited, 63-74 Sir John Rogerson's Quay Dublin 2
Registered Number: 361933 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message