Maven Super POM

Posted Emma

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Maven Super POM相关的知识,希望对你有一定的参考价值。

Maven super POM defines some properties.

Three ways to find it

  • ${M2_HOME}/lib/maven-model-builder-3.0.3.jar.

   Nevigate to org/apache/maven/model

  • Maven Github project. 

       https://github.com/apache/maven/blob/trunk/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml#L53

  • Maven POM reference

   http://maven.apache.org/pom.html#The_Super_POM

Important Properties

<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>

 

以上是关于Maven Super POM的主要内容,如果未能解决你的问题,请参考以下文章

不立即分离片段

Maven类路径错误多个SLF4J绑定

为啥idea中的maven代码没有报错但是pom显示红色;

Maven-POM

maven项目报错 pom

maven-shade-plugin插件未生效原因分析