Errata


Print Print Icon

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question



Version Location Description Submitted By
Printed Page 8
Table 1-2

There are two errors in Table 1-2 (The target element's attributes):

First, the description of the "if" attribute states: "Name of a property needed to run this task". It should be as follows: "Name of a property needed to run this target".

Second, the description of the "unless" attribute states: "Name of a property that can not be set before running this task". It should be as follows: "Name of a property that can not be set before running this target".

Anonymous 
Printed Page 33
Top paragraph

the book says: ". . . if one or more of the criteria evaluate to false, the property is assigned a false value."

Actually, however, if the condition holds true, the property value is set to true by default; otherwise, the property is not set.

Although an unset property may evaluate to false, if you echo the property it will not print as false, since it is unset.

Sean Wood 
Printed Page 34
top and bottom

The uptodate condition says that the functionality is identical to the Uptodate task. In particular it says that one of the required attributes is "property."

The available condition says that it is identical to the Available task, which requires a property attribute.

However, for both the available and uptodate conditions, the property and value attributes are redundant and will be ignored.

Sean Wood 
Printed Page 35
Paragraph following the Performing Conditional Actions title

Sentence:
Three elements support if and unless attributes: target, patternset (which can group
file-matching patterns such as "*.java," "*.class" and so on; see the section
"Working with Patterns"); fail target is the simplest, as shown here:

Example:
<target name="buildModule" if="code.compiled.OK"/>
.
.
.
</target>

Error 1:
The example demonstrates the if condition, not fail as stated.

Error 2:
The opening <target> element is invalid. It should not end in />. The forward slash
prior to the greater then sign negates the need for the closing </target>.

Anonymous 
Printed Page 36
Example following the title Stopping Builds

The target element in the following example is in an invalid state.

Example:
<target name=
<condition property="classes.available">

Anonymous 
Printed Page 38
6th paragraph

It says "using the srcfile attribute", but we get shown a nested srcfile element, although we got told
before, we might also use nested srcfiles elements.

You see: attribute vs. element, srcfile vs. srcfiles.

Assuming that an attribute may always get replaced by a homonymous nested element, this is still a little
misleading resp. at least confusing for the beginnner.

Anonymous 
Safari Books Online 50
Top of page

Chapter 5, definition of class Project -- included a constructor with a String argument. This should be a no-argument constructor. As displayed -- it will cause JUnit to fail (at least Junit 3.8.1).

I don't know the exact page, so just put in page 50. I am looking at it online without page numbers.

In book:

public Project (String name)
{
}

But should be

public Project ()
{
}

Jay Pedersen 
Printed Page 52
most of page, several examples

Code sample shows a <filter set> element, but "filter set" is an illegal XML name (ref: XML in a Nutshell
3rd ed. p.19). I believe the correct name is <filterset>.

Anonymous 
Printed Page 82
Tip block

"Use the jarsign task..."
should read:
"Use the signjar task..."

Anonymous 
Printed Page 97
example for <checksum

checksum attribute name is lowercase.
property in <checksum example is camelCase.

Anonymous 


"If you are an Ant user this title is an essential resource; if you are a Java developer and want to learn how to use Ant, this is the only place to begin."
--Major Keary, Book News