Java Development with Ant: Search Engine

Purpose
Installation
FAQ

Purpose

This project demonstrates best practices in the following areas:

This code was developed originally for Java Development with Ant, by Steve Loughran and Erik Hatcher.  It has evolved into its current form for presentations on Ant, XDoclet, and JUnit in Erik's presentations with The Complete Programmer NetworkJava symposiums (Denver, Chicago, Dallas, and Atlanta 2002) and at ApacheCon 2002.

This application is a documentation search engine within a web interface.  The sample documentation bundled is that of Ant itself, consisting of almost 200 HTML and text files which are indexed at build time. During run-time of the web application, the index is searched and the content is viewable.  Think of it as a mini-Google.

The application should run out of the box in Tomcat or JBoss. It even has the ability to (at build time) toggle between whether to use a session bean or not (functionality is the same either way). By default, it is built without EJB enabled, but if you are interested in exploring the session bean piece it can be turned on.

Installation

Requirements

  • Ant 1.5.1
  • JUnit 3.8 (minimum)
  • J2EE SDK 1.3 (at least j2ee.jar)

Instructions

The following instructions assume J2EE SDK is installed and the J2EE_HOME environment variable is set appropiately.  In order to build without the full J2EE SDK installed, see the FAQ: How to build without J2EE SDK installed.


  1. Obtain the latest version of the JavaDevWithAnt distribution from http://www.ehatchersolutions.com/downloads/
  2. Expand the distribution to a directory on the filesystem (e.g. C:\JavaDevWithAnt).
  3. From a command prompt, change to the directory where the distribution was expanded (e.g. cd \JavaDevWithAnt).
  4. Run Ant (e.g. ant).