apache / apache/maven

[MNG-6940] Allow parent to prevent inheritance of some items

Open
#8,387 4 comments 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Rupert Madden-Abbott](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rupert@madden-abbott.com)** opened **[MNG-6940](https://issues.apache.org/jira/browse/MNG-6940?redirect=false)** and commented

Maven central requires that the following items are specified in artifacts that are uploaded: https://central.sonatype.org/pages/requirements.html#sufficient-metadata

Of these, the following are inherited by child poms:
* groupId
* version
* developers
* licenses
* scm
* url

There are a variety of poms deployed to central that are intended to be used as parent poms e.g. spring-boot-starter-parent.

Children of these parents are never going to want to inherit these attributes. Since the parent is forced to declare these in order to deploy to Maven Central, the child is forced to add boilerplate to override these. It is also not trivial to override since all sub-properties must also be overridden. This is also brittle to the parent pom declaring more elements in the future which it does not wish for the child to inherit.

Please can we have a mechanism for parent poms to declare that attributes should not be inherited. Please can this work for at least those attributes required by Maven central.

---
No further details from [MNG-6940](https://issues.apache.org/jira/browse/MNG-6940?redirect=false)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.