Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-921

perform goal doesn't support providerImplementation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.2
    • 2.5.3
    • perform
    • None

    Description

      I am using the maven release plugin with git, trying to use the jgit provider.

      pom.xml
      ...
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>${maven-scm-plugin.version}</version>
          <configuration>
              <providerImplementations>
                  <git>jgit</git>
              </providerImplementations>
          </configuration>
          <dependencies>
              <dependency>
                  <groupId>org.apache.maven.scm</groupId>
                  <artifactId>maven-scm-provider-jgit</artifactId>
                  <version>1.9.4</version>
              </dependency>
          </dependencies>
      </plugin>
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.2</version>
          <configuration>
              <tagNameFormat>@{project.version}</tagNameFormat>
              <goals>deploy</goals>
              <autoVersionSubmodules>true</autoVersionSubmodules>
              <providerImplementations>
                  <git>jgit</git>
              </providerImplementations>
          </configuration>
          <dependencies>
              <dependency>
                  <groupId>org.apache.maven.scm</groupId>
                  <artifactId>maven-scm-provider-jgit</artifactId>
                  <version>1.9.4</version>
              </dependency>
          </dependencies>
      </plugin>
      ...
      

      This is how I run prepare:

      mvn -X release:prepare
      

      This works fine, here an excerpt from the command output:

      ...
      [DEBUG] Goal:          org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare (default-cli)
      [DEBUG] Style:         Aggregating
      [DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
        <addSchema default-value="true">${addSchema}</addSchema>
        <allowReleasePluginSnapshot default-value="false">${allowReleasePluginSnapshot}</allowReleasePluginSnapshot>
        <allowTimestampedSnapshots default-value="false">${ignoreSnapshots}</allowTimestampedSnapshots>
        <arguments>${arguments}</arguments>
        <autoVersionSubmodules default-value="false">true</autoVersionSubmodules>
        <basedir default-value="${basedir}"/>
        <checkModificationExcludeList>${checkModificationExcludeList}</checkModificationExcludeList>
        <commitByProject default-value="false">${commitByProject}</commitByProject>
        <completionGoals default-value="">${completionGoals}</completionGoals>
        <developmentVersion>${developmentVersion}</developmentVersion>
        <dryRun default-value="false">${dryRun}</dryRun>
        <generateReleasePoms default-value="false">${generateReleasePoms}</generateReleasePoms>
        <javaHome default-value="${java.home}"/>
        <localRepoDirectory default-value="${maven.repo.local}"/>
        <mavenExecutorId default-value="invoker">${mavenExecutorId}</mavenExecutorId>
        <mavenHome default-value="${maven.home}"/>
        <password>${password}</password>
        <pomFileName>${pomFileName}</pomFileName>
        <preparationGoals default-value="clean verify">${preparationGoals}</preparationGoals>
        <project default-value="${project}"/>
        <projectVersionPolicyId default-value="default">${projectVersionPolicyId}</projectVersionPolicyId>
        <providerImplementations>
          <git>jgit</git>
        </providerImplementations>
        <pushChanges default-value="true">${pushChanges}</pushChanges>
        <reactorProjects default-value="${reactorProjects}"/>
        <releaseVersion>${releaseVersion}</releaseVersion>
        <remoteTagging default-value="true">${remoteTagging}</remoteTagging>
        <resume default-value="true">${resume}</resume>
        <scmCommentPrefix default-value="[maven-release-plugin] ">${scmCommentPrefix}</scmCommentPrefix>
        <session default-value="${session}"/>
        <settings default-value="${settings}"/>
        <suppressCommitBeforeTag default-value="false">${suppressCommitBeforeTag}</suppressCommitBeforeTag>
        <tag>${tag}</tag>
        <tagNameFormat default-value="@{project.artifactId}-@{project.version}">@{project.version}</tagNameFormat>
        <updateDependencies default-value="true">${updateDependencies}</updateDependencies>
        <updateWorkingCopyVersions default-value="true">${updateWorkingCopyVersions}</updateWorkingCopyVersions>
        <useEditMode default-value="false">${useEditMode}</useEditMode>
        <username>${username}</username>
        <waitBeforeTagging default-value="0">${waitBeforeTagging}</waitBeforeTagging>
      </configuration>
      ...
      

      Now I run perform:

      mvn -X release:perform
      

      And this is what maven sees:

      ...
      [DEBUG] Goal:          org.apache.maven.plugins:maven-release-plugin:2.5.2:perform (default-cli)
      [DEBUG] Style:         Aggregating
      [DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
        <arguments>${arguments}</arguments>
        <basedir default-value="${basedir}"/>
        <connectionUrl>${connectionUrl}</connectionUrl>
        <dryRun default-value="false">${dryRun}</dryRun>
        <goals>deploy</goals>
        <javaHome default-value="${java.home}"/>
        <localCheckout default-value="false">${localCheckout}</localCheckout>
        <localRepoDirectory default-value="${maven.repo.local}"/>
        <mavenExecutorId default-value="invoker">${mavenExecutorId}</mavenExecutorId>
        <mavenHome default-value="${maven.home}"/>
        <password>${password}</password>
        <pomFileName>${pomFileName}</pomFileName>
        <project default-value="${project}"/>
        <reactorProjects default-value="${reactorProjects}"/>
        <releaseProfiles>${releaseProfiles}</releaseProfiles>
        <session default-value="${session}"/>
        <settings default-value="${settings}"/>
        <useReleaseProfile default-value="true">${useReleaseProfile}</useReleaseProfile>
        <username>${username}</username>
        <workingDirectory default-value="${project.build.directory}/checkout">${workingDirectory}</workingDirectory                                                                                                  >
      </configuration>
      ...
      

      Obviously providerImplementations is not present in the second output and maven is trying to find a command line git... I want to get it running without a command line git.

      I'm running this on Windows, with Maven 3.3.3.

      Looking at the code, I see that PerformReleaseMojo extends from AbstractReleaseMojo instead of AbstractScmReleaseMojo... any reason?

      Someone with the same issue here on Stackoverflow: http://stackoverflow.com/questions/27394876/mvnperform-does-not-pull-the-providerimplementations

      Attachments

        1. fix2-perform.diff
          2 kB
          Georges-Etienne Legendre
        2. fix-perform.diff
          0.9 kB
          Georges-Etienne Legendre

        Activity

          People

            rfscholte Robert Scholte
            legege Georges-Etienne Legendre
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: