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-420

Parent project site descriptor menu options always a link back to parent site

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not A Bug
  • Affects Version/s: 2.0-beta-5, 2.0-beta-6, 2.0-beta-7, 2.0, 2.0.1
  • Fix Version/s: None
  • Component/s: doxia integration, inheritance
  • Labels:
    None
  • Environment:
    Using maven 2.0.9 - and all versions of the site plugin all the way back to 2.0-beta-5.

Description

I'd like to have a parent project define what items are in a given menu for all child projects and let the child projects define the contents of those links (this doesn't work).

In the documentation for the site plugin here:

http://maven.apache.org/plugins/maven-site-plugin/examples/sitedescriptor.html

There is a bit in there about how to get a parent project site descriptor to be inherited by a child project by using the following:

<menu name="My Inherited Menu" inherit="top">

This is great if you want the child project to always link back to the parent project's links/pages for each menu option.

Doxia however shows this is configurable:

http://maven.apache.org/doxia/doxia-sitetools-1.0.x/doxia-decoration-model/decoration.html#class_menu

inheritAsRef - If this is a reference, setting true means that it will be populated in the project, whereas if it is false, it is populated in the parent and then inherited. The default value is false.

This property currently doesn't work.

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

Attachments

  1. Hide
    Zip Archive
    MSITE-420.zip
    20/Jul/10 5:54 AM
    36 kB
    Rüdiger zu Dohna
    1. XML File
      MSITE-420/child/pom.xml 0.5 kB
    2. File
      MSITE-420/child/src/site/apt/index.apt 0.3 kB
    3. XML File
      MSITE-420/child/src/site/site.xml 0.3 kB
    4. File
      MSITE-420/child/.../css/maven-base.css 2 kB
    5. File
      MSITE-420/child/.../css/maven-theme.css 3 kB
    6. File
      MSITE-420/child/target/.../css/print.css 0.2 kB
    7. File
      MSITE-420/child/target/site/css/site.css 0.1 kB
    8. HTML File
      MSITE-420/child/.../site/dependencies.html 4 kB
    9. GIF File
      MSITE-420/child/target/.../images/close.gif 0.3 kB
    10. GIF File
      MSITE-420/child/.../images/collapsed.gif 0.1 kB
    11. GIF File
      MSITE-420/child/.../images/expanded.gif 0.1 kB
    12. PNG File
      MSITE-420/child/.../images/external.png 0.2 kB
    13. GIF File
      MSITE-420/child/.../icon_error_sml.gif 1.0 kB
    14. GIF File
      MSITE-420/child/.../images/icon_info_sml.gif 0.6 kB
    15. GIF File
      MSITE-420/child/.../icon_success_sml.gif 1.0 kB
    16. GIF File
      MSITE-420/child/.../icon_warning_sml.gif 0.6 kB
    17. PNG File
      MSITE-420/child/.../build-by-maven-black.png 2 kB
    18. PNG File
      MSITE-420/child/.../build-by-maven-white.png 2 kB
    19. PNG File
      MSITE-420/child/.../logos/maven-feather.png 3 kB
    20. PNG File
      MSITE-420/child/.../images/newwindow.png 0.2 kB
    21. HTML File
      MSITE-420/child/target/site/index.html 4 kB
    22. HTML File
      MSITE-420/child/.../site/integration.html 4 kB
    23. HTML File
      MSITE-420/child/.../site/issue-tracking.html 4 kB
    24. HTML File
      MSITE-420/child/target/site/license.html 4 kB
    25. HTML File
      MSITE-420/child/.../site/mail-lists.html 4 kB
    26. HTML File
      MSITE-420/child/.../plugin-management.html 7 kB
    27. HTML File
      MSITE-420/child/target/site/plugins.html 4 kB
    28. HTML File
      MSITE-420/child/.../site/project-info.html 6 kB
    29. HTML File
      MSITE-420/child/.../project-summary.html 5 kB
    30. HTML File
      MSITE-420/child/.../source-repository.html 4 kB
    Showing 30 of 35 items Download Zip
    Show
    Zip Archive
    MSITE-420.zip
    20/Jul/10 5:54 AM
    36 kB
    Rüdiger zu Dohna
  2. Hide
    Zip Archive
    MSITE-420.zip
    01/Aug/09 9:24 AM
    4 kB
    Lukas Theussl
    1. XML File
      MSITE-420/pom.xml 0.7 kB
    2. File
      MSITE-420/src/site/apt/index.apt 0.3 kB
    3. XML File
      MSITE-420/src/site/site.xml 0.6 kB
    4. XML File
      MSITE-420/child/pom.xml 0.4 kB
    5. File
      MSITE-420/child/src/site/apt/index.apt 0.3 kB
    6. XML File
      MSITE-420/child/src/site/site.xml 0.3 kB
    Download Zip
    Show
    Zip Archive
    MSITE-420.zip
    01/Aug/09 9:24 AM
    4 kB
    Lukas Theussl

Issue Links

relates to

Bug - A problem which impairs or prevents the functions of the product. MSITE-159 Absolute URI rendered as relative URI if absolute URI related to domain of POM URI

  • Major - Major loss of function.
  • 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
Lukas Theussl added a comment - 01/Aug/09 1:27 AM

If you specify the links in your inherited menu as relative links then they should end up pointing to the child project, not parent.

The inheritAsRef attribute only works with references, eg <menu ref="modules" inherit="bottom" /> and specifies whether the modules, in this case, are populated in the parent or child.

Otherwise, I'm not sure I understood what you want, maybe a small test project could help where you describe the effect you see vs what you expect. See MSITE-293 for an example.

Show
Lukas Theussl added a comment - 01/Aug/09 1:27 AM If you specify the links in your inherited menu as relative links then they should end up pointing to the child project, not parent. The inheritAsRef attribute only works with references, eg <menu ref="modules" inherit="bottom" /> and specifies whether the modules, in this case, are populated in the parent or child. Otherwise, I'm not sure I understood what you want, maybe a small test project could help where you describe the effect you see vs what you expect. See MSITE-293 for an example.
Hide
Permalink
EJ Ciramella added a comment - 01/Aug/09 8:11 AM

I don't understand what you mean by relative then. Here's my "parent" menu structure:

<menu name="Documentation" inherit="top" inheritAsRef="true">
<item name="Overview" href="overview.html"/>
<item name="Building" collapse="true" href="building.html">
<item name="Locally" href="building-locally.html"/>
<item name="CI" href="building-ci.html"/>
</item>
<item name="Dependencies of note" href="dependencies-of-note.html"/>
<item name="Testing" href="testing.html"/>
<item name="Common problems" href="common-problems.html"/>
<item name="Stewards" ref="team-list.html"/>
</menu>

When the child project picks up this site descriptor, all the links are pointing to the parent site.

What am I missing?

I tried prefixing things with "./" but that didn't help.

Show
EJ Ciramella added a comment - 01/Aug/09 8:11 AM I don't understand what you mean by relative then. Here's my "parent" menu structure: <menu name="Documentation" inherit="top" inheritAsRef="true"> <item name="Overview" href="overview.html"/> <item name="Building" collapse="true" href="building.html"> <item name="Locally" href="building-locally.html"/> <item name="CI" href="building-ci.html"/> </item> <item name="Dependencies of note" href="dependencies-of-note.html"/> <item name="Testing" href="testing.html"/> <item name="Common problems" href="common-problems.html"/> <item name="Stewards" ref="team-list.html"/> </menu> When the child project picks up this site descriptor, all the links are pointing to the parent site. What am I missing? I tried prefixing things with "./" but that didn't help.
Hide
Permalink
Lukas Theussl added a comment - 01/Aug/09 9:24 AM

Try the attached test project. Run 'mvn site' in the parent, then check that the files in the child/target/site folder all have links relative to the child (the files are not actually there, but the links are correct).

PS as I said above, the inheritAsRef attribute has no effect for menus that are no references

Show
Lukas Theussl added a comment - 01/Aug/09 9:24 AM Try the attached test project. Run 'mvn site' in the parent, then check that the files in the child/target/site folder all have links relative to the child (the files are not actually there, but the links are correct). PS as I said above, the inheritAsRef attribute has no effect for menus that are no references
Hide
Permalink
EJ Ciramella added a comment - 03/Aug/09 10:19 AM

Hmm - that seems to work if it's a parent/child like this (where one contains the other). Our parent->child relationship is more like corp pom->other module (where they aren't nested).

How do I get this working?

Show
EJ Ciramella added a comment - 03/Aug/09 10:19 AM Hmm - that seems to work if it's a parent/child like this (where one contains the other). Our parent->child relationship is more like corp pom->other module (where they aren't nested). How do I get this working?
Hide
Permalink
Rüdiger zu Dohna added a comment - 20/Jul/10 5:54 AM - edited

wow... this is a funny bug! I hunted it down to the url tag. Just by adding that tag to the child pom breaks all links inherited from the parent site.xml.

Please find a modified MSITE-420.zip attached. I have also updated the version of the site plugin to 2.1.1 and added an About item mapped to the index.html, so it's quicker to see the difference.

Show
Rüdiger zu Dohna added a comment - 20/Jul/10 5:54 AM - edited wow... this is a funny bug! I hunted it down to the url tag. Just by adding that tag to the child pom breaks all links inherited from the parent site.xml. Please find a modified MSITE-420.zip attached. I have also updated the version of the site plugin to 2.1.1 and added an About item mapped to the index.html, so it's quicker to see the difference.
Hide
Permalink
Lukas Theussl added a comment - 19/Dec/10 9:53 AM

If you add a url to the child you also have to add one to the parent. You didn't specify any distributionManagement url, in this case the site plugin will automatically add the child artifactId to the effective deploy location, so the child will be one directory below the parent. However, relative links are calculated from the project url, so if your parent has <url>http://parent/</url> then your child needs <url>http://parent/child/</url>.

Show
Lukas Theussl added a comment - 19/Dec/10 9:53 AM If you add a url to the child you also have to add one to the parent. You didn't specify any distributionManagement url, in this case the site plugin will automatically add the child artifactId to the effective deploy location, so the child will be one directory below the parent. However, relative links are calculated from the project url, so if your parent has <url>http://parent/</url> then your child needs <url>http://parent/child/</url>.
Hide
Permalink
Lukas Theussl added a comment - 19/Dec/10 9:54 AM

Please open a new issue with a specific test project if anything is unclear.

Show
Lukas Theussl added a comment - 19/Dec/10 9:54 AM Please open a new issue with a specific test project if anything is unclear.

People

  • Assignee:
    Lukas Theussl
    Reporter:
    EJ Ciramella
Vote (2)
Watch (2)

Dates

  • Created:
    31/Jul/09 7:41 AM
    Updated:
    07/Feb/11 7:10 AM
    Resolved:
    19/Dec/10 9:54 AM
  • 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.