ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barbara Samson <bsam...@vovida.com>
Subject Re: File dependencies?
Date Tue, 05 Sep 2000 20:29:14 GMT
Thank you, Glauber, the part about srcdir and destdir pointing to the project
root solved the problem..
I had only one build.xml file, but my source root was pointing to "../src".
Apparently the source check
does not occur when the source is in a directory above the project root. I
changed the project root to be ".."
and adjusted my other paths accordingly, and now the build works as it should.

Barbara Samson

"Ribeiro, Glauber" wrote:

> Barbara,
>
> here's what i was doing wrong, maybe you're having the same problem (maybe
> not). The platform, in my case, was Solaris, with java 1.2.1.
>
> I was trying to set up as i usually do with makefiles, having one build.xml
> file per package, then a "global" build.xml which used "ant" tasks to run
> each of these. Each of the "package" build.xml files had srcdir of ".",
> destdir pointing to the project root. Ant was compiling all files each time.
>
> What i had to do was change to one build.xml file for the whole project,
> pointing both srcdir and destdir to the project root. Now ant only
> recompiles if it has to.
>
> You can use the -v (or -verbose) option to see what files it's actually
> compiling.
>
> HTH...
>
> glauber
>
> -----Original Message-----
> From: Barbara Samson [mailto:bsamson@vovida.com]
> Sent: Tuesday, September 05, 2000 1:55 PM
> To: ant-user@jakarta.apache.org
> Cc: Christopher Todd
> Subject: Re: File dependencies?
>
> Based on the amount of time it takes to compile, I don't think this check is
> happening. It takes me the same amount of time (approx 1 minute) to compile
> 106
> source files after cleaning out the class files as it does
> to re-compile the source a second time with the class files still present.
>
> I am running the latest CVS version on Linux.
>
> Barbara
>
> Chris Todd wrote
>
> > If I'm not mistaken, that is the default behavior of Ant - it checks the
> > last time modified of each .java file and compares it to any .class files
> it
> > finds.  As a matter of fact, from the Ant manual:
> > Javac
> > Description
> > Compiles a source tree within the running (Ant) VM.
> >
> > The source and destination directory will be recursively scanned for Java
> > source files to compile. Only Java files that have no corresponding class
> > file or where the class file is older than the java file will be compiled.
> >
> > This can be viewed at:
> >
> http://jakarta.apache.org/cvsweb/index.cgi/jakarta-ant/docs/index.html?rev=1
> > .90&content-type=text/html
> >
> > Chris Todd
> > Software Engineer
> > ctodd@alabanza.com
> > Alabanza Corporation
> >
> > > -----Original Message-----
> > > From: Ribeiro, Glauber [mailto:glauber.ribeiro@experian.com]
> > > Sent: Tuesday, September 05, 2000 1:57 PM
> > > To: 'ant-user@jakarta.apache.org'
> > > Subject: File dependencies?
> > >
> > >
> > > Hello,
> > >
> > > sorry if this is a newbie kind of question, but the FAQ server seems to
> be
> > > offline.
> > >
> > > I just started using Ant, and i like it. I haven't figured out
> > > how to set up
> > > a build.xml file so that Ant compiles only the files that have
> > > changed (like
> > > you do with a makefile). Is there a way to do this? It just feels
> > > like there
> > > should be.
> > >
> > > Thanks!
> > >
> > >
> > > glauber ribeiro
> > > Glauber.Ribeiro@experian.com (Experian, Schaumburg IL)
> > > Opinions stated are my own and not representative of Experian.
> > >


Mime
View raw message