Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3845

[regression] Unintended inheritance of parent elements overriden by children

    XMLWordPrintableJSON

Details

    Description

      Parent POM snippet:

      <ciManagement>
        <system>parent-ci</system>
        <url>http://parent.url/ci</url>
        <notifiers>
          <notifier>
            <type>irc</type>
            <sendOnError>true</sendOnError>
            <sendOnFailure>true</sendOnFailure>
            <sendOnSuccess>false</sendOnSuccess>
            <sendOnWarning>false</sendOnWarning>
            <configuration>
              <address>irc://parent.url/#ci</address>
            </configuration>
          </notifier>
        </notifiers>
      </ciManagement>
      

      Child POM snippet:

      <ciManagement>
        <system>child-ci</system>
        <url>http://child.url/ci</url>
      </ciManagement>
      

      Effective child POM:

      <ciManagement>
        <system>child-ci</system>
        <url>http://child.url/ci</url>
        <notifiers>
          <notifier>
            <type>irc</type>
            <sendOnError>true</sendOnError>
            <sendOnFailure>true</sendOnFailure>
            <sendOnSuccess>false</sendOnSuccess>
            <sendOnWarning>false</sendOnWarning>
            <configuration>
              <address>irc://parent.url/#ci</address>
            </configuration>
          </notifier>
        </notifiers>
      </ciManagement>
      

      i.e. the notifiers are erroneously inherited although the child has specified its own CI management. Happens to a couple of other elements like <distributionManagement>, too. It appears the all-or-nothing style inheritance present in Maven 2.x for certain elements is not properly emulated on trunk.

      Attachments

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              bentmann Benjamin Bentmann
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: