ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Eaves" <>
Subject *Warning* to all using <patternset>
Date Fri, 22 Jun 2001 08:30:51 GMT
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/**" />

In my <javac>

<javac srcdir="${master.src}" 
  destdir="${master.classes}" >
  <patternset id="lw.excludes" /> 
  <classpath refid = "compile.cp" />

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" /> 

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.

    -- jon

Jon Eaves <>

View raw message