ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Clayson <>
Subject use of 'includes' attribute in javac
Date Sat, 29 Dec 2001 10:37:12 GMT

Ant version 1.4

I am trying to compile my test java files - one of which refers to .java 
files in a completely seperate package. The compilation fails saying, 
"package does not exist
    [javac] import*; ..."

My hierarchy is as follows:
(link to /usr/local/dev in home dir)

~/dev/test/servlets/src/classes/  (This one 
contains the ejb import stmts)

My ant's compile target looks like this:

         <target name="compile" depends="prepare">
                <javac  srcdir="${src.home}"

The ${src.home} is /usr/local/dev/test/servlets/src/classes. This I know 
because when I rename to EJBClientServlet.Lava the 
compilation succeeds i.e. only with

How do I tell ant where to find the package I want to tap? I have tried 
using the includes attribute but then nothing is compiled at all.
Then I searched the archives and google groups and have so far come up 
empty-handed (so it might be something pretty simple but I can't seem to 
find it.)
I could probably include the package in the nested 'src' tag but then 
what is 'includes' for?

The explanation in the online manual says the following with regard to 
using 'includes' with javac:

'comma-separated list of patterns of files that must be included; all 
files are included when omitted.'

What does 'all files are included when omitted' mean? Does it mean all 
files all over the world are included? If it does, then if I use include 
'**' and get nothing compiled, by leaving it out I 
should have the package included by leaving it out!

I would really appreciate someone's help on this as I'm running around 
in circles.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message