You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2008/01/01 02:03:57 UTC

[jira] Created: (MSITE-284) getRelativePath fails on non-normalized inputs

getRelativePath fails on non-normalized inputs
----------------------------------------------

                 Key: MSITE-284
                 URL: http://jira.codehaus.org/browse/MSITE-284
             Project: Maven 2.x Site Plugin
          Issue Type: Bug
          Components: relative links
    Affects Versions: 2.0-beta-6
            Reporter: Benjamin Bentmann
            Priority: Minor
         Attachments: normalized-paths.patch

The algo in AbstractSiteMojo.getRelativePath() assumes that its input paths are both normalized and produces wrong output if it gets something like "dir/../dir". Attached is a simple unit test and a fix for the method itself.

FYI, non-normalized path are easily created by Maven if one has a non-Maven-like directory layout with
  project/
    project-parent/
    project-module-1/
where simple string/path concatenation produces a path like "project/project-module-1/../project-parent" when referencing the parent POM from the module POM.

Path/URL transformations like normalization/relativization/resolution are quite ubiquitous in Maven. Isn't there a nice util class around that prevents each and every plugin developer to reimplement those error-prone methods?

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

        

[jira] Moved: (MSHARED-19) getRelativePath fails on non-normalized inputs

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSHARED-19?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vincent Siveton moved MSITE-284 to MSHARED-19:
----------------------------------------------

    Affects Version/s:     (was: 2.0-beta-6)
        Fix Version/s:     (was: 2.0-beta-7)
          Component/s:     (was: relative links)
                       maven-doxia-tools
                  Key: MSHARED-19  (was: MSITE-284)
              Project: Maven Shared Components  (was: Maven 2.x Site Plugin)

> getRelativePath fails on non-normalized inputs
> ----------------------------------------------
>
>                 Key: MSHARED-19
>                 URL: http://jira.codehaus.org/browse/MSHARED-19
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-doxia-tools
>            Reporter: Benjamin Bentmann
>            Assignee: Dennis Lundberg
>            Priority: Minor
>         Attachments: normalized-paths.patch
>
>
> The algo in AbstractSiteMojo.getRelativePath() assumes that its input paths are both normalized and produces wrong output if it gets something like "dir/../dir". Attached is a simple unit test and a fix for the method itself.
> FYI, non-normalized path are easily created by Maven if one has a non-Maven-like directory layout with
>   project/
>     project-parent/
>     project-module-1/
> where simple string/path concatenation produces a path like "project/project-module-1/../project-parent" when referencing the parent POM from the module POM.
> Path/URL transformations like normalization/relativization/resolution are quite ubiquitous in Maven. Isn't there a nice util class around that prevents each and every plugin developer to reimplement those error-prone methods?

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

        

[jira] Commented: (MSITE-284) getRelativePath fails on non-normalized inputs

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=128276#action_128276 ] 

Benjamin Bentmann commented on MSITE-284:
-----------------------------------------

bq. Please check r640091 that everything looks OK.
Seems like.

> getRelativePath fails on non-normalized inputs
> ----------------------------------------------
>
>                 Key: MSITE-284
>                 URL: http://jira.codehaus.org/browse/MSITE-284
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: relative links
>    Affects Versions: 2.0-beta-6
>            Reporter: Benjamin Bentmann
>            Assignee: Dennis Lundberg
>            Priority: Minor
>             Fix For: 2.0-beta-7
>
>         Attachments: normalized-paths.patch
>
>
> The algo in AbstractSiteMojo.getRelativePath() assumes that its input paths are both normalized and produces wrong output if it gets something like "dir/../dir". Attached is a simple unit test and a fix for the method itself.
> FYI, non-normalized path are easily created by Maven if one has a non-Maven-like directory layout with
>   project/
>     project-parent/
>     project-module-1/
> where simple string/path concatenation produces a path like "project/project-module-1/../project-parent" when referencing the parent POM from the module POM.
> Path/URL transformations like normalization/relativization/resolution are quite ubiquitous in Maven. Isn't there a nice util class around that prevents each and every plugin developer to reimplement those error-prone methods?

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

        

[jira] Updated: (MSHARED-19) getRelativePath fails on non-normalized inputs

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSHARED-19?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MSHARED-19:
-----------------------------------

    Fix Version/s: maven-doxia-tools 1.0

> getRelativePath fails on non-normalized inputs
> ----------------------------------------------
>
>                 Key: MSHARED-19
>                 URL: http://jira.codehaus.org/browse/MSHARED-19
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-doxia-tools
>            Reporter: Benjamin Bentmann
>            Assignee: Dennis Lundberg
>            Priority: Minor
>             Fix For: maven-doxia-tools 1.0
>
>         Attachments: normalized-paths.patch
>
>
> The algo in AbstractSiteMojo.getRelativePath() assumes that its input paths are both normalized and produces wrong output if it gets something like "dir/../dir". Attached is a simple unit test and a fix for the method itself.
> FYI, non-normalized path are easily created by Maven if one has a non-Maven-like directory layout with
>   project/
>     project-parent/
>     project-module-1/
> where simple string/path concatenation produces a path like "project/project-module-1/../project-parent" when referencing the parent POM from the module POM.
> Path/URL transformations like normalization/relativization/resolution are quite ubiquitous in Maven. Isn't there a nice util class around that prevents each and every plugin developer to reimplement those error-prone methods?

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

        

[jira] Closed: (MSITE-284) getRelativePath fails on non-normalized inputs

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg closed MSITE-284.
---------------------------------

         Assignee: Dennis Lundberg
       Resolution: Fixed
    Fix Version/s: 2.0-beta-7

The patch has been modified and applied to maven-doxia-tools, where this code now resides. Thanks!

Please check r640091 that everything looks OK.

> getRelativePath fails on non-normalized inputs
> ----------------------------------------------
>
>                 Key: MSITE-284
>                 URL: http://jira.codehaus.org/browse/MSITE-284
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: relative links
>    Affects Versions: 2.0-beta-6
>            Reporter: Benjamin Bentmann
>            Assignee: Dennis Lundberg
>            Priority: Minor
>             Fix For: 2.0-beta-7
>
>         Attachments: normalized-paths.patch
>
>
> The algo in AbstractSiteMojo.getRelativePath() assumes that its input paths are both normalized and produces wrong output if it gets something like "dir/../dir". Attached is a simple unit test and a fix for the method itself.
> FYI, non-normalized path are easily created by Maven if one has a non-Maven-like directory layout with
>   project/
>     project-parent/
>     project-module-1/
> where simple string/path concatenation produces a path like "project/project-module-1/../project-parent" when referencing the parent POM from the module POM.
> Path/URL transformations like normalization/relativization/resolution are quite ubiquitous in Maven. Isn't there a nice util class around that prevents each and every plugin developer to reimplement those error-prone methods?

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