InterviewSolution
| 1. |
Explain the default and the advanced configuration inheritance. |
|
Answer» The default behavior includes merging the CONTENT of the configuration element according to the element name. If a certain element EXISTS in the CHILD POM, that value becomes the effective value. The parent value becomes the effective value if the child POM does not have an element but the parent does. It's important to note that this is solely an XML operation, with no code or plugin SETTINGS involved. Only the elements are involved, not their values. Advanced configuration inheritance includes adding attributes to the children of the configuration element to regulate how child POMs inherit configuration from parent POMs. Combine.children and combine.self are the two attributes. These attributes can be used in a child POM to regulate how Maven integrates the parent's plugin configuration with the child's explicit configuration. |
|