maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <>
Subject [jira] Created: (MSITE-284) getRelativePath fails on non-normalized inputs
Date Tue, 01 Jan 2008 01:03:57 GMT
getRelativePath fails on non-normalized inputs

                 Key: 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
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:
For more information on JIRA, see:


View raw message