pom.xml中$ {project.basedir}的含义 [英] Meaning of ${project.basedir} in pom.xml
问题描述
<directory>${project.basedir}</directory>
和
${project.build.directory}
pom.xml中的
in pom.xml
推荐答案
所有Maven项目都有一组可用的属性。
There are a set of available properties to all Maven projects.
来自 POM简介:
project.basedir
:当前项目所在的目录。
project.basedir
: The directory that the current project resides in.
这意味着这指向Maven项目驻留在系统上的位置。它对应于 pom.xml
文件的位置。如果您的POM位于 /path/to/project/pom.xml
内,那么此属性将评估为 / path / to / project
。
This means this points to where your Maven projects resides on your system. It corresponds to the location of the pom.xml
file. If your POM is located inside /path/to/project/pom.xml
then this property will evaluate to /path/to/project
.
某些属性也继承自 Super POM , project.build.directory
就是这种情况。它是POM中< project>< build>< directory>
元素内的值。您可以通过查看来获取所有这些值的说明。 Maven模型。对于 project.build.directory
,它是:
Some properties are also inherited from the Super POM, which is the case for project.build.directory
. It is the value inside the <project><build><directory>
element of the POM. You can get a description of all those values by looking at the Maven model. For project.build.directory
, it is:
所有文件的目录由构建生成的。默认值为
target
。
这是将通过构建保存每个生成的文件的目录。
This is the directory that will hold every generated file by the build.
这篇关于pom.xml中$ {project.basedir}的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!