Apache Ant/最佳實踐/本地屬性檔案
外觀
< Apache Ant | 最佳實踐
保持構建檔案免受本地依賴的最佳方式之一是使用本地屬性檔案
<property file="local.properties"/>
這是一個屬性檔案的示例
# Property file for Project X # Author # Date # Note that the format of this file adheres to the Java Property file specification # http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load(java.io.Reader) # 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