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

Read scmVersion directly from pom

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • 1.0, 1.1, 1.2
    • None
    • maven-plugin
    • None
    • all environments
    • Patch

    Description

      Is impossible to run "mvn scm:bootstrap" without specifing the parameter scmVersionType and scmVersion and retrieve all that I need to checkout a project from the pom because the CheckoutMojo class doesn't read the project/scm/tag value so, by default, checkout the HEAD if no parameter is passing.
      This can be trivial if we use this command in a particular configuration in whitch no parameter can be passed to maven and the project is on a different branch

      To resolve this issue, I've modified the source code from

      @parameter expression="${scmVersion}"

      to

      @parameter expression="${scmVersion}" default-value="${project.scm.tag}"

      Attachments

        1. CheckoutMojo.java
          4 kB
          Raffaele Verre

        Activity

          People

            Unassigned Unassigned
            verraf Raffaele Verre
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: