Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 3.0-beta-3
-
Fix Version/s: None
-
Component/s: inheritance
-
Labels:None
-
Environment:maven 3.0
-
Number of attachments :
Description
I have a parent project with a site descriptor where I have defined a menu like this:
...
<menu name="Overview" inherit="top">
<item name="Introduction" href="/index.html" />
</menu>
...
Now I have a child project which should "overwrite" OR add addition item(s) to the inherited site descriptor like this:
...
<menu name="Overview">
<item name="Introduction" href="/index.html" />
<item name="Deployment instruction" href="/deploy.html" />
</menu>
...
The current behavior is that the "Overview" menu is rendered twice in the resulting site.
But I expect that the additional menu item will be mixed into the "Overview" menu.
Issue Links
- duplicates
-
MSITE-378
Support polymorphism for menu inheritance
-
Hi, the current behavior has been introduced with maven-site-plugin version 2.1 for fixing
MSITE-293, where the inheritance concept is not usable for us. One can choose whether a menu is always inherited (with no way of overriding in children) or not inherited at all. This choice is made in the parent project. Child projects don't have a control at all.In versions until 2.0.1, menus (without the inherit attribute) have been inherited from the parent unless a site.xml is present. When a project needed to add a link to a menu, a site.xml had to be added, and all menus had to be redefined. We never made use of the "inherit" attribute, for the reasons explained in the description.
For a working around this issue, we have been stuck with version 2.0.1. Unfortunately, this now holds us back from migrating to Maven 3, as the old plugin version is not compatible.
There should really be a way of overriding inherited menus, so that they can be extended (or even replaced or removed). For this, child projects have to control the inheritence.