ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Womack <>
Subject RE: per directory make file?
Date Wed, 27 Jun 2001 20:20:55 GMT
Just to answer my own question...patternset does not support wildcards in
the excludesfile attribute.

But that's ok.  I consolidated all of the exclude information into a single
exclude file located the directory set as the source for the javac task.  I
think this is a better practice than having exclude files scattered all over
the source tree.  Being able to define specific files to exclude gives us
enough flexibility.  I can exactly match our current make, and work to clean
up those files in the future.

Thanks to everyone for their advice and help!

-----Original Message-----
From: Mark Womack 
Sent: Wednesday, June 27, 2001 10:40 AM
To: ''
Subject: RE: per directory make file?

Stefan, right after I sent out my last message, I found your reply.

Yes, this is very close to what I am talking about.  Is it possible to have
a wildcard in the patternset?  Something like:

<patternset excludesfile="**/excludes" />

That way, any subdirectory under the srcdir that has an excludes file would
be used automatically.  Without having to explicitly list each exclude file.

Thanks for the reply.  Even without the wildcard, this is a good

-----Original Message-----
From: Stefan Bodewig []
Sent: Tuesday, June 26, 2001 11:38 PM
Subject: Re: per directory make file?

Mark Womack <> wrote:

> I am in the process of creating an ant replacement for our current
> make file build.  We have a make file per directory that specifies
> which files within that directory should be compiled.  This allows
> our developers to have files in the source tree that are not built
> as part of the normal build.

I'd use patternsets with per directory excludesfiles for this purpose
(and only where you really need it).

<javac srcdir="..." destdir="...">
  <patternset excludesfile="module1/excludes" />
  <patternset excludesfile="module2/excludes" />

where each excludesfile lists all files that should not be compiled,
one per line.  The filenames must be relative to the directory you put
into the srcdir attribute.


View raw message