ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Build file philosophy
Date Thu, 03 Apr 2003 03:43:28 GMT
The reason I like to start with the end result is that its the ultimate 
goal - the EAR file for example.  We know we need to build that at the 
very least, and by going backwards from there you can see what your big 
targets will be... one to build the EAR, one to build the WAR(s), ones 
to compile the Java code, etc.

By starting at the bottom, you might start doing too many fiddly things 
like creating build directories all in an "init" target.  But perhaps 
it really makes sense to only create directories just before they are 
needed (like just before running <junit> for the result files).

In reality, its a combination of both starting from the end and the 
beginning.  Its sort of like the new fangled Test Driven Development 
stuff - at first its taught at the brain dead "lets simply make this 
one test pass" level, but the smarter you are the more you can use your 
experience and know-how to leap frog a few steps.  And in fact, the 
analogy doesn't end there where TDD and agile methodologies are about 
knowing when to stop - know the destination.  Sorry, too much 
philosophizing going on - thats what I get for spending a weekend with 
Robert Martin and Dave Thomas!


On Wednesday, April 2, 2003, at 08:00  PM, Andrew Zeon wrote:

> Hi,,
> In 'Java development with Ant' by Erik Hatcher and Steve Loughran it 
> says to
> write the build file with the end in mind (page 200 section 8.5.1). 
> Quoting
> the book:
> "Your build file exists to build something. Start with that end result 
> and
> work baskwards as you write your targets."
> Is this something that a lot of people do? For me, I like to start 
> from the
> beginning of the process, and get to the end. Of course I would have 
> in mind
> what is the ultimate goal, but I find it hard to write targets 
> backwards.
> Comments would be much appreciated.
> Thanks.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message