ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Optional excludesfile in javac?
Date Tue, 17 Jul 2001 05:55:52 GMT
On Mon, 16 Jul 2001, Mark Womack <> wrote:

>                <patternset excludesfile="${build.local_excludes}"
>                            if="build.local_excludes"/>
> The above chunk does not cause a parse exception,

It should, hmm.

> but it ignores the if attribute

That's the way patternsets work, maybe we really need the if attribute
on the patternset level as well?  Not sure.

With a recent nightly build, you could do something like

<target name="check">
  <available property="optional-excludes"
             file="${build.local_excludes}" />

<target name="add-optional-excludes" if="optional-excludes"
        depends="check" />
  <patternset excludesfile="${build.local_excludes}" id="optional" />

<target name="dont-add-optional-excludes" unless="optional-excludes"
        depends="check" />
  <patternset id="optional" />

<target name="compile" 
  <javac ...>
    <patternset refid="optional" />

but this looks like a silly hack.

Maybe we should simply add file attributes to <include> and <exclude>
and deprecate the includesfile/excludesfile attributes of <patternset>
in favor of them?  Looks like the cleanest solution to me.


View raw message