I was dead wrong - the Javac task does
if (srcFile.lastModified() > classFile.lastModified()) {
compileList.addElement(srcFile.getAbsolutePath());
}
My problem was that the clocks on my machine isn't properly synched with
the (samba) filesystem.
Fergus
Fergus Gallagher wrote:
>
> Yes, I assumed you were having problems getting ant to STOP recompiling
> your sources. That works. But if you make a change to a source, ant
> (javac) will not recompile it as it only look for a corresponding .class
> without comparing timestamps or file sizes. I find I use fine grained
> <deltree> targets if I'm working on a sub-project for any length of
> time.
>
> Fergus
>
> jon seymour wrote:
> >
> > I am may be wrong, but isn't it conditional recompile function you are
> > exploiting a function of javac, not ant?
> >
> > As far as I can tell ant target names are completely unrelated to filesystem
> > objects and a cursory examination of the code
> > didn't reveal any use of timestamps to suppress unnecessary work.
> >
> > jon.
> >
> > Fergus Gallagher wrote:
> >
> > > Ant does this but strangely I had a similar problem this morning. It
> > > appears that ant needs to have the java sources in the same directory
> > > structure as the package name. If you do this, then ant won't recompile
> > > things unnecessarily.
> > >
> > > Fergus
> > >
> > > jon seymour wrote:
> > > >
> > > > Hi. I like the ideas behind ant - great work!
> > > >
> > > > A feature of make that I would really miss, though, is the ability to
> > > > avoid performing work that hasn't been invalidated since last time it
> > > > was done [ my build processes are long running enough as they are! ]
> > > >
> > > > Are there any plans to incorporate some kind of timestamp checking
> > > > mechanism to avoid building targets that have already been built and are
> > > > still valid?
> > > >
> > > > Regards,
> > > >
> > > > jon.
> > >
> > > --
> > > Fergus Gallagher Tel: +44 (20) 89 87 07 17
> > > Orbis Fax: +44 (20) 87 42 26 49
> > > The Swan Centre email: Fergus.Gallagher@orbisuk.com
> > > Fishers Lane Web: http://www.orbisuk.com
> > > London W4 1RX / UK
>
> --
> Fergus Gallagher Tel: +44 (20) 89 87 07 17
> Orbis Fax: +44 (20) 87 42 26 49
> The Swan Centre email: Fergus.Gallagher@orbisuk.com
> Fishers Lane Web: http://www.orbisuk.com
> London W4 1RX / UK
--
Fergus Gallagher Tel: +44 (20) 89 87 07 17
Orbis Fax: +44 (20) 87 42 26 49
The Swan Centre email: Fergus.Gallagher@orbisuk.com
Fishers Lane Web: http://www.orbisuk.com
London W4 1RX / UK
|