Maven pom systemProperty path to file syntax
Have follwong chunk from pom.xml
:
<systemProperty>
<name>axis2.config</name&开发者_如何学Cgt;
<value>file:${project.build.directory}/../../axis2.properties</value>
</systemProperty>
what does syntax for value
tag mean?
/../
- is id cd ..
and forwards to parent directory?
short: ../
means parent direcory
long version:
file:
specifies, that the following content should be interpreted as a file path.${project.build.directory}
is a variable which will be replaced by the runtime with the actual project build directory/
are folder separators..
means parent folderaxis2.properties
is the name of the properties file
if you want to display the path for debugging purposes you might want to have a look at this:
http://www.avajava.com/tutorials/lessons/how-do-i-display-the-value-of-a-pom-xml-element.html
or
maven ant echoproperties task
Yes, it's a relative path to the project build directory, and go upper (in parent) two times.
In other words: it's the parent directory of the directory that contain your project build directory ;)
Source: Maven Properties Guide
精彩评论