ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Using {ex,in}cludesfile in <javac>
Date Sun, 24 Sep 2000 23:30:57 GMT
I'm trying to feed a list of files-to-exclude to my <javac> task, and I
can't get it to work.

At first, I tried having an excludesfile specified, along with a number of
nested <include>'s.

I have my srcdir="${javasrc.dir}", which resolves to .../src/main/java --
the dir level before the packages directory structure begins.

My <include>'s look like:
  <include name="${com.dir}/pkgsubdir/**"/>

The exclude_source.txt file lives at ${javasrc.dir}/${com.dir}, and is
specified in the <javac> task as:
   excludesfile="${javasrc.dir}/${com.dir}/exclude_source.txt"

I tried filenames with paths relative to the srcdir the <javac> task is
pointed to (which is what I assumed it would want):

${com.dir}/pkgsubdir/foo/**
${com.dir}/pkgsubdir1/bar/baz.java
[etc.]

But that didn't work to keep them out of the list of files to compile. So
I tried filenames with paths relative to the dir the excludes file lives
in:

pkgsubdir/foo/**
pkgsubdir1/bar/baz.java
[etc.]

But that didn't work either. So I tried filenames with full paths:

${javasrc.dir}/${com.dir}/pkgsubdir/foo/**
${javasrc.dir}/${com.dir}/pkgsubdir1/bar/baz.java
[etc.]

And that didn't work.

So I thought, maybe you can't have both an excludesfile specified and use
nested <include>'s as well -- so I tried moving my <include>'s into an
includesfile (include_source.txt), specified as above for the excludesfile
(ex -> in as appropriate), and now it's not finding any of the files to
include (specified in the includes file as they were in the nested
<include>'s -- ie., ${com.dir}/pkgsubdir/**).  It seems like it just
ignores both files altogether -- since it whips through that <javac> task
in about a nanosecond, which I can only assume means it's not churning its
way thru the directory scanner -- but I can't get either -verbose or
-debug to tell me anything about what {ex,in}cludes file it's reading in
(or not, as the case may be) -- the only time it ever mentions the files
is when I've pointed it to some bogus one it can't find.

Where am I going wrong?

Thanks,
Diane



=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

Mime
View raw message