You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Sonnek, Ryan" <Ry...@bpc.com> on 2003/05/02 17:30:53 UTC

property as file filter

Doh!
Sorry about not changing the subject!

Is it possible to build a path from a property that acts like a filter?

<property name="common.fileset.filter" value="**/common/*.class,
**/common/*.xml" />

  <path id="common.fileset.path">
      <fileset dir="lib">
        <include name="${common.fileset.filter}" />
      </fileset>
  </path>

  <jar destfile="common.jar" >
    <fileset pathref="common.fileset.path" />
  </jar>


Re: property as file filter

Posted by Jesse Stockall <st...@magma.ca>.
On Fri, 2003-05-02 at 11:30, Sonnek, Ryan wrote:
> Is it possible to build a path from a property that acts like a filter?
> 
> <property name="common.fileset.filter" value="**/common/*.class,
> **/common/*.xml" />
> 
>   <path id="common.fileset.path">
>       <fileset dir="lib">
>         <include name="${common.fileset.filter}" />
>       </fileset>
>   </path>
> 
>   <jar destfile="common.jar" >
>     <fileset pathref="common.fileset.path" />
>   </jar>
> 
> 

Yes, but not exactly like you have done.

<include> elements take 1 pattern

The 'includes' attribute takes a comma separated list.

<fileset dir="lib" includes="${common.fileset.filter}"/>

-- 
Jesse Stockall <st...@magma.ca>