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

M2 Release artifacts are not uploading on Artifactory

    Details

    • Similar Issues:

      Description

      Hi Team,
      I have a maven release project configured on Jenkins. I have also configured Post Build action 'Deploy artifacts to Artifactory' with target snapshot and release repositories.

      During snapshot build, artifacts are getting build and getting uploaded to artifactory without any issue.
      But, when i perform maven release (m2 release) with clean install goal. release artifacts are getting build and getting installed only into local .m2 directory. Release artifacts are not getting deployed on release target repository defined in Post build deploy option.

      Please suggest, how should I be able to publish the artifacts to Artifactory.

        Attachments

          Activity

          Hide
          eyalbe Eyal Ben Moshe added a comment -

          The easiest way for creating release builds and then deploying them to Artifactory is by using the "Artifactory Release Staging" feature (Artifactory Release Management) added by the Artifactory Plugin. Using it also provides features like build-info collection and checksum deploy. You can still use M2 release feature if you'd like, but you might need to use it with the "deploy" goal to trigger the deployment. Please let us if this works for you and if you require further assistance.

          Show
          eyalbe Eyal Ben Moshe added a comment - The easiest way for creating release builds and then deploying them to Artifactory is by using the "Artifactory Release Staging" feature (Artifactory Release Management) added by the Artifactory Plugin. Using it also provides features like build-info collection and checksum deploy. You can still use M2 release feature if you'd like, but you might need to use it with the "deploy" goal to trigger the deployment. Please let us if this works for you and if you require further assistance.
          Hide
          mahendra_singh1260 Mahendra Singh added a comment - - edited

          Thanks Eyal for the reply.

          1. if I have to use M2 Plugin only with deploy goal then it would be mandatory for me to mention distribution management tag under my pom.xml. I am not so intended to mention distribution management tag in my pom.xml. so It means that I would have to use Artifactory Release Staging" feature (Artifactory Release Management) added by the Artifactory Plugin only.

          2. I have tried using Artifactory Release Staging" feature (Artifactory Release Management) added by the Artifactory Plugin also, but it is failing with below error.

          ERROR:
          _[RELEASE] Release build triggered
          ERROR: Failed to parse POMs
          java.io.IOException: Perforce execution failed: 'non-numeric Perforce server port specifier: p4java://ssl:perforcehost:1234'
          at org.jfrog.build.vcs.perforce.PerforceClient.createServer(PerforceClient.java:66)
          at org.jfrog.build.vcs.perforce.PerforceClient.<init>(PerforceClient.java:39)
          at org.jfrog.build.vcs.perforce.PerforceClient.<init>(PerforceClient.java:33)
          at org.jfrog.build.vcs.perforce.PerforceClient$Builder.build(PerforceClient.java:216)
          at org.jfrog.hudson.release.scm.perforce.PerforceManager.prepare(PerforceManager.java:58)
          at org.jfrog.hudson.release.scm.perforce.PerforceCoordinator.prepare(PerforceCoordinator.java:51)
          at org.jfrog.hudson.release.maven.MavenReleaseWrapper.setUp(MavenReleaseWrapper.java:137)
          at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:653)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
          at hudson.model.Run.execute(Run.java:1738)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:410)
          Caused by: java.net.URISyntaxException: non-numeric Perforce server port specifier: p4java://ssl:perforcehost:port
          at com.perforce.p4java.server.ServerFactory.getOptionsServer(ServerFactory.java:312)
          at com.perforce.p4java.server.ServerFactory.getOptionsServer(ServerFactory.java:196)
          at com.perforce.p4java.server.ServerFactory.getServer(ServerFactory.java:168)
          at org.jfrog.build.vcs.perforce.PerforceClient.createServer(PerforceClient.java:51)

          Show
          mahendra_singh1260 Mahendra Singh added a comment - - edited Thanks Eyal for the reply. 1. if I have to use M2 Plugin only with deploy goal then it would be mandatory for me to mention distribution management tag under my pom.xml. I am not so intended to mention distribution management tag in my pom.xml. so It means that I would have to use Artifactory Release Staging" feature (Artifactory Release Management) added by the Artifactory Plugin only. 2. I have tried using Artifactory Release Staging" feature (Artifactory Release Management) added by the Artifactory Plugin also, but it is failing with below error. ERROR: _ [RELEASE] Release build triggered ERROR: Failed to parse POMs java.io.IOException: Perforce execution failed: 'non-numeric Perforce server port specifier: p4java://ssl:perforcehost:1234' at org.jfrog.build.vcs.perforce.PerforceClient.createServer(PerforceClient.java:66) at org.jfrog.build.vcs.perforce.PerforceClient.<init>(PerforceClient.java:39) at org.jfrog.build.vcs.perforce.PerforceClient.<init>(PerforceClient.java:33) at org.jfrog.build.vcs.perforce.PerforceClient$Builder.build(PerforceClient.java:216) at org.jfrog.hudson.release.scm.perforce.PerforceManager.prepare(PerforceManager.java:58) at org.jfrog.hudson.release.scm.perforce.PerforceCoordinator.prepare(PerforceCoordinator.java:51) at org.jfrog.hudson.release.maven.MavenReleaseWrapper.setUp(MavenReleaseWrapper.java:137) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:653) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.net.URISyntaxException: non-numeric Perforce server port specifier: p4java://ssl:perforcehost:port at com.perforce.p4java.server.ServerFactory.getOptionsServer(ServerFactory.java:312) at com.perforce.p4java.server.ServerFactory.getOptionsServer(ServerFactory.java:196) at com.perforce.p4java.server.ServerFactory.getServer(ServerFactory.java:168) at org.jfrog.build.vcs.perforce.PerforceClient.createServer(PerforceClient.java:51)
          Hide
          eyalbe Eyal Ben Moshe added a comment -

          The following Jira issue was opened for the above Artifactory Release Staging error:
          https://www.jfrog.com/jira/browse/HAP-861

          Show
          eyalbe Eyal Ben Moshe added a comment - The following Jira issue was opened for the above Artifactory Release Staging error: https://www.jfrog.com/jira/browse/HAP-861
          Hide
          mahendra_singh1260 Mahendra Singh added a comment -

          updated the jira bug with new ERROR:

          https://www.jfrog.com/jira/browse/HAP-861

          Show
          mahendra_singh1260 Mahendra Singh added a comment - updated the jira bug with new ERROR: https://www.jfrog.com/jira/browse/HAP-861
          Hide
          mahendra_singh1260 Mahendra Singh added a comment -

          I am integrating maven release build with git hub and configured the same in Jenkins 2.7.2 and it is authenticating using credential plugin which I have created using ssh key on an account to communicate with github. The snapshot build works well and result is success.
          When I am performing maven release build it thows the error saying that unable to perform
          git clone command or repository is not known

          I have given the scm connection and developer connection in the pom file.

          As said earlier, snapshot build works fine which means the authentication with git is fine. But during release build it is failing. Do I need to mentioned ssh keys (provate and public) somewhere also in order to have release build? or how maven release build picks up the credentials?

          Show
          mahendra_singh1260 Mahendra Singh added a comment - I am integrating maven release build with git hub and configured the same in Jenkins 2.7.2 and it is authenticating using credential plugin which I have created using ssh key on an account to communicate with github. The snapshot build works well and result is success. When I am performing maven release build it thows the error saying that unable to perform git clone command or repository is not known I have given the scm connection and developer connection in the pom file. As said earlier, snapshot build works fine which means the authentication with git is fine. But during release build it is failing. Do I need to mentioned ssh keys (provate and public) somewhere also in order to have release build? or how maven release build picks up the credentials?

            People

            • Assignee:
              eyalbe Eyal Ben Moshe
              Reporter:
              mahendra_singh1260 Mahendra Singh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: