[ http://jira.codehaus.org/browse/MSITE-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249027#action_249027 ]
Lukas Theussl commented on MSITE-423: ------------------------------------- I could fix your test project by appending a "/" to the pom <url>s and by fixing some links that are obviously wrong (eg in module1's site.xml, the link to submodule1 should be href="./link-problem-submodule1/index.html" instead of href="./link-problem-module1/link-problem-submodule1/index.html"). After that, a local site deploy gave correct links, so the problem is only for site:stage. > <links> item hrefs not relativised properly when inherited by child modules > --------------------------------------------------------------------------- > > Key: MSITE-423 > URL: http://jira.codehaus.org/browse/MSITE-423 > Project: Maven 2.x and 3.x Site Plugin > Issue Type: Bug > Components: relative links > Affects Versions: 2.1 > Environment: Linux, JDK 1.6.0_07, Maven 2.1.0 > Reporter: Robert Davey > Attachments: doxia-sitetools.patch, site-plugin_link-problem.tar.gz > > > 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> -- 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