Maven 2.x and 3.x Site Plugin

Submodule inherit menu but this should not happend

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 2.0-beta-6
  • Fix Version/s: 2.1
  • Labels:
    None
  • Environment:
    maven 2.0.8
    jdk 1.6
    windows
  • Number of attachments :
    1

Description

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."

Issue Links

Activity

Hide
Arnaud added a comment -

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 ?

Show
Arnaud added a comment - 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 ?
Hide
Michael Osipov added a comment -

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.

Show
Michael Osipov added a comment - 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.
Hide
Martin Burger added a comment -

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.

Show
Martin Burger added a comment - 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.
Hide
Michael Osipov added a comment -

Martin,

downgrade to beta-5 same as I did!

Show
Michael Osipov added a comment - Martin, downgrade to beta-5 same as I did!
Hide
Rahul Choudhary added a comment -

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

Show
Rahul Choudhary added a comment - Even After downgrading to beta-5 didnt solved this issue for me. Can anybody help?
Hide
Dennis Lundberg added a comment -

Attaching sample project that showcases this issue.

Show
Dennis Lundberg added a comment - Attaching sample project that showcases this issue.
Hide
Dennis Lundberg added a comment -

This is not a duplicate of MSITE-262.

Show
Dennis Lundberg added a comment - This is not a duplicate of MSITE-262.
Hide
Anthony Whitford added a comment -

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

Show
Anthony Whitford added a comment - This needs to be in the pipeline to be fixed, otherwise we can't upgrade! Pretty please...
Hide
Gabriel Forro added a comment - - 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)

Show
Gabriel Forro added a comment - - 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)
Hide
Lukas Theussl added a comment -

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

Show
Lukas Theussl added a comment - 1) is fixed with MSHARED-116, 2) is fixed with MSHARED-117. Please test with site-plugin-2.1-SNAPSHOT.

People

Vote (21)
Watch (19)

Dates

  • Created:
    Updated:
    Resolved: