ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jérôme Lacoste <jerome.laco...@smartcardsystem.com>
Subject RE: *Warning* to all using <patternset>
Date Fri, 22 Jun 2001 09:39:13 GMT
Naming conventions seems good.

I would also like to point out that when someone wants to use a reference to
a patternset, he is using an empty patternset declaration, but one that
wants to create one defines it with arguments.
So a warning in the case one uses an empty patternset but uses 'id' seems OK
to me, but it is perhaps difficult to detect that case.

Defining an new patternset, with no argument (except the id) seems a little
bit strange to me. What can it be used for? It bring nothing to the build
file.

Jerom


> -----Original Message-----
> From: Peter Donald [mailto:donaldp@apache.org]
> Sent: Friday, June 22, 2001 10:31 AM
> To: ant-user@jakarta.apache.org
> Subject: Re: *Warning* to all using <patternset>
>
>
> 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