JBoss.org Community Documentation

Appendix A. Book Example Installation

The book comes with the source code for the examples discussed in the book. You can download the examples zip file from http://www.redhat.com/docs/manuals/jboss. Unzipping the example code archive creates a JBoss jboss<version>guide directory that contains an examples subdirectory. This is the examples directory referred to by the book.

The only customization needed before the examples may be used is to set the location of the JBoss server distribution. This may be done by editing the examples/build.xml file and changing the jboss.dist property value. This is shown in bold below:

<project name="JBoss book examples" default="build-all" basedir=".">
    <!-- Allow override from local properties file -->
    <property file="ant.properties"/>

    <!-- Override with your JBoss server bundle dist location -->
    <property name="jboss.dist"        value="
    <property name="jboss.deploy.conf" value="default"/>

or by creating an .ant.properties file in the examples directory that contains a definition for the jboss.dist property. For example:


Part of the verification process validates that the version you are running the examples against matches what the book examples were tested against. If you have a problem running the examples first look for the output of the validate target such as the following:

     [java] ImplementationTitle: JBoss [Zion]
     [java] ImplementationVendor: JBoss Inc.
     [java] ImplementationVersion: <version> (build: CVSTag=JBoss_<version> date=200704070944)
     [java] SpecificationTitle: JBoss
     [java] SpecificationVendor: JBoss (http://www.jboss.org/)
     [java] SpecificationVersion: <version>
     [java] JBoss version is: <version>