jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x and 3.x Site Plugin
  • MSITE-270

site.xml: menus inherited that should not

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0-beta-6
  • Fix Version/s: 2.0-beta-7
  • Component/s: inheritance, site descriptor
  • Labels:
    None

Description

I have a project with multiple levels of modules.
In the toplevel project I declare a site-descriptor with some general menu's that have no inherit attribute (I also tried inherit='none') together with
<menu ref="parent" inherit="top"/>
<menu ref="modules" inherit="bottom"/>
<menu ref="reports" inherit="bottom"/>

Now a module of the toplevel project that itself has modules declares a site-descriptor with an additional regular menu that is inherited.
However the site of that module contains the menus from the toplevel project that are NOT declared to be inherited.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    site-inherit-bug.zip
    12/Nov/07 2:57 PM
    3 kB
    Jörg Hohwiller
    1. XML File
      site-inherit-bug/module1/pom.xml 0.5 kB
    2. XML File
      site-inherit-bug/module1/.../site/site.xml 0.5 kB
    3. XML File
      site-inherit-bug/pom.xml 0.8 kB
    4. XML File
      site-inherit-bug/src/site/site.xml 2 kB
    Download Zip
    Show
    Zip Archive
    site-inherit-bug.zip
    12/Nov/07 2:57 PM
    3 kB
    Jörg Hohwiller

Issue Links

relates to

Bug - A problem which impairs or prevents the functions of the product. MSHARED-18 Inheritance of elements from site descriptor quite broken

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Jörg Hohwiller added a comment - 12/Nov/07 2:56 PM

I just created a mini project as isolated test to reproduce the bug:
It only occurs with 2.0-beta-6 and not with 2.0-beta-5. However it seems that I can not change the affected versions.

Show
Jörg Hohwiller added a comment - 12/Nov/07 2:56 PM I just created a mini project as isolated test to reproduce the bug: It only occurs with 2.0-beta-6 and not with 2.0-beta-5. However it seems that I can not change the affected versions.
Hide
Permalink
Jörg Hohwiller added a comment - 12/Nov/07 2:57 PM

Example project to reproduce the bug with 2.0-beta-6
do mvn site:stage -DstagingDirectory=</some/dir>

Show
Jörg Hohwiller added a comment - 12/Nov/07 2:57 PM Example project to reproduce the bug with 2.0-beta-6 do mvn site:stage -DstagingDirectory=</some/dir>
Hide
Permalink
Guimiot Isabelle added a comment - 07/Dec/07 4:48 AM - edited

I have a problem that seems to be linked to this one (beta-6) : I have a root module and some sub-modules.

The root site.xml contains :

<body>
<menu ref="modules" />
<menu name="Menu">
<item name="Root Doc" href="/rootDoc.html" />
</menu>
</body>

and each sub-module site.xml contains :

<body>
<menu ref="parent" />
<menu ref="reports" />
<menu name="Menu" >
<item name="Foo" href="/foo.html"/>
</menu>
</body>

When I launch the site goal, I obtain this menu :

  • in the root site (correct) :

----------------------------
Modules
Project 1
Project 2

Menu
Root Doc
----------------------------

  • in the sub-modules site (completely wrong) :

----------------------------
Menu
Root Doc
----------------------------

...instead of stuff like that :
----------------------------
Parent
Parent Project

Reports
Report 1
Report 2
Report 3
...

Menu
Foo
----------------------------

If I understand, it seems that the submodule site.xml is totally ignored, and replaced by an inherited site.xml from the root module. I also tried to put some "inherit" attributes everywhere in both files (root and submodule) but it didn't change anything...
This issue is very important, I have to keep my beta-5 version until it's resolved.

thanx
Isabelle

Show
Guimiot Isabelle added a comment - 07/Dec/07 4:48 AM - edited I have a problem that seems to be linked to this one (beta-6) : I have a root module and some sub-modules. The root site.xml contains : <body> <menu ref="modules" /> <menu name="Menu"> <item name="Root Doc" href="/rootDoc.html" /> </menu> </body> and each sub-module site.xml contains : <body> <menu ref="parent" /> <menu ref="reports" /> <menu name="Menu" > <item name="Foo" href="/foo.html"/> </menu> </body> When I launch the site goal, I obtain this menu :
  • in the root site (correct) :
---------------------------- Modules Project 1 Project 2 Menu Root Doc ----------------------------
  • in the sub-modules site (completely wrong) :
---------------------------- Menu Root Doc ---------------------------- ...instead of stuff like that : ---------------------------- Parent Parent Project Reports Report 1 Report 2 Report 3 ... Menu Foo ---------------------------- If I understand, it seems that the submodule site.xml is totally ignored, and replaced by an inherited site.xml from the root module. I also tried to put some "inherit" attributes everywhere in both files (root and submodule) but it didn't change anything... This issue is very important, I have to keep my beta-5 version until it's resolved. thanx Isabelle
Hide
Permalink
Bouiaw added a comment - 02/Apr/08 10:44 AM

Please correct affects version, this bug only occured with beta6, not beta 5.

Show
Bouiaw added a comment - 02/Apr/08 10:44 AM Please correct affects version, this bug only occured with beta6, not beta 5.
Hide
Permalink
Dennis Lundberg added a comment - 27/Jun/08 8:43 AM

I can confirm that menus get inherited even when they aren't marked as such, with 2.0-beta-6-SNAPSHOT. However using 2.0-beta-7-SNAPSHOT seems to solve the issue.

Show
Dennis Lundberg added a comment - 27/Jun/08 8:43 AM I can confirm that menus get inherited even when they aren't marked as such, with 2.0-beta-6-SNAPSHOT. However using 2.0-beta-7-SNAPSHOT seems to solve the issue.
Hide
Permalink
Anne Gerodolle added a comment - 30/Jun/08 10:32 AM

I have just tried the site-inherit-bug example with 2.0-beta-7-SNAPSHOT AND with the release candidate , and I obtained a "nullpointer exception" in doxia PathUtils.getRelativePath .
we tried on 2 different machines : Linux and Windows and obtained the same problem.
2.0-beta-6 does not crash .

I have also tried a simpler example that does not crash, and I observed that menus that should get inherited are not (whereas with 2.0-beta-6 menus were inherited that shouldnot !) .

Show
Anne Gerodolle added a comment - 30/Jun/08 10:32 AM I have just tried the site-inherit-bug example with 2.0-beta-7-SNAPSHOT AND with the release candidate , and I obtained a "nullpointer exception" in doxia PathUtils.getRelativePath . we tried on 2 different machines : Linux and Windows and obtained the same problem. 2.0-beta-6 does not crash . I have also tried a simpler example that does not crash, and I observed that menus that should get inherited are not (whereas with 2.0-beta-6 menus were inherited that shouldnot !) .
Hide
Permalink
Dennis Lundberg added a comment - 30/Jun/08 4:00 PM

I'm on Windows XP using Maven 2.0.8 and Sun's JDK 1.4.2_17. When I go in and run

mvn site:stage -DstagingDirectory=/some/dir

The site for "module1" has the "Documentation" menu, which it shouldn't. The menu structure looks like this:

General Information

    * Introduction
    * Overview
    * Release Notes

Parent Project

    * Site-Inherti-Bug

General Information

    * Introduction
    * Overview
    * Getting Involved
    * Road Map
    * Release Notes
    * History
    * Stories

Documentation

    * Javadoc
    * FAQ
    * Users Guide

Developer Guides

    * Setup
    * Conventions

Project Documentation

    * Project Information
          o About
          o Continuous Integration
          o Dependencies
          o Dependency Convergence
          o Issue Tracking
          o Mailing Lists
          o Project License
          o Project Summary
          o Project Team
          o Source Repository

Then I go into the parent POM and change 2.0-beta-6-SNAPSHOT to 2.0-beta-7-SNAPSHOT, remove the "some" directories and run the same command again.

The site for "module1" no longer has the "Documentation" menu. The menu structure looks like this:

Parent Project

    * Site-Inherti-Bug

General Information

    * Introduction
    * Overview
    * Release Notes

Project Documentation

    * Project Information
          o About
          o Continuous Integration
          o Dependencies
          o Dependency Convergence
          o Issue Tracking
          o Mailing Lists
          o Project License
          o Project Summary
          o Project Team
          o Source Repository

If you have other results, please shared them with us. Also specify OS, JDK and Maven version.

Show
Dennis Lundberg added a comment - 30/Jun/08 4:00 PM I'm on Windows XP using Maven 2.0.8 and Sun's JDK 1.4.2_17. When I go in and run
mvn site:stage -DstagingDirectory=/some/dir
The site for "module1" has the "Documentation" menu, which it shouldn't. The menu structure looks like this:
General Information

    * Introduction
    * Overview
    * Release Notes

Parent Project

    * Site-Inherti-Bug

General Information

    * Introduction
    * Overview
    * Getting Involved
    * Road Map
    * Release Notes
    * History
    * Stories

Documentation

    * Javadoc
    * FAQ
    * Users Guide

Developer Guides

    * Setup
    * Conventions

Project Documentation

    * Project Information
          o About
          o Continuous Integration
          o Dependencies
          o Dependency Convergence
          o Issue Tracking
          o Mailing Lists
          o Project License
          o Project Summary
          o Project Team
          o Source Repository
Then I go into the parent POM and change 2.0-beta-6-SNAPSHOT to 2.0-beta-7-SNAPSHOT, remove the "some" directories and run the same command again. The site for "module1" no longer has the "Documentation" menu. The menu structure looks like this:
Parent Project

    * Site-Inherti-Bug

General Information

    * Introduction
    * Overview
    * Release Notes

Project Documentation

    * Project Information
          o About
          o Continuous Integration
          o Dependencies
          o Dependency Convergence
          o Issue Tracking
          o Mailing Lists
          o Project License
          o Project Summary
          o Project Team
          o Source Repository
If you have other results, please shared them with us. Also specify OS, JDK and Maven version.
Hide
Permalink
Anne Gerodolle added a comment - 01/Jul/08 10:45 AM

Dennis,

I was observing a "NullPointerException" that prevented the child's site from being built.

After doing some research on jira, I've modified the pom to add an "URL" tag in the parent pom (as mentionned by Benjamin in MSITE-180) . Now the example works just as you are describing.

I'm running maven on Linux ubuntu, using Maven 2.0.9 and Sun's JDK 1.5.0_15-b05 I've tried also with jdk 1.4.2, with the same result.

I'm going to check my previous example where inherited menus are missing and try to understand the difference.

Show
Anne Gerodolle added a comment - 01/Jul/08 10:45 AM Dennis, I was observing a "NullPointerException" that prevented the child's site from being built. After doing some research on jira, I've modified the pom to add an "URL" tag in the parent pom (as mentionned by Benjamin in MSITE-180) . Now the example works just as you are describing. I'm running maven on Linux ubuntu, using Maven 2.0.9 and Sun's JDK 1.5.0_15-b05 I've tried also with jdk 1.4.2, with the same result. I'm going to check my previous example where inherited menus are missing and try to understand the difference.
Hide
Permalink
Anne Gerodolle added a comment - 01/Jul/08 11:17 AM

menu inheritance seems to work now on my example. (I had misspelled "inherit" in my example) . The problem of NullPointerException is minor, as you may easily avoid it by specifying the "URL" tag.
good job

Show
Anne Gerodolle added a comment - 01/Jul/08 11:17 AM menu inheritance seems to work now on my example. (I had misspelled "inherit" in my example) . The problem of NullPointerException is minor, as you may easily avoid it by specifying the "URL" tag. good job
Hide
Permalink
Dennis Lundberg added a comment - 01/Jul/08 2:38 PM

Hi Anne,

I tried this now on Ubuntu 7.10 using Maven 2.0.8 and 2.0.9 using the bundled Blackdown 1.4.2-02 Java. All this running inside VirtualBox on Windows XP.

When I opened up for the SNAPSHOT repository I had to add a version, because of some issue with the 2.1-SNAPSHOT of maven-project-info-reports-plugin, like this:

      <plugin>

        <groupId>org.apache.maven.plugins</groupId>

        <artifactId>maven-project-info-reports-plugin</artifactId>

        <version>2.0.1</version>

      </plugin>

Apart from that I don't see any NPE under Ubuntu.

The menu inheritance is solved by upgrading to 2.0-beta-7-SNAPSHOT of the site plugin. That is the same behavior I see under Windows XP.

Show
Dennis Lundberg added a comment - 01/Jul/08 2:38 PM Hi Anne, I tried this now on Ubuntu 7.10 using Maven 2.0.8 and 2.0.9 using the bundled Blackdown 1.4.2-02 Java. All this running inside VirtualBox on Windows XP. When I opened up for the SNAPSHOT repository I had to add a version, because of some issue with the 2.1-SNAPSHOT of maven-project-info-reports-plugin, like this:
      <plugin>

        <groupId>org.apache.maven.plugins</groupId>

        <artifactId>maven-project-info-reports-plugin</artifactId>

        <version>2.0.1</version>

      </plugin>

Apart from that I don't see any NPE under Ubuntu. The menu inheritance is solved by upgrading to 2.0-beta-7-SNAPSHOT of the site plugin. That is the same behavior I see under Windows XP.
Hide
Permalink
Dennis Lundberg added a comment - 02/Jul/08 4:14 PM

I'm closing this as fixed now.

If someone can reproduce the NPE, then please open another issue for that.

Show
Dennis Lundberg added a comment - 02/Jul/08 4:14 PM I'm closing this as fixed now. If someone can reproduce the NPE, then please open another issue for that.

People

  • Assignee:
    Dennis Lundberg
    Reporter:
    Jörg Hohwiller
Vote (14)
Watch (13)

Dates

  • Created:
    12/Nov/07 2:39 PM
    Updated:
    02/Jul/08 4:14 PM
    Resolved:
    02/Jul/08 4:14 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.