[ 
http://jira.codehaus.org/browse/MSITE-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=188003#action_188003
 ] 

Robert Davey commented on MSITE-422:
------------------------------------

I'm unsure if these are related, but the bug title seems to match what I'm 
seeing in 2.1-SNAPSHOT.

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:

../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../mysql-impl

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>

If this is in the wrong place, or not related, I can make a new issue.

> Links being "relativized" incorrectly.
> --------------------------------------
>
>                 Key: MSITE-422
>                 URL: http://jira.codehaus.org/browse/MSITE-422
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: relative links
>    Affects Versions: 2.0.1
>            Reporter: Jason Smith
>
> This also appears to be broken in 2.1-SNAPSHOT as the original entry date of 
> this JIRA.  It was first discovered in 2.0, and also affects 2.0.1.
> I have the following links in my site.xml.  This is a multi-module project, 
> but this affects the top-level (parent) project documentation.
>     <links>
>       <item name="Groovy" href="http://groovy.codehaus.org/COM+Scripting/.."; 
> />
>       <item name="Scriptom Wiki" 
> href="http://groovy.codehaus.org/COM+Scripting"; />
>     </links>
> Here is the HTML produced:
>     <a href="../">Groovy</a>  |
>     <a href="http://groovy.codehaus.org/COM+Scripting"; 
> class="externalLink">Scriptom Wiki</a>
> The first link is relativized.  Incorrectly.  My site-distribution is:
> <site>
> <id>codehaus.org.snapshots</id>
> <name>Groovy Website</name>
> <url>dav:https://dav.codehaus.org/groovy/modules/scriptom/SNAPSHOT/${project.version}</url>
> </site>
> Technically, the relative path should be "../../../../..".  It would have 
> worked just fine if the HREF were "http://groovy.codehaus.org/";.  
> Is it actually necessary to complicate the <links/> by relativizing the paths 
> whenever possible, or would it be simpler just to pass the original HREF 
> through unmodified?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to