ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: javac compilation
Date Fri, 21 Nov 2003 15:33:07 GMT
On Friday 21 November 2003 15:17, Doug Lochart wrote:
> Yes it can but the directory for your compiled classes must match the
> package structure of your source and the root directory of the classes
> structure needs to be in the classpath of the build or else it will
> recompile all the java files all the time.

This is not quite true.
The directory layout of your souces must match the
package declarcations in the sources. So for example
if you have a file A.java in package org.acme and the source dir
is src, then A.java has to be in the directory src/org/acme.

If one then whats the classes to be in a directory called classes
can then do:
<javac srcdir="src" destdir="classes"/>

The javac task will check if src/org/acme/A.java is newer that
classes/org/acme/A.class and if so it will call the javac compiler
with src/org/acme/A.java and the target classes dir as "classes".

Peter

>
> Doug
>
> Now I've gained some understanding
> Of the only world that we see.
> Things that I once dreamed of
> Have become reality.
>
> These walls that still surround me
> Still contain the same old me,
> Just one more who's searching for
> A world that ought to be.
> ----- Original Message -----
> From: "Parimala" <parimala@medicomsoft.com>
> To: "'Ant Users List'" <user@ant.apache.org>
> Sent: Thursday, November 20, 2003 11:46 PM
> Subject: javac compilation
>
> > Hi folks,
> >     I have a doubt, Does javac compiles only modified .java files???
> >
> > Parimala
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message