Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3244

inherited site url not properly handling parameters

    XMLWordPrintableJSON

Details

    Description

      Here is the test case to reproduce this problem. Take the following two pom.xml files

      <?xml version="1.0" encoding="UTF-8"?>
      <project>
      	<groupId>org.bar</groupId>
      	<artifactId>foo</artifactId>
      	<name>foo</name>
      	<version>1.0-SNAPSHOT</version>
      	<packaging>pom</packaging>
      	<modelVersion>4.0.0</modelVersion>
      
      	<distributionManagement>
      		<site>
      			<id>foo-site</id>
      			<url>file://C:/Documents and Settings/foo/.m2/site/${project.artifactId}</url>
      		</site>
      	</distributionManagement>
      </project>
      <?xml version="1.0" encoding="UTF-8"?>
      <project>
      	<groupId>org.bar</groupId>
      	<artifactId>baz</artifactId>
      	<name>baz</name>
      	<version>1.0-SNAPSHOT</version>
      	<packaging>pom</packaging>
      	<modelVersion>4.0.0</modelVersion>
      
      	<parent>
      		<artifactId>foo</artifactId>
      		<groupId>org.bar</groupId>
      		<version>1.0-SNAPSHOT</version>
      	</parent>
      </project>

      And run the site-deploy goal on each. What you get under the site directory is this

      - site
      /- foo
      ---/site docs
      /- baz
      ---/- baz (extra directory)
      --- ---/site docs

      This is the simplest test case. In the case where I have a "grandparent" pom, the site directory uses the grandparent/parent as the path to the site, and doesn't use the actual artifactId of the artifact I'm creating the site for.

      Attachments

        1. fix-inherited-site-url.patch
          3 kB
        2. guide-site.patch
          4 kB
          Benjamin Bentmann
        3. mng-3244_patch.txt
          16 kB
          Steven MountJoy

        Issue Links

          Activity

            People

              brianf Brian E Fox
              jacob.robertson Jacob Robertson
              Votes:
              47 Vote for this issue
              Watchers:
              44 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: