Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 2.2.1, 3.0.3
-
Fix Version/s: None
-
Component/s: POM
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
The configuration ciManagement/notifiers ignore the attribute combine.children="append" when merging with a parent POM.
When merging, no matter what, the child pom overwrite the parent notifiers, even if combine.children="append" is supplied.
Parent POM fragment
<ciManagement> <system>continuum</system> <url>http://continuum.com</url> <notifiers> <notifier> <type>mail</type> <sendOnError>true</sendOnError> <sendOnFailure>true</sendOnFailure> <sendOnSuccess>true</sendOnSuccess> <sendOnWarning>true</sendOnWarning> <configuration> <address>admin@example.com</address> </configuration> </notifier> </notifiers> </ciManagement>
========================================================
Child POM fragment
<ciManagement> <notifiers combine.children="append"> <notifier> <type>mail</type> <sendOnError>false</sendOnError> <sendOnFailure>true</sendOnFailure> <sendOnSuccess>false</sendOnSuccess> <sendOnWarning>false</sendOnWarning> <configuration> <address>list_dev@example.com</address> <committers>true</committers> </configuration> </notifier> </notifiers> </ciManagement>
=========================================================
Resulted POM fragment ( using mvn projecthelp:effective-pom )
<ciManagement> <notifiers> <notifier> <sendOnError>false</sendOnError> <sendOnSuccess>false</sendOnSuccess> <sendOnWarning>false</sendOnWarning> <configuration> <address>list_dev@example.com</address> <committers>true</committers> </configuration> </notifier> </notifiers> </ciManagement>
=========================================================
Expected POM fragment
<ciManagement> <system>continuum</system> <url>http://continuum.com</url> <notifiers> <notifier> <configuration> <address>admin@example.com</address> </configuration> </notifier> <notifier> <sendOnError>false</sendOnError> <sendOnSuccess>false</sendOnSuccess> <sendOnWarning>false</sendOnWarning> <configuration> <address>list_dev@example.com</address> <committers>true</committers> </configuration> </notifier> </notifiers> </ciManagement>
=========================================================
The parent POM notifier is completely ignored, even though combine.children="append" is supplied.
Tested with Maven 2.2.1 and 3.0.3 without success.
The attempted goal is to have admin to be notified for every event, but the developer of certain package (the child) to be notified only should the build fail.
Issue Links
- duplicates
-
MNG-2807
ciManagement from parent is not merging with children
-
As mentioned in http://www.sonatype.com/people/2011/01/maven-how-to-merging-plugin-configuration-in-complex-projects/, the attributes combine.* apply only to plugin configuration.