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

Artifactory Maven layout version

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: 2 - Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.4.1
    • Fix Version/s: None
    • Component/s: Maven2, Maven3
    • Labels:
      None
    • Environment:

      Jenkins ver. 2.190.1

      Artifactory Cloud

      Description

      My artifactory has two repos:

      1. libs-snapshot-local
      1. libs-release-local

      Layout for both: [orgPath]/[module]/[baseRev]([folderItegRev])/[module][baseRev]([fileItegRev])([classifier]).[ext] (or maven2-default)

      When I run the Jenkins Pipeline the artifacts are always uploaded to libs-release-local. Note that I do not explicitly use -SNAPSHOT modifier in my pom files. Snapshots have version with build number (e.g. 1.0.0-010) while release only has version (e.g. 1.0.0). I am distinguishing snapshot vs release based on branch name.

      rtMaven.deployer releaseRepo: 'libs-release-local', snapshotRepo: 'libs-snapshot-local', server: server

      Jenkins code:

       

      stage('Build') {
          def server = Artifactory.server "server1"
          def buildInfo = Artifactory.newBuildInfo()
          def rtMaven = Artifactory.newMavenBuild()
          rtMaven.tool = 'Maven3'
          rtMaven.deployer releaseRepo:'libs-release-local', snapshotRepo:'libs-snapshot-local', server: server
          rtMaven.run pom: 'pom.xml', goals: 'clean install -Dmaven.test.skip=true', buildInfo: buildInfo
          publishBuildInfo server: server, buildInfo: buildInfo
      }
      

      How does the Artifactory plugin decide if it should go to release vs snapshot repo here? Is it the fileItegRev? or folderItegRev? 

      If the plugin makes a decision based on   -SNAPSHOT modifier and is not flexible then how can have all the dependencies etc that the plugin does (with rtMaven.deployer) but using uploadSpec instead.

       

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: