Maven project.build.directory [英] Maven project.build.directory
本文介绍了Maven project.build.directory的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Maven中,project.build.directory
指的是什么?我有点困惑,它引用了Maven项目中的源代码目录还是目标目录?
In Maven, what does the project.build.directory
refer to? I am a bit confused, does it reference the source code directory or the target directory in the Maven project?
推荐答案
您可以在超级pom中找到这些maven属性.
You can find those maven properties in the super pom.
您在这里找到罐子
${M2_HOME}/lib/maven-model-builder-3.0.3.jar
使用7-zip或其他存档程序打开jar(或使用jar工具).
Open the jar with 7-zip or some other archiver (or use the jar tool).
导航到
org/apache/maven/model
您会在其中找到pom-4.0.0.xml
.
它包含所有这些捷径":
It contains all those "short cuts":
<project>
...
<build>
<directory>${project.basedir}/target</directory>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName>
<testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>${project.basedir}/src/test/resources</directory>
</testResource>
</testResources>
...
</build>
...
</project>
更新
Update
After some lobbying I am adding a link to the pom-4.0.0.xml
. This allows you to see the properties without opening up the local jar file.
这篇关于Maven project.build.directory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文