четвъртък, 24 юли 2008 г.

Maven properties (build.properties) -Properties Reference



The properties files in Maven are processed in the following order:

  1. Built-in properties are processed
  2. ${basedir}/project.properties (basedir is replaced by the directory where the project.xml file in use resides)
  3. ${basedir}/build.properties
  4. ${user.home}/build.properties
  5. System properties
* build.properties stores the path of local repository too

The built-in properties are specified in the plugin.properties file of a plugin, or in defaults.properties within Maven itself.

Both the project.properties and build.properties files in the project directory are also inherited along with the related project.xml file.

The last definition takes precedence, so ${user.home}/build.properties will override anything specified in a project, and properties given on the command line using -D will override everything.

Note: there are no per-user defaults, as there has not been a property shown where this concept makes sense. Currently, there are also no site-wide defaults, however this is planned for future versions of Maven.

http://maven.zones.apache.org/~continuum/staging-sites/m1-core/maven-1.x/reference/properties.html

Няма коментари: