跳转到内容

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
华夏公益教科书