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

add an option to avoid path addition to inherited URLs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.5, 3.1.1, 3.2.5, 3.3.9
    • 3.6.0
    • None

    Description

      What I am trying to achieve is
      the definition of a project.url in a parent pom
      in a way that all children inherit a url ending with

      ${project.groupId}/${project.artifactId}/${project.version}/ 
      

      in order to be able to publish sites of all artifacts in all versions in parallel
      without having to redefine the url in every child pom.

      This is currently not working as expected in maven due to the default child urls calculation which leads to urls that add up parent urls like
      http://my.domain.de/sites/de.enterprise.calculatorsGroupId/calculator-artifactID/1.0.0-SNAPSHOT/internetAppParentPOM/calculatorParentPom/calculator-artifactID/

      The part "internetAppParentPOM/calculatorParentPom/" is added by automatic child url calculation (those are the artifactIds of all parent poms beneath our enterprise parent pom where the url is defined) and is expexted to not be there at all. The repeated artifactID at the end of the url is superfluous as well but tollerable.

      I expect maven-core to be changed so that I can turn on/off the automatic calculation of child URLs as an option which is by default on (current behaviour so nothing will change unless configured explicitly).

      See the discussion in MSITE-672.

      As this can not be done in the maven-site-plugin there needs to be a change in Maven itself (core), in Maven Model Builder, ie the way effective model is calculated, and more precisely in the inheritance step: http://maven.apache.org/ref/current/maven-model-builder/.

      Implemented solution in Maven 3.6.0 (attribute names reworked in Maven 3.6.1, see MNG-6059):

      <project child.inherit.append.path="false">
        <url>...</url>
        <scm child.inherit.append.path="false">
          <connection>...</connection>
          <developerConnection>...</developerConnection>
          <url>...</url>
        </scm>
        <distributionManagement>
          <site child.inherit.append.path="false">
            <url>...</url>
          </site>
        </distributionManagement>
      </project>

      Attachments

        1. MNG-5951.zip
          4 kB
          Herve Boutemy

        Issue Links

          Activity

            People

              hboutemy Herve Boutemy
              joerg.sesterhenn Jörg Sesterhenn
              Votes:
              12 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: