[ 
http://jira.codehaus.org/browse/MSITE-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_102674
 ] 

John Allen commented on MSITE-229:
----------------------------------

Love the 'Principle of Least Astonishment' reference. Yes you're right that 
this feature was designed primarily to enable the relocation of maven sites 
without having to regenerate them with new POM defined URLs. Also worthy of 
note is that you can not reliable use ${expressions} in the POM project.URL as 
site has to look up and down the project hierarchy (parent and module links) 
and when building without a reactor (ie you're only building a child project on 
its own not the entire hierarchy) one can not always get the 'cooked' 
(interpolated) versions of these POM files and will thus have URLs containing 
the uninterpolated ${} values. Solution to that is to always use the complete 
project hierarchy in a reactor build to generate a site. Anyway I digress. 

I guess this was always intended for links to maven generated pages so maybe we 
could, and we should defer to brett here, modify the site.xml link element to 
support a new attribute that indicates that a link should not be resolved to a 
relative URL? A more drastic solution would be to provide a site mojo 
configuration option to disbale relatives altogether but then you;d be kicking 
yourself when you needed to relocate someone else's mirrored site.

In terms of the docs, by all means please supply a patch to the site pages for 
the plugin, maybe something in the FAQ or in the examples. It's always good to 
make folk aware of the behaviour of the system:)

By the way, there is a site:stage mojo that will lay the site out (deploy) to a 
local folder on your machine so you can test the resulting generated site out 
without having to deploy it to its real location. This mojo also supports a 
deploy option (see docs) which will then deploy that 'staged' site to a remote 
location allowing you to share the 'staged' site with others via HTTP.


> Links in site.xml get translated to ../../../
> ---------------------------------------------
>
>                 Key: MSITE-229
>                 URL: http://jira.codehaus.org/browse/MSITE-229
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-5
>         Environment: Linux FC6  Sun Java (build 1.5.0_10-b03, mixed mode, 
> sharing)
>            Reporter: Mykel Alvis
>            Priority: Minor
>         Attachments: site.xml
>
>
> In Site.xml  for a project (that has a parent POM)
>     <links>
>       <item name="SIRD Site" href="http://sirdsite.dsths.ad.dstcorp.net/"; />
>       <item name="Apache" href="http://www.apache.org/"; />
>       <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
>     </links>
> Gets rendered as 
>   
>           <div class="xright">      <a href="../../../">SIRD Site</a>
>           |
>           <a href="http://www.apache.org/";>Apache</a>
>           |
>           <a href="http://maven.apache.org/maven2/";>Maven 2</a>
>   
> " http://sirdsite.dsths.ad.dstcorp.net/";  !=   "../../.."

-- 
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