Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38077

Silently Failing to Deploy Released Artifacts to Maven Repository

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: m2release-plugin
    • Labels:
      None
    • Environment:
      Relevant Versions:
      mvn - 3.2.1
      git - 2.7.4
      m2release-plugin - 0.14.0
    • Similar Issues:

      Description

      After upgrading from git 1.7 to 2.7, the M2 Release Plugin silently failed to upload released artifacts to a maven release repository. Instead, a snapshot was uploaded. A workaround is to force reliance on a more recent version of the the maven-release-plugin maven plugin. A better solution would be for this Jenkins plugin to use a newer version of the maven-release-plugin maven plugin.

      The release options and goals in the Jenkins job that worked before the release were:

      Release goals and options:
      -Dresume=false -Dmaven.javadoc.skip=true release:prepare release:perform
      
      DryRun goals and options:
      -Dresume=false -Dmaven.javadoc.skip=true -DdryRun=true release:prepare
      

      The release options and goals that worked after the release were:

      Release goals and options:
      -Dresume=false -Dmaven.javadoc.skip=true org.apache.maven.plugins:maven-release-plugin:2.5:prepare org.apache.maven.plugins:maven-release-plugin:2.5:perform
      
      DryRun goals and options:
      -Dresume=false -Dmaven.javadoc.skip=true -DdryRun=true org.apache.maven.plugins:maven-release-plugin:2.5:prepare
      

        Attachments

          Activity

          Hide
          cschroed_usgs Carl Schroedl added a comment -

          This problem and solution are alluded to in Jenkins' own documentation for plugin authors.

          The release process created a "SNAPSHOT" version / Using git version 1.8.5.2 or around
          After cd-ing to your plugin git repo folder, run the maven release commands this way, forcing version 2.5 of maven-release-plugin; alternatively, proceed to the next work-around topic right after this one:

          mvn org.apache.maven.plugins:maven-release-plugin:2.5:prepare
          mvn org.apache.maven.plugins:maven-release-plugin:2.5:perform
          git push (should your git status still be "dirty")
          

          Further down on the same page is a potentially related problem and solution:

          If a release only deploys snapshots consider upgrading the maven-scm-provider-gitexe to 1.9.1 or more (see more details.)

                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-release-plugin</artifactId>
                  <version>2.5.1</version>
                  <dependencies>
                    <dependency>
                      <groupId>org.apache.maven.scm</groupId>
                      <artifactId>maven-scm-provider-gitexe</artifactId>
                      <version>1.9.2</version>
                    </dependency>
                  </dependencies>
                </plugin>
          

          or running following command may make your maven-release-plugin work correct (this changes output format of git status).

          git config --global --add status.displayCommentPrefix true
          
          Show
          cschroed_usgs Carl Schroedl added a comment - This problem and solution are alluded to in Jenkins' own documentation for plugin authors . The release process created a "SNAPSHOT" version / Using git version 1.8.5.2 or around After cd-ing to your plugin git repo folder, run the maven release commands this way, forcing version 2.5 of maven-release-plugin; alternatively, proceed to the next work-around topic right after this one: mvn org.apache.maven.plugins:maven-release-plugin:2.5:prepare mvn org.apache.maven.plugins:maven-release-plugin:2.5:perform git push (should your git status still be "dirty" ) Further down on the same page is a potentially related problem and solution: If a release only deploys snapshots consider upgrading the maven-scm-provider-gitexe to 1.9.1 or more (see more details.) <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.5.1</version> <dependencies> <dependency> <groupId>org.apache.maven.scm</groupId> <artifactId>maven-scm-provider-gitexe</artifactId> <version>1.9.2</version> </dependency> </dependencies> </plugin> or running following command may make your maven-release-plugin work correct (this changes output format of git status). git config --global --add status.displayCommentPrefix true

            People

            • Assignee:
              teilo James Nord
              Reporter:
              cschroed_usgs Carl Schroedl
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: