Issue Details (XML | Word | Printable)

Key: MSITE-293
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Lukas Theussl
Reporter: Andreas Höhmann
Votes: 21
Watchers: 19
Operations

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

Submodule inherit menu but this should not happend

Created: 06/Feb/08 08:28 AM   Updated: 01/Aug/09 01:15 AM   Resolved: 01/Aug/09 01:15 AM
Component/s: inheritance, site descriptor
Affects Version/s: 2.0-beta-6
Fix Version/s: 2.1

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive MSITE-293.zip (2 kB)

Environment:
maven 2.0.8
jdk 1.6
windows
Issue Links:
Duplicate
 
dependent
 


 Description  « Hide

Projectstructur:

modul
|  pom.xml
|  src/site/site.xml
|  src/site/xdoc/index.xml
+-- submodul 1
    |  pom.xml
    |  src/site/xdoc/index.xml
+-- submodul 2
    |  pom.xml
    |  src/site/xdoc/index.xml 

modul :: site.xml

...
         <body>
		<menu ref="parent" />
		
		<menu name="Overview" inherit="top">
		  <item name="Introduction" href="index.html"/>
		</menu>
		
		<menu name="Maven">
			<item name="FAQ" href="faq.html"/>
		  <item name="Profiles" href="maven_profiles.html"/>
		</menu>
		
		<links>
			<item name="Maven Repository" href="http://lp2p067c:82/maven2/repositories/" />
		</links>
		
		<menu ref="modules" inherit="bottom" />
		<menu ref="reports" inherit="bottom" />
 </body>
...

after "mvn clean install site" each submodules has a menu "Maven" ... but i want this only for the "main-modul".
whats wrong?

http://maven.apache.org/plugins/maven-site-plugin/examples/sitedescriptor.html ... Inheritance ... "By default, only the basic settings are inherited. From the body, only the links are inherited, and these accumulate to contain all the parents' site descriptor links."



Arnaud added a comment - 19/Feb/08 04:25 AM

I have the same probleme.
I have a main modul with a site.xml like this

<body>
<menu ref="parent" />
<menu ref="modules"/>
<menu ref="reports"/>

<menu name="Divers">
<item name="Historique des métriques" href="dashboard-report-historic.html"/>
<item name="Documentation" collapse="false">
<item name="Exemple avec APT" href="ex_apt.html" />
<item name="Exemple de FAQ avec fml" href="ex_fml.html"/>
<item name="Exemple avec xdoc" href="ex_xdoc.html" />
<item name="Exemple avec html" href="ex_html.html" />
</item>
</menu>
</body>

And i dont want those item are in the submodules , please what can i do ?


Michael Osipov added a comment - 04/Apr/08 07:07 AM

I suffer from this one too! That's why I removed the automatic references for parent and modules (ref parent/modules) and did it my own.
There is no other way at the moment.


Martin Burger added a comment - 19/May/08 09:20 AM

Duplicate of MSITE-262 and MSITE-297?

I have similar problems with 2.0-beta-6 and current 2.0-beta-7-SNAPSHOT from SVN (Revision: 657789). In 2.0-beta-5 the children's site.xml is respected, but in the other versions it is completely ignored: All menus defined in parent POM are shown in submodules (but should not). Furthermore, all other tags like bannerLeft and poweredBy are not overwritable in submodule's POM.


Michael Osipov added a comment - 19/May/08 09:30 AM

Martin,

downgrade to beta-5 same as I did!


Rahul Choudhary added a comment - 26/Sep/08 12:45 AM

Even After downgrading to beta-5 didnt solved this issue for me. Can anybody help?


Dennis Lundberg added a comment - 15/Feb/09 10:29 AM

Attaching sample project that showcases this issue.


Dennis Lundberg added a comment - 15/Feb/09 10:29 AM

This is not a duplicate of MSITE-262.


Anthony Whitford added a comment - 01/Apr/09 12:20 AM

This needs to be in the pipeline to be fixed, otherwise we can't upgrade! Pretty please...


Gabriel Forro added a comment - 06/May/09 07:34 AM - edited

I have tried the new 2.0 version of maven-site-plugin (Windows XP + Maven 2.0.9). It still contains this bug. The found problems are as it follows:

1. If the child project has not got its own site.xml definition. then all of the menus are inherited (regardless of the existence of the inherit attribute). In my opinion the inheritance could work properly in cases, where the child has not got its own site.xml. Menu inheritance works fine, if the child project has its own site.xml (except for one case which is described in point 2)
2. The special item "parent" is inherited only if the project->url tag is defined in the parent's pom.xml file. If the project->url is not set, then the "parent" menu item is never inherited (even if the child project has its own site.xml)


Lukas Theussl added a comment - 01/Aug/09 01:15 AM

1) is fixed with MSHARED-116, 2) is fixed with MSHARED-117. Please test with site-plugin-2.1-SNAPSHOT.