Uploaded image for project: 'Maven Site Plugin'
  1. Maven Site Plugin
  2. MSITE-423

<links> item hrefs not relativised properly when inherited by child modules

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.3, 3.0
    • relative links
    • None
    • Linux, JDK 1.6.0_07, Maven 2.1.0

    Description

      See attachment for reproducible minimal case.

      I have a multi-module project, for the sake of argument laid out thus:

      • parent
        • pom.xml
      • module1
        • pom.xml
        • src/site/site.xml
        • apt/index.apt
        • submodule1
          • pom.xml
          • src/site/site.xml
          • apt/index.apt

      I specify some links in our parent POM that I want to be inherited by all child multi-modules. I would hope these links would always point to the relevant html files in the super parent project for all children, no matter the nesting level.

      <links>
      <item name="Home" href="/index.html"/>
      <item name="Getting Started" href="/getting-started.html"/>
      <item name="Documentation" href="/documentation.html"/>
      </links>

      These links work fine for the super parent menu. The same problem, outlined below, is apparent whether the links are prefixed by "/" or "./"

      When navigating down to module1, all the href links become:

      ../module1

      Navigating again down to submodule1 of module1, the links become (or something equally wacky):

      ../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../submodule1

      All the pom.xml files in each module refer to the staged url correctly, and these don't seem to make any difference to the eventual href whatsoever... e.g.

      parent: <url>http://server/</url>
      module1: <url>http://server/module1</url>
      submodule1: <url>http://server/module1/submodule1</url>

      Attachments

        1. doxia-sitetools.patch
          3 kB
          Roland Huss
        2. site-plugin_link-problem.tar.gz
          63 kB
          Robert Davey

        Issue Links

          Activity

            People

              ltheussl Lukas Theussl
              fr0ggler Robert Davey
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: