Issue Details (XML | Word | Printable)

Key: MNG-2103
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Prasad Kashyap
Votes: 1
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Maven 2

Inheritance of <plugin> overrides that of <execution>

Created: 22/Feb/06 10:15 AM   Updated: 15/Jun/07 09:13 AM
Component/s: Inheritance and Interpolation
Affects Version/s: None
Fix Version/s: 3.0

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive test-inheritance-true.zip (2 kB)
2. Zip Archive test-inheritance.zip (2 kB)


Complexity: Intermediate
Testcase included: yes


 Description  « Hide
The <inherited> settings of <plugin> overrides that of it's <execution>

By convention, all top level configuration settings are usually overridden by the settings in the lower levels.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Yann Le Du added a comment - 22/Feb/06 10:50 AM
Hmm... In this case, I would understand the <plugin><inherited>false as "don't inherit whatever is in <plugin> ". So, in modules, <executions> is not inherited and both <execution> don't even exist. What do you think ?
You can visualize that by running mvn help:effective-pom in parent project.

Prasad Kashyap added a comment - 22/Feb/06 02:07 PM
I see what you mean. That makes sense only if the <plugin><inherited> is set to false.

Now flip the inheritance boolean at the <plugin> level to true. Going by the same logic, all executions now would be inherited even if they were individually set to false. Now since the value of <inherited> is true by default, all executions are always inherited and there's no way of overriding them.

I think this is what we should do.

<plugin><inherited> set to true by default.
<execution><inherited> overrides plugin's setting.

if <plugin><inherited> changed to false, all executions inside it are also not inherited, no matter what their individual settings are.


Yann Le Du added a comment - 23/Feb/06 03:53 AM
I think you're right. I've attached test-inheritance-true.zip that shows your point.

John Casey added a comment - 12/Jul/06 04:23 PM
Sorry, just reading over this one more closely, and if we're going to pursue adding a new element to the POM, it should wait for 2.1.

In the meantime, you can override a single execution within a plugin config by making sure it has a matching <id/>.