Maven Site Plugin
  1. Maven Site Plugin
  2. MSITE-159

Absolute URI rendered as relative URI if absolute URI related to domain of POM URI

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3, 3.0
    • Component/s: relative links
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Under site-beta5

      if the POM references a URI like

      <url>http://struts.apache.org</url>

      absolute URLs used in the site.xml file are converted to relative references.

      For example a reference to to "http://struts.apache.org/1.x" becomes "1.x", and a reference to
      just "http://struts.apache.org" becomes an empty string.

      If the documentation is being used offline, there are many cases when we want to refer people back to the website, to be sure the current information is used. The best use case is a download page that determines the mirror via CGI.

      Another use case is referring to a sister site in the domain, that might refer to another version. If used locally, the other site might not be in the relative location.

      Switching back to beta4 cures the behavior, and absolute URIs remain absolute, as expected.

        Issue Links

          Activity

          Hide
          M. Rohrmoser added a comment -

          Sadly, the workaround above will not work with Firefox 3.0 - see https://bugzilla.mozilla.org/show_bug.cgi?id=43659

          Show
          M. Rohrmoser added a comment - Sadly, the workaround above will not work with Firefox 3.0 - see https://bugzilla.mozilla.org/show_bug.cgi?id=43659
          Hide
          Kay Grosskop added a comment -

          Hmmm. nothing happend yet.

          I think this is really a design decision. Although in my eyes a faulty one.
          Maven just assumes, that the location of the site generated by maven should always be the projects main site (specified in the pom as <project><url> )
          As mentioned above, there are legitime cases where this is not true. And technically it would be a perfect solution just not to intervent by automagically truncate absolute url's.

          It would be nice someone responsible at maven could motivate the current policy.

          Show
          Kay Grosskop added a comment - Hmmm. nothing happend yet. I think this is really a design decision. Although in my eyes a faulty one. Maven just assumes, that the location of the site generated by maven should always be the projects main site (specified in the pom as <project><url> ) As mentioned above, there are legitime cases where this is not true. And technically it would be a perfect solution just not to intervent by automagically truncate absolute url's. It would be nice someone responsible at maven could motivate the current policy.
          Hide
          Robert Burrell Donkin added a comment -

          Introducing buggy URL rewriting code just because some Maven users don't understand URLs is a poor design choice.

          Show
          Robert Burrell Donkin added a comment - Introducing buggy URL rewriting code just because some Maven users don't understand URLs is a poor design choice.
          Hide
          Dmitry Grigoriev added a comment -

          Workaround mentioned by M. Rohrmoser does not work even in URL path component. I'd like to have just a couple of attributes for few particular menu items:

          <item name="..." href="..." rewrite="false" external="true"/>

          Show
          Dmitry Grigoriev added a comment - Workaround mentioned by M. Rohrmoser does not work even in URL path component. I'd like to have just a couple of attributes for few particular menu items: <item name="..." href="..." rewrite="false" external="true"/>
          Hide
          Lukas Theussl added a comment -

          Fixed with MSHARED-189 and r1076195.
          There is now a parameter <relativizeDecorationLinks> (default value: true) that can be used to switch off relativization.

          Show
          Lukas Theussl added a comment - Fixed with MSHARED-189 and r1076195 . There is now a parameter <relativizeDecorationLinks> (default value: true) that can be used to switch off relativization.

            People

            • Assignee:
              Lukas Theussl
              Reporter:
              Ted Husted
            • Votes:
              22 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: