You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Steve Cohen <SC...@sportvision.com> on 2003/05/05 21:24:59 UTC

Recursive Filesets

Has anyone ever requested this?

Seems to me it would be a great convenience to be able to do something
like this:
<fileset id="war.sources">
	<fileset dir="${java.sources}"/>
	<fileset dir="${built.jars}">
		<include="this.particular.jar"/>
		<include="that.particular.jar"/>
	</fileset>
</fileset>

<uptodate property="need.to.rebuild.war" targetfile="some.war">
	<srcfiles refid="war.sources"/>
</uptodate>

etc.

But since filesets cannot be combined in this way, this will not work.
This forces you to insure that all sources live under the same tree,
which will get ugly the further the separate filesets are from the root
of the tree.



----------------------------------------------
Steve Cohen
Sr. Software Engineer
Sportvision Inc.
4410 N. Ravenswood Ave.
Chicago, IL 60640
(773)-293-4342

scohen@sportvision.com
http://www.sportvision.com


Re: Recursive Filesets

Posted by peter reilly <pe...@corvil.com>.
You can use outofdate from antcontrib. It takes a Path
which can have multiple filesets.

<outofdate property="need.to.rebuild.war">
    <sourcefiles>
         <fileset dir="${java.sources}"/>
         <fileset dir="${build.jars}" includes="this.jar,that.jar">
    </sourcefiles>
    <targetfiles path="some.war"/>
</outofdate>

Peter

On Monday 05 May 2003 20:24, Steve Cohen wrote:
> Has anyone ever requested this?
>
> Seems to me it would be a great convenience to be able to do something
> like this:
> <fileset id="war.sources">
> 	<fileset dir="${java.sources}"/>
> 	<fileset dir="${built.jars}">
> 		<include="this.particular.jar"/>
> 		<include="that.particular.jar"/>
> 	</fileset>
> </fileset>
>
> <uptodate property="need.to.rebuild.war" targetfile="some.war">
> 	<srcfiles refid="war.sources"/>
> </uptodate>
>
> etc.
>
> But since filesets cannot be combined in this way, this will not work.
> This forces you to insure that all sources live under the same tree,
> which will get ugly the further the separate filesets are from the root
> of the tree.
>
>
>
> ----------------------------------------------
> Steve Cohen
> Sr. Software Engineer
> Sportvision Inc.
> 4410 N. Ravenswood Ave.
> Chicago, IL 60640
> (773)-293-4342
>
> scohen@sportvision.com
> http://www.sportvision.com