Maven
  1. Maven
  2. MNG-3621

site url inheritance broken for UNC paths

    Details

    • Complexity:
      Novice
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      I have a parent POM that is inherited by multiple projects that specifies site wide default settings.
      (e.g)
      Parent\pom.xml <--- this is the pom containing the site configuration
      Parent\CheckStyleConfig\pom.xml

      Part of this is the site deploy

      <distributionManagement>
      <site>
      <id>nds-uk.site</id>
      <url>file://///scg-nas.uk.nds.com/maven_sites/$

      {project.groupId}

      /$

      {project.artifactId}

      /$

      {project.version}

      </url>
      </site>
      </distributionManagement>

      running site:deploy on the sub procject results in it using a corrupted version of the url.

      build output attached.

      Notice the corruption of the original parent file:///// (2 slashes are removed so it tries to deploy to local HDD)

      parent (OK 5 slashes) file://///scg-nas.uk.nds.com/maven_sites/com.nds.cab.scg/common-parent/1.0.0.0-SNAPSHOT - Session: Opened
      child (bad 3 slashes) file:///scg-nas.uk.nds.com/maven_sites/com.nds.cab.scg/common-checkstyle/1.0.0.0-SNAPSHOT/common-checkstyle - Session: Opened

      1. build.txt
        2 kB
        James Nord
      2. MNG-3621.patch
        2 kB
        Benjamin Bentmann

        Activity

        Benjamin Bentmann made changes -
        Field Original Value New Value
        Complexity Novice
        Affects Version/s 2.0.9 [ 13801 ]
        Project Maven 2.x Site Plugin [ 11146 ] Maven 2 [ 10500 ]
        Affects Version/s 2.0-beta-6 [ 12151 ]
        Component/s site:deploy [ 12949 ]
        Key MSITE-336 MNG-3621
        Component/s Inheritance and Interpolation [ 11570 ]
        Hide
        Benjamin Bentmann added a comment -

        Proposed patch which simply retains a leading double slash. As the unit test shows, this makes UNC paths as constructed by Java (btw, these have only 4 successive slashes on a Sun JRE 1.6.0_04, not 5 as used by the reporter) successfully pass DefaultModelInheritanceAssembler.appendPath().

        Show
        Benjamin Bentmann added a comment - Proposed patch which simply retains a leading double slash. As the unit test shows, this makes UNC paths as constructed by Java (btw, these have only 4 successive slashes on a Sun JRE 1.6.0_04, not 5 as used by the reporter) successfully pass DefaultModelInheritanceAssembler.appendPath() .
        Benjamin Bentmann made changes -
        Attachment MNG-3621.patch [ 35137 ]
        Benjamin Bentmann made changes -
        Patch Submitted [Yes]
        Testcase included yes
        Brett Porter made changes -
        Fix Version/s 2.0.10 [ 14112 ]
        Hide
        John Casey added a comment -

        Pushing to 2.0.11 so we can have a smaller set of high-value issues to target for the next release (2.0.10).

        Show
        John Casey added a comment - Pushing to 2.0.11 so we can have a smaller set of high-value issues to target for the next release (2.0.10).
        John Casey made changes -
        Fix Version/s 2.0.10 [ 14112 ]
        Fix Version/s 2.0.11 [ 14118 ]
        Hide
        Paul Nyheim added a comment -

        I would just like to add an observation to this issue.
        In our setup, we have extracted the url to a property in the pom

         
        <properties>
          <distMgtSiteUrl>file:////my.server.com/share</distMgtSiteUrl>
        </properties>
        

        and in that case, no path manipulation is done in DefaultModelInheritanceAssembler.appendPath(). as the path passed to it will be the non-interpolated property: {{$

        {distMgtSiteUrl}

        }}.

        Show
        Paul Nyheim added a comment - I would just like to add an observation to this issue. In our setup, we have extracted the url to a property in the pom <properties> <distMgtSiteUrl> file:////my.server.com/share </distMgtSiteUrl> </properties> and in that case, no path manipulation is done in DefaultModelInheritanceAssembler.appendPath() . as the path passed to it will be the non-interpolated property: {{$ {distMgtSiteUrl} }}.
        Brett Porter made changes -
        Assignee Brett Porter [ brettporter ]
        Brett Porter made changes -
        Fix Version/s 2.1.0 [ 14587 ]
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Brett Porter
            Reporter:
            James Nord
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: