You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Matthew Oatham <ma...@hotmail.com> on 2003/03/07 13:48:52 UTC

Java Development with ANT

Hi,

Recently got Java Development with ANT book, while it is proving to be extremely useful and well written I feel I am missing something.

on page 113 the Search class is listed, it imports 2 other classes supposedly created by the reader org.example.antbook.common.Document and SearchUtil . Where in the previous pages of the book were these classes created? Or weren't they? I'm a littled confused about the application the example tries to create, is it introduced later in the book? 

I've just read CH4 (the one about JUnit) this also seemed a little vague about the test classes to create. Are these introduced later on?

Cheers.

Matt.

Re: Java Development with ANT

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Matthew Oatham" <ma...@hotmail.com>
To: <us...@ant.apache.org>
Sent: Friday, March 07, 2003 04:48
Subject: Java Development with ANT



>Recently got Java Development with ANT book, while it is proving to be
extremely useful and well written I feel I am >missing something.

well, lets try and clarify it. There is also a web page discussion on the
publishers site (under http://manning.com/antbook ) so that ant users dont
get too distracted by details related to a particular book.


>on page 113 the Search class is listed, it imports 2 other classes
supposedly created by the reader >org.example.antbook.common.Document and
SearchUtil . Where in the previous pages of the book were these >classes
created? Or weren't they? I'm a littled confused about the application the
example tries to create, is it >introduced later in the book?

The overall applicaiton was released and updated by erik recently
(http://www.ehatchersolutions.com/servlets/blogscene/JavaDevWithAnt/) ...it
is essentially a web app to do full text searching of documents; we chose
the ant docs themselves. You can find the classes you need there. The reason
we left stuff out the book was that we were trying to show ant build files,
rather than random bits of code,


>I've just read CH4 (the one about JUnit) this also seemed a little vague
about the test classes to create. Are these >introduced later on?

No, if there is confusion here we should clarify it now. What do you mean by
the test classes?

To do a unit test, you write a class that extends junit.TestCase, the
convention in ant based dev being to call it SomethingTest so that
*Test.java can find all tests in a directory. In each TestCase subclass, you
write methods called testSomeFeature() then run the junit gui, the IDE junit
hosting or ant's <junit> class over them.

Is that any clearer?

-steve



Re: Java Development with ANT

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
On Friday, March 7, 2003, at 05:48  AM, Matthew Oatham wrote:
> on page 113 the Search class is listed, it imports 2 other classes 
> supposedly created by the reader org.example.antbook.common.Document 
> and SearchUtil . Where in the previous pages of the book were these 
> classes created? Or weren't they? I'm a littled confused about the 
> application the example tries to create, is it introduced later in the 
> book?

Actually its introduced earlier... Section 1.6, to be exact.  :))

And all the code is online at the Manning site, but a cleaner more 
widely used version of it is, as Steve said, part of my JavaDevWithAnt 
project:

	http://www.ehatchersolutions.com/JavaDevWithAnt

> I've just read CH4 (the one about JUnit) this also seemed a little 
> vague about the test classes to create. Are these introduced later on?

There are some tricky issues to consider when writing a book.  Do you 
spell everything out in gory detail or do you gloss over things in an 
attempt to be succinct and to a specific point.  Of course you can 
never win - too much detail folks would lose interest because most of 
it would be "yeah yeah, so here is another bean class with getters and 
setters, get on with it, will ya?!" or too little detail and you risk 
losing some readers.

We tried to strike a balance and address a happy medium and we are very 
open to suggestions for improvement.

But, as Steve also said, lets move any discussions of the specifics of 
our book to the Author Online section at Manning's site.

	Erik