Apache Ant/Best Practices/Local Property Files
From Wikibooks, the open-content textbooks collection
[edit] Using a Property file
One of the best ways to keep your build files free of local dependencies is to use a local property file
<property file="my.properties"/>
Here is a sample of a property file:
# Property file for Project X # Author # Date # Note that the format of this file adheres to the Java Property file specification # http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html#load(java.io.InputStream) # to use the file put the following in your ant file: # <propertyfile file="my.properties"> # All file names on local hard drives should be stored in this directory # Where Ant is installed. Will not work with 1.5 due to exec/spawn calls antHome=C:/Apps/apache-ant-1.6.5 Saxon8HomeDir=C:/Apps/saxon8 saxon8jar=${Saxon8HomeDir}/saxon8.jar # used to make sure Saxon gets the right XSLT 2.0 processor processor=trax