ant-user mailing list archives

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

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 org.jboss.docs.cmp.cd.bean does not exist
    [javac] import org.jboss.docs.cmp.cd.bean.*; ..."

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

~/dev/examples/org/jboss/docs/cmp/cd/bean/*.java
~/dev/examples/org/jboss/docs/cmp/cd/interfaces/*.java
~/dev/test/servlets/src/classes/TestServlet.java
~/dev/test/servlets/src/classes/EJBClientServlet.java  (This one 
contains the ejb import stmts)

My ant's compile target looks like this:

         <target name="compile" depends="prepare">
                <javac  srcdir="${src.home}"
                        destdir="/tmp/unwrap/boo"
                        classpath="${classpath}"
                        debug="on">
 
                </javac>
        </target>

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

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 
'org.jboss.docs.cmp.cd.**' 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:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message