ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: *Warning* to all using <patternset>
Date Fri, 22 Jun 2001 08:31:05 GMT
In Ant1 I am not sure we can do this (we need backwards compatibility). In 
Ant2 we will be following the same pattern as properties (because datatypes 
are effectively just another form of property in ant2). So if we decide for 
immutability then we will throw an exception, if we allow mutability then it 
will be silently ignored. There may be something better we can do to avoid 
this (I am thinking of better naming conventions or something) in ant2? 
Suggestions?

On Fri, 22 Jun 2001 18:30, Jon Eaves wrote:
> Hi all,
>
> I've just spent a relatively frustrating day trying to work out
> why the hell my <tar> was ignoring my <patternset> <exclude>.
>
> It turns out that my file looked like this:
>
> <patternset id="lw.excludes" >
>   <exclude name="**/javax/**" />
> </patternset>
>
> In my <javac>
>
> <javac srcdir="${master.src}"
>   destdir="${master.classes}" >
>   <patternset id="lw.excludes" />
>   <classpath refid = "compile.cp" />
> </javac>
>
> And my <tar>
>
> <tar tarfile="${master.dist}/lcrypto-${master.tarfile}.tar" >
>   <tarfileset dir="${master.home}/" >
>    <patternset refid="lw.tar" />
>    <patternset refid="lw.excludes" />
>    <patternset refid="tar.extras" />
>   </tarfileset>
> </tar>
>
> Now all the people here are going to point out that this is
> because I've redefined <patternset> in the <javac>.  However,
> that wasn't all that obvious.  The <javac> task should be
>
> <patternset refid="lw.excludes" />
>
> A subtle but important distinction. ;-)  This applies to
> pretty much anything that can be 'id' and then 'refid'
> later on.
>
> A "'refid' used where 'id' expected" type warning would be
> really, really nice.
>
> Cheers,
>     -- jon
>
> --
> Jon Eaves <jon@eaves.org>
> http://www.eaves.org/jon/

-- 
Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*

Mime
View raw message