4

When I look at my effective pom in Eclipse, I can see a load of dependencies and a label stating that this is our corporate super pom which must form part of every project.

I can't actually work out where the super pom comes into play in the config. I have looked at my settings.xml in maven, and it has lists to remote repositories, and internal repositories - but can't seem to see a link to the super pom anywhere.

It is a muliple module maven project built from an internal archetype, and the parent module has a parent artefact defined...but when I browse the parent artefact, I still cant see how the super pom comes into play.

Any advice appreciated.

Regards

i

4

2 回答 2

3

超级 pom 由<parent>标签定义:

<parent>
  <groupId>com.mycompany</groupId>
  <artifactId>mvn</artifactId>
  <version>1.0.0-SNAPSHOT</version>
</parent>
于 2014-04-10T11:47:50.803 回答
1

所有 pom 都隐式继承自supermaven 发行版中的 pom。这个 pom 包含所有 maven 项目的默认值,可以在你的 maven 项目中覆盖。但是大多数这些默认值都没有被覆盖,因为它们通常构成 maven 的约定部分,因为它是一个更倾向于约定的构建工具。例如,默认的构建目录是target,因此这个配置存在于超级 pom 中

........
<directory>${project.basedir}/target</directory>
.........

有关此 pom 的更多信息和实际位置,请参阅此处此处

于 2014-04-10T11:53:03.707 回答