Developing Web Applications With Ant by Richard Hightower - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

The Zen of property usage.

To import a whole file of properties, you use the property element:

 

<property file="build.properties" />

Listing 20.3 defines the target createTables to create database tables using the sql task. Simply by changing the current build.properties file (shown in Listing 20.4) to the one shown in Listing 20.5, we can make the build script build database tables for MySQL instead of PointBase.

jdbc.driver=com.pointbase.jdbc.jdbcUniversalDriver
jdbc.userid=petstore
jdbc.password=petstore
jdbc.url=jdbc:pointbase:server://localhost/demo
jdbc.jar=${wlhome}/samples/server/eval/pb/lib/pbclient.jar
build.sql=build.sql

Listing 20.4