ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: use of 'includes' attribute in javac
Date Sun, 30 Dec 2001 05:28:35 GMT
Hi

On Sat, 29 Dec 2001 21:37, Jim Clayson wrote:
> 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 key idea is that each <javac/> task is rooted in a particular directory 
(${src.home} in your case) and the includes will then act on this base 
directory. So you can not include files outside this directory. The solution 
is to add another root and add in the includes via something like

<javac  srcdir="${src.home}"
        destdir="/tmp/unwrap/boo"
        classpath="${classpath}"
        debug="on">
  <src path="~/dev/examples">
    <include name="org/jboss/docs/cmp/cd/bean/*.java"/>
    <include name="org/jboss/docs/cmp/cd/interfaces/*.java"/>
  </src>
</javac>

-- 
Cheers,

Pete

---------------------------------------------------
"If you don't know where you want to go, we'll make 
sure you get taken." 
Microsoft ad slogan, translated into Japanese.
---------------------------------------------------

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