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

Dependency info(.POM file) missing as part of the deployment

    Details

    • Type: Bug
    • Status: Will Not Implement
    • Priority: Blocker
    • Resolution: Unresolved
    • Affects Version/s: 2.12.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      We have a common component(jar) used across multiple projects as a dependency, when we publish this common component, along with jar, it's not publishing pom file.
      For example, I've a common-java component and publishing snapshot version. When I publish this component using Maven 'deploy' goal, it has the following two files.

      com/sample/1.6-SNAPSHOT/common-java-1.6-SNAPSHOT.jar
      com/sample/1.6-SNAPSHOT/common-java-1.6-SNAPSHOT.POM
      

      However, if I publish this using Jenkins artifactory plugin using pipeline code(code given below), it has only this:

      com/sample/1.6-SNAPSHOT/common-java-1.6-SNAPSHOT.jar
      

      Can you please validate this and let me know?

      pipeline {
          agent { label "maven" }
          stages {
              stage('Build & Publish') {
                  steps {
                      script {
      						def server = Artifactory.server 'artifacts'
      						def buildInfo = Artifactory.newBuildInfo()
      						def rtMaven = Artifactory.newMavenBuild()
      						
      						rtMaven.deployer releaseRepo:'releases-local', snapshotRepo:'snapshots-local', server: server
      						rtMaven.resolver releaseRepo: 'vrepo', snapshotRepo: 'vrepo', server: server
      						
      						rtMaven.deployer.deployArtifacts = false
      						buildInfo.env.capture = true
      						
      						rtMaven.run pom: 'pom.xml', goals: 'clean install -DskipTests=true', buildInfo: buildInfo
      						rtMaven.deployer.deployArtifacts buildInfo
      						
      						server.publishBuildInfo buildInfo                    
      				}
                  } 
              }
          }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              yahavi Yahav Itzhak
              Reporter:
              rsemburakkiannan Raghu S
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: