You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Joel Rees <jo...@alpsgiken.gr.jp> on 2002/04/24 11:35:25 UTC

problem with file dependencies

Can someone suggest a way to change the following so that a change to a
class of constants in the package "common" will cause classes in the
packages "controller" and "view" to be re-compiled? Or perhaps suggest some
reasons why it would not be happening today?

  <target name="init">
    <tstamp/>
  </target>

  <target name="common" depends="init">
    <javac destdir="${build}" debug="on">
        <src path="${src}"/>
        <include name="${common}/*.java"/>
    </javac>
  </target>

  <target name="controller" depends="common">
    <javac destdir="${build}" debug="on">
        <src path="${src}"/>
        <include name="${controller}/*.java"/>
    </javac>
  </target>

  <target name="view" depends="common,controller">
    <javac destdir="${build}" debug="on">
        <src path="${src}"/>
        <include name="${view}/*.java"/>
    </javac>
  </target>



Joel Rees
Alps Giken Kansai Systems Develoment
Suita, Osaka




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: problem with file dependencies

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
Why not compile your entire tree with one <javac>??

That would solve the problem you're asking about, at least.

----- Original Message -----
From: "Joel Rees" <jo...@alpsgiken.gr.jp>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Wednesday, April 24, 2002 5:35 AM
Subject: problem with file dependencies


> Can someone suggest a way to change the following so that a change to a
> class of constants in the package "common" will cause classes in the
> packages "controller" and "view" to be re-compiled? Or perhaps suggest
some
> reasons why it would not be happening today?
>
>   <target name="init">
>     <tstamp/>
>   </target>
>
>   <target name="common" depends="init">
>     <javac destdir="${build}" debug="on">
>         <src path="${src}"/>
>         <include name="${common}/*.java"/>
>     </javac>
>   </target>
>
>   <target name="controller" depends="common">
>     <javac destdir="${build}" debug="on">
>         <src path="${src}"/>
>         <include name="${controller}/*.java"/>
>     </javac>
>   </target>
>
>   <target name="view" depends="common,controller">
>     <javac destdir="${build}" debug="on">
>         <src path="${src}"/>
>         <include name="${view}/*.java"/>
>     </javac>
>   </target>
>
>
>
> Joel Rees
> Alps Giken Kansai Systems Develoment
> Suita, Osaka
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>