Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-570

SCM connection URL is inherited with artifactId added

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: maven-plugin
    • Labels:
      None

      Description

      Not sure if this is a bug or a feature (could not find documentation) and if it applies to scm plugin or maven core.

      TC:

      1. Make a parent pom:

      <scm>
      <connection>${svn.repository}/trunk/${component.folder}</connection>
      </scm>

      <properties>
      <svn.repository>scm:svn:svn://localhost/myRepo</svn.repository>
      <component.folder>components/myParentPomComponent</component.folder>
      </properties>

      2. Make child pom:

      <parent>
      <artifactId>myParentPomComponent</artifactId>
      </parent>

      <properties>
      <component.folder>components/myChildComponent</component.folder>
      </properties>

      3. In folder with child component perform

      mvn help:effective-pom|grep svn

      Expected result:
      scm:svn:svn://localhost/myRepo/trunk/components/myChildComponent

      Actual result:
      scm:svn:svn://localhost/myRepo/trunk/components/myChildComponent/myChildComponent

      4. Add to child pom:

      <scm>
      <connection>${svn.repository}/trunk/${component.folder}</connection>
      </scm>

      5. In folder with child component perform

      mvn help:effective-pom|grep svn

      Actual result:
      scm:svn:svn://localhost/myRepo/trunk/components/myChildComponent

      ----------------------

      So if <scm> is omited it is inherited with artifactId applied and that breaks the schema when you specify folder with this component in a property.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bentmann Benjamin Bentmann
                Reporter:
                infdok Dmitry Murashenkov
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: