ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilja Preuß <pre...@disy.net>
Subject Re: conditional fileset
Date Thu, 05 Sep 2002 08:25:39 GMT
> > The problem I am facing is that that target should be executed
> > automatically from some other targets [...] but
> > *only* if the fileset is defined (obviously...).
>
> If by "defined" you mean contains files:

No, by "defined" I mean - well, defined... :-)

The projects scripts need to define wether something needs to be copied, and
if so, which files.

The files can easily be defined through a fileset. Obviously, if nothing
needs to be copied, you don't need to define the fileset, so I thought to
use the *existence* of the fileset as the trigger to copy the files.

That is, I have a generic target

<target name="copyConfig" if="???">
   <copy toDir="${cadenza.dist}/config">
      <fileset refid="resources.config"/>
   </copy>
</target>

So, if a project defines a fileset "resources.config", those files should
get copied. If there is no fileset associated to that id, the target should
be skipped.

Is it possible to somehow check for the existence of a fileset? (Mhh,
checking wether a specific ID is in use would in fact suffice, I guess...)

Thanks for your help, Ilja


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message