Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2002 10:23:42 -0700
From:      Stacy Millions <stacy@millions.ca>
To:        Jeff Dalton <jeff@aiai.ed.ac.uk>
Cc:        freebsd-java@FreeBSD.ORG
Subject:   Re: What is ant good for?
Message-ID:  <3C7BC49E.43B396C7@millions.ca>
References:  <23033.200202261608@todday>

next in thread | previous in thread | raw e-mail | index | archive | help

Jeff Dalton wrote:

> So I'm wondering whether ant does anything that would make it
> worth the effort of learning to use it.

It has a lot of built in functionality. For the project I am currently
working on, I have a 250 line ant build file. From a cron job, I do
a nightly build
	ant clean update jar
which removes all class file and resource files, updates sources from
the cvs server, build some java files using javacc, compiles everything
and package everything up in their respective jar files. It will even
sign the jars for you if you don't mind leaving your key passwords
in the build file. If anything breaks in the nightly build, I go and
beat on the person who committed something that does not build,
sometimes, that is me :-(

> Does it, for instance, work out the dependencies between files
> to determine what needs to be recompiled and what doesn't?

From the ant docs:

	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.

	Note: Ant uses only the names of the source and class files
	to find the classes that need a rebuild. It will not scan
	the source and therefor will have no knowledge about nested
	classes, classes that are named different from the source
	file and so on.

So, no it does not work out dependencies. That is why I like the
fact that I can do "ant clean compile" and have everything recompiled
fairly quickly.

-stacy

-- 
You'll see it's all a show. Keep 'em laughing as you go. 
Just remember that the last laugh is on you. 
        - Monty Python _The Life Of Brian_

Stacy Millions                                       stacy@millions.ca
Millions Consulting Limited

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C7BC49E.43B396C7>