Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1242

org.jfrog.hudson.pipeline.common.types.packageManagerBuilds.MavenBuild.run but wound up catching artifactoryMavenBuild

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: 4 - Normal
    • Resolution: Unresolved
    • Affects Version/s: 3.4.0
    • Fix Version/s: None
    • Component/s: Maven3
    • Labels:
      None
    • Environment:

      Jenkins in EKS v2.190.1. Artifactory Cloud.

      Description

      Running pipeline I get this message in Jenkins log:

      [Pipeline] artifactoryMavenBuild
      expected to call org.jfrog.hudson.pipeline.common.types.packageManagerBuilds.MavenBuild.run but wound up catching artifactoryMavenBuild; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/
      

      The Jenkinsfile pipeline code snippet:

      script {
          def rtServer = Artifactory.server "artifactory"
          def rtMaven = Artifactory.newMavenBuild()
          def buildInfo = Artifactory.newBuildInfo()
      
          rtMaven.tool = 'Maven 3.5.4'
          rtMaven.deployer releaseRepo: 'libs-release-local', snapshotRepo: 'libs-snapshot-local', server: rtServer
      
          buildInfo.env.capture = true
      
          rtMaven.run pom: 'pom.xml', goals: 'package -s settings.xml -Dspring.test.skip=true -DskipTests=true', buildInfo: buildInfo
      
          // Upload to Artifactory.
          rtServer.publishBuildInfo buildInfo
      
      }
      

      Code executes and build is uploaded to Artifactory but the message is there and it does not look right.

        Attachments

          Activity

            People

            Assignee:
            eyalb Eyal Ben Moshe
            Reporter:
            wteixeira Wanderley Teixeira
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: