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.

Using Properties

Look at the number of environment variables being used in Listing 20.3: jdbc.jar, jdbc.driver, jdbc.userid, jdbc.password, jdbc.url, jdbc.jar, and build.sql. Defining properties can quickly become tedious, and often properties vary quite a bit from development environments to integration, QA, and production environments--so it makes sense to define properties in another file.

<project name="EJBQL" default="compile" >
<property environment="env"/>
<property file="build.properties" />

<target name="createtables">
<sql driver="${jdbc.driver}" url="${jdbc.url}"
userid="${jdbc.userid}" password="${jdbc.password}" src="${build.sql}" print="yes">

<classpath>
<pathelement location="${jdbc.jar}"/>
</classpath>
</sql>
</target>
...

Listing 20.3

Find Your Next Great Read

Describe what you're looking for in as much detail as you'd like.
Our AI reads your request and finds the best matching books for you.

Showing results for ""

Popular searches:

Romance Mystery & Thriller Self-Help Sci-Fi Business