Yes. If you only change one class, only that class and classes that
use it will be recompiled.
Another advantage over make is speed. Ant builds a set of all files
that have changed (timestamp comparison) and feeds them into the
javac task. Using make, the Makefile would traverse the directories
and start a new javac process each time. For example, using make
it took us over 6 minutes to rebuild our project. Using ant this took
24 seconds. Then doing a second build (nothing to do) make took
15 seconds and ant took 3 seconds.
Dennis
> -----Original Message-----
> From: Christophe Beljouani [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 22, 2001 7:27 AM
> To: [EMAIL PROTECTED]
> Subject: RE: ant.properties
>
>
> When some code is modified, does ant, with the script you
> provided, compiles
> only the necessary classes ? (the modified classes and the
> classes that uses
> the modified classes)
>
> Christophe
>
> Le lun, 22 jan 2001, vous avez écrit :
> > For me, the power of ant is in its ability to 'walk the path'. Since
> > java is very path oriented, it makes a better match than
> make. Before
> > ant, we had to create and maintain Makefiles in every directory. Now
> > with ant, the following script will work for over 90% of
> our development
> > efforts and work on the entire development path.
> >
> >
> > <project name="example" default="compile" basedir=".">
> >
> > <!-- set some useful properties properties for this build file -->
> >
> > <property name="project.source" value="src" />
> > <property name="project.output" value="package" />
> > <property name="project.lib" value="lib" />
> > <property name="project.docs" value="doc" />
> >
> > <!-- compile all the java source files -->
> >
> > <target name="compile">
> > <javac srcdir="${project.source}"
> > destdir="${project.output}"
> > excludes="**/TEST/**" deprecation="on" >
> > </javac>
> > </target>
> >
> > </project>
> >
> > > -----Original Message-----
> > > From: Christophe Beljouani
[mailto:[EMAIL PROTECTED]]
> > Sent: Monday, January 22, 2001 4:12 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: ant.properties
> >
> >
> > Hi,
> >
> > I'm new to ant. and wonder if the build.xfm file can be
> > generated automatically
> > from source code. The source code I'm working on has a
> > directory structure that
> > matches the package names, a tool could analyze this code,
> > determine which
> > classes use which classes and generate a build.xfm file, is
> > such a tool
> > available somewhere or in development ?
> >
> > Thanks for any help,
> > Christophe
> >
--