Maven 2.x and 3.x Site Plugin

Wrong url in banner left url when page has more 2 sub directories

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0-beta-6
  • Fix Version/s: 2.3, 3.0
  • Component/s: relative links
  • Labels:
    None
  • Environment:
    svn rev 599447
  • Number of attachments :
    0

Description

Follow the following steps:
1. go to http://maven.apache.org/repository/index.html or http://maven.apache.org/developers/committer-environment.html
2. and click on the Maven logo (top left)
3. the page is http://maven.apache.org/ which is the correct behaviour

But try to reproduce the same with 2 sub directories in the url, like http://maven.apache.org/guides/mini/guide-central-repository-upload.html
The url is http://maven.apache.org/guides/ instead of http://maven.apache.org/

Issue Links

Activity

Hide
Lukas Theussl added a comment -

Vincent, I believe this is fixed in current 2.1-SNAPSHOT, can you confirm?

Btw, the links in the deployed pages above are already different than what you describe but still not correct...

Show
Lukas Theussl added a comment - Vincent, I believe this is fixed in current 2.1-SNAPSHOT, can you confirm? Btw, the links in the deployed pages above are already different than what you describe but still not correct...
Hide
Vincent Siveton added a comment -

Using 2.1-SNAP on Maven site, the pb is still there...

Go to site/target/site/developers/index.html and the Maven logo url is site/developers/index.html instead of trunks/site/target/site/index.html

I spot a regression: go to site/download.html, the Maven logo url is site/download.html instead of site/index.html

Show
Vincent Siveton added a comment - Using 2.1-SNAP on Maven site, the pb is still there... Go to site/target/site/developers/index.html and the Maven logo url is site/developers/index.html instead of trunks/site/target/site/index.html I spot a regression: go to site/download.html, the Maven logo url is site/download.html instead of site/index.html
Hide
Dennis Lundberg added a comment - - edited

The problem is in doxia-decoration-model:DefaultDecorationModelInheritanceAssembler.resolveBannerPaths() which calls convertPath() and after a couple of more calls we end up in plexus-utils:PathTool.getRelativeWebPath(). For two URLs that are equal the relative path between them is nothing. Thus the href on the banner is actually "" if you look at the source.

This happens when the parent and child has identical URLs.

We could resolve the problem by removing the <url> element from our parent POM, but that feels like cheating.

Show
Dennis Lundberg added a comment - - edited The problem is in doxia-decoration-model:DefaultDecorationModelInheritanceAssembler.resolveBannerPaths() which calls convertPath() and after a couple of more calls we end up in plexus-utils:PathTool.getRelativeWebPath(). For two URLs that are equal the relative path between them is nothing. Thus the href on the banner is actually "" if you look at the source. This happens when the parent and child has identical URLs. We could resolve the problem by removing the <url> element from our parent POM, but that feels like cheating.
Hide
Lukas Theussl added a comment -

AFAICS, the main problem was in the skin, should be fixed with DOXIASITETOOLS-43 and MSKINS-9

Show
Lukas Theussl added a comment - AFAICS, the main problem was in the skin, should be fixed with DOXIASITETOOLS-43 and MSKINS-9

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: