You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Schulte (JIRA)" <ji...@codehaus.org> on 2012/10/11 05:24:36 UTC

[jira] (MSITE-659) 'relativizeDecorationLinks' relativizes too much.

Christian Schulte created MSITE-659:
---------------------------------------

             Summary: 'relativizeDecorationLinks' relativizes too much.
                 Key: MSITE-659
                 URL: https://jira.codehaus.org/browse/MSITE-659
             Project: Maven 2.x and 3.x Site Plugin
          Issue Type: Bug
          Components: relative links
    Affects Versions: 3.1
            Reporter: Christian Schulte


When relativizing links, the plugin produces relative links to content not generated by the plugin which should be kept absolute.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-659) 'relativizeDecorationLinks' relativizes too much.

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSITE-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte updated MSITE-659:
------------------------------------

    Attachment: MSITE-659.zip

Example project demonstrating the issue.

Execute 'mvn site' and open the 'target/site/index.html' page in a browser. The 'Outside Jar' link in the navigation should be an absolute link.


                
> 'relativizeDecorationLinks' relativizes too much.
> -------------------------------------------------
>
>                 Key: MSITE-659
>                 URL: https://jira.codehaus.org/browse/MSITE-659
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: relative links
>    Affects Versions: 3.1
>            Reporter: Christian Schulte
>         Attachments: MSITE-659.zip
>
>
> When relativizing links, the plugin produces relative links to content not generated by the plugin which should be kept absolute.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-659) 'relativizeDecorationLinks' relativizes too much.

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311445#comment-311445 ] 

Christian Schulte commented on MSITE-659:
-----------------------------------------

This is a request to add a new 'site:offline-jar' goal supporting the use case mentioned above then :-).
                
> 'relativizeDecorationLinks' relativizes too much.
> -------------------------------------------------
>
>                 Key: MSITE-659
>                 URL: https://jira.codehaus.org/browse/MSITE-659
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: relative links
>    Affects Versions: 3.1
>            Reporter: Christian Schulte
>         Attachments: MSITE-659-absolute.zip, MSITE-659.zip, MSITE-659.zip
>
>
> When relativizing links, the plugin produces relative links to content not generated by the plugin which should be kept absolute.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-659) 'relativizeDecorationLinks' relativizes too much.

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311443#comment-311443 ] 

Lukas Theussl commented on MSITE-659:
-------------------------------------

I repeat what I said above, this is a feature not a bug :). Read http://maven.apache.org/plugins/maven-site-plugin/faq.html#Why_dont_the_links_between_parent_and_child_modules_work_when_I_run_mvn_site

If you want to browse the site locally you have to use site:stage, site:jar is for deployment, in which case you should know where to put individual pieces.
                
> 'relativizeDecorationLinks' relativizes too much.
> -------------------------------------------------
>
>                 Key: MSITE-659
>                 URL: https://jira.codehaus.org/browse/MSITE-659
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: relative links
>    Affects Versions: 3.1
>            Reporter: Christian Schulte
>         Attachments: MSITE-659-absolute.zip, MSITE-659.zip, MSITE-659.zip
>
>
> When relativizing links, the plugin produces relative links to content not generated by the plugin which should be kept absolute.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-659) 'relativizeDecorationLinks' relativizes too much.

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311433#comment-311433 ] 

Lukas Theussl commented on MSITE-659:
-------------------------------------

WDYM with 'only affects the site:jar goal'? The jar goal just takes the previously generated site and jars it up, but the site itself is identical to the one generated by site:site. I don't think it is a good idea to make the site:jar goal behave differently. Actually, I don't quite understand what the problem is really. If you jar up sites of different sub-modules and deploy them to the right locations then relative/absolute links don't matter. If you deploy the jars to different locations then the sites are independent and you shouldn't be using relative links in the first place.
                
> 'relativizeDecorationLinks' relativizes too much.
> -------------------------------------------------
>
>                 Key: MSITE-659
>                 URL: https://jira.codehaus.org/browse/MSITE-659
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: relative links
>    Affects Versions: 3.1
>            Reporter: Christian Schulte
>         Attachments: MSITE-659.zip, MSITE-659.zip
>
>
> When relativizing links, the plugin produces relative links to content not generated by the plugin which should be kept absolute.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-659) 'relativizeDecorationLinks' relativizes too much.

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311402#comment-311402 ] 

Lukas Theussl commented on MSITE-659:
-------------------------------------

Currently it is only possible to either relativize or not relativize *all* links, see the documentation of the [relativizeDecorationLinks|http://maven.apache.org/plugins/maven-site-plugin/site-mojo.html#relativizeDecorationLinks] parameter.
                
> 'relativizeDecorationLinks' relativizes too much.
> -------------------------------------------------
>
>                 Key: MSITE-659
>                 URL: https://jira.codehaus.org/browse/MSITE-659
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: relative links
>    Affects Versions: 3.1
>            Reporter: Christian Schulte
>         Attachments: MSITE-659.zip, MSITE-659.zip
>
>
> When relativizing links, the plugin produces relative links to content not generated by the plugin which should be kept absolute.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-659) 'relativizeDecorationLinks' relativizes too much.

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSITE-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte updated MSITE-659:
------------------------------------

    Attachment: MSITE-659.zip

Updated the example project.

This issue mainly affects the 'site:jar' goal. See the generated navigation. The 'Inside Jar' link correctly points to content inside the jar file, the 'Outside Jar' link incorrectly points to content outside the jar file.

                
> 'relativizeDecorationLinks' relativizes too much.
> -------------------------------------------------
>
>                 Key: MSITE-659
>                 URL: https://jira.codehaus.org/browse/MSITE-659
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: relative links
>    Affects Versions: 3.1
>            Reporter: Christian Schulte
>         Attachments: MSITE-659.zip, MSITE-659.zip
>
>
> When relativizing links, the plugin produces relative links to content not generated by the plugin which should be kept absolute.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-659) 'relativizeDecorationLinks' relativizes too much.

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311420#comment-311420 ] 

Christian Schulte commented on MSITE-659:
-----------------------------------------

This issue seems to only affect the 'site:jar' goal in combination with decoration model inheritance. Building a parent site jar, absolute links from the parent 'site.xml' should be made relative. Inherited to a child, they should be kept absolute there. Maybe the 'site:jar' goal needs a new parameter 'absolutizeDecorationLinks' so that it is possible to use relative links in all 'site.xml' files and make the 'site:jar' goal update all references to files outside the jar currently being built to absolute paths ?

                
> 'relativizeDecorationLinks' relativizes too much.
> -------------------------------------------------
>
>                 Key: MSITE-659
>                 URL: https://jira.codehaus.org/browse/MSITE-659
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: relative links
>    Affects Versions: 3.1
>            Reporter: Christian Schulte
>         Attachments: MSITE-659.zip, MSITE-659.zip
>
>
> When relativizing links, the plugin produces relative links to content not generated by the plugin which should be kept absolute.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-659) 'relativizeDecorationLinks' relativizes too much.

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSITE-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte updated MSITE-659:
------------------------------------

    Attachment: MSITE-659-absolute.zip

Another example project demonstrating the issue. Unzip and execute 'mvn site'. Open 'target/site/index.html' from the parent project in a browser. The 'Inside Parent Jar' link got relativized correctly - that link is working ok at the deployed location and also inside the parent jar file. Now open the 'child/target/site/index.html' from the child project in a browser. The inherited 'Inside Parent Jar' link got relativized correctly but that link only works when actually deployed to a web server. It is not working inside the jar where it should be an absolute link. Absolute link in the jar - relative link in the deployed web site. Now repeat the above with the 'relativizeDecorationLinks' parameter set to 'false' (mvn clean site -DrelativizeDecorationLinks=false). The 'Inside Parent Jar' link in the 'target/site/index.html' from the parent site now is kept absolute. This is kind of useless in the parent site jar and in the deployed web site. That same link in the 'child/target/site/index.html' from the child site is absolute in the child. That link now is working in the child site jar file (when unzipped and used locally) but is again kind of useless in the deployed web site.

To sum this up. There is nothing wrong with the 'relativizeDecorationLinks' feature when building a web-site you are actually going to deploy somewhere. The problem is when building a jar for use locally. Relative links pointing outside the jar file will not work there and need to be kept absolute and absolute links which are pointing to content inside the jar file should be relative otherwise the jar is quite useless.


                
> 'relativizeDecorationLinks' relativizes too much.
> -------------------------------------------------
>
>                 Key: MSITE-659
>                 URL: https://jira.codehaus.org/browse/MSITE-659
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: relative links
>    Affects Versions: 3.1
>            Reporter: Christian Schulte
>         Attachments: MSITE-659-absolute.zip, MSITE-659.zip, MSITE-659.zip
>
>
> When relativizing links, the plugin produces relative links to content not generated by the plugin which should be kept absolute.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (MSITE-659) 'relativizeDecorationLinks' relativizes too much.

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311442#comment-311442 ] 

Christian Schulte commented on MSITE-659:
-----------------------------------------

Put another way. Specifying relative links in the decoration model, inheriting them as absolute is not possible. Specifying absolute links in the decoration model, using 'relativizeDecorationLinks' is not possible since that will relativize at the 'child' level in a way links will not work when browsing that site locally (unzipped jar). Building a site for deployment and building a site for browsing locally (unzipped jar) would need to be handled differently to get this working. Let the jar goal update links in a way compatible with local browsing ('absolutizeDecorationLinks') and let the site goal update links in a way compatible with online browsing (already implemented).

                
> 'relativizeDecorationLinks' relativizes too much.
> -------------------------------------------------
>
>                 Key: MSITE-659
>                 URL: https://jira.codehaus.org/browse/MSITE-659
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: relative links
>    Affects Versions: 3.1
>            Reporter: Christian Schulte
>         Attachments: MSITE-659-absolute.zip, MSITE-659.zip, MSITE-659.zip
>
>
> When relativizing links, the plugin produces relative links to content not generated by the plugin which should be kept absolute.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira