简体   繁体   中英

Where does Super POM come from in the config

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

The super pom is defined by the <parent> tag:

<parent>
  <groupId>com.mycompany</groupId>
  <artifactId>mvn</artifactId>
  <version>1.0.0-SNAPSHOT</version>
</parent>

All pom implicitly inherit from super pom which is present in the maven distribution. This pom contains defaults for all maven projects which can be overriden in your maven project. But most of these defaults are not overridden as they typically form the convention part of maven as it is a build tool geared more towards convention. For eg, the default build directory is target and hence this configuration is present in super pom as

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

For more information and actual location of this pom please refer here and here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM