[ 
http://jira.codehaus.org/browse/MNG-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=154711#action_154711
 ] 

Benjamin Bentmann commented on MNG-3845:
----------------------------------------

bq. Would a work-around be to specify an empty notifiers ?
Nope, has the same result.

The point is that there is no rationale to inherit the notifiers from the 
parent if the child defines a completely different/unrelated CI system. Maven 
2.x "knows" this by stopping inheritance for certain POM subtrees if the child 
overrides the parent element of such a subtree (c.f 
{{DefaultModelInheritanceAssembler}}).

This issue gets even more annoying for things like dist repos, e.g. a child 
declaring
{code:xml}
<distributionManagement>
  <repository>
    <id>child-distros</id>
    <url>ssh://child.url/distros</url>
  </repository>
</distributionManagement>
{code}
still inherits {{<name>}}, {{<uniqueVersion>}} and {{<layout>}} for its repo 
from the parent despite the URL/ID employed by the child indicating a 
repository which is completely unrelated to the one specified in the parent.

> Unintended inheritance of parent elements overriden by children
> ---------------------------------------------------------------
>
>                 Key: MNG-3845
>                 URL: http://jira.codehaus.org/browse/MNG-3845
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 3.0-alpha-1
>            Reporter: Benjamin Bentmann
>
> Parent POM snippet:
> {code:xml}
> <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>
> {code}
> Child POM snippet:
> {code:xml}
> <ciManagement>
>   <system>child-ci</system>
>   <url>http://child.url/ci</url>
> </ciManagement>
> {code}
> Effective child POM:
> {code:xml}
> <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>
> {code}
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to