You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Rupert Madden-Abbott (Jira)" <ji...@apache.org> on 2020/06/16 19:20:00 UTC

[jira] [Created] (MNG-6940) Allow parent to prevent inheritance of some items

Rupert Madden-Abbott created MNG-6940:
-----------------------------------------

             Summary: Allow parent to prevent inheritance of some items
                 Key: MNG-6940
                 URL: https://issues.apache.org/jira/browse/MNG-6940
             Project: Maven
          Issue Type: Improvement
            Reporter: Rupert Madden-Abbott


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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)