build.properties

Notes

Purpose
The purpose of the build.properties file is to provide those properties required by Ant's build.xml that are likely to be changed, from a small, easy to edit, file.

The app.name property should be set to the web application's name [AddressBook in this case].

The tomcat.home property should be set to Tomcat's home directory [/usr/local/jakarta-tomcat-4.1.12 on my computer].

The manager.url property should be set to the Tomcat Manager's URL [http://localhost:8080/manager].

The username property should be set to Tomcat's username, as set up in the tomcat-users.xml file.

The password property should be set to Tomcat's password, as set up in the tomcat-users.xml file.

The complete source code is available below, however it is better to have two build.properties files, one in your home directory, like this:

    tomcat.home=/usr/local/jakarta-tomcat-4.1.12
    manager.url=http://localhost:8080/manager
    username=tomcatusername
    password=tomcatpassword

And one in your application's directory, like this:

    app.name=AddressBook

Both files will be processed, but the properties in your home directory's build.properties file are likely to be common to all your web applications.

NB: Good security dictates that build.properties files containing the username and password properties should be made non-readable to everyone but you.


Complete Source Code


app.name=AddressBook
tomcat.home=/usr/local/jakarta-tomcat-4.1.12
manager.url=http://localhost:8080/manager
username=tomcatusername
password=tomcatpassword