1

Is it possible with Download Package Manager just to download latest snaptshot war file from maven plugin?

I'm trying to download maven artifacts from azure artifact feeds. Currenlty Download Package manager is downloading the latest version war files of maven artifact, but it is downloading all the snapshots, but I want to download only last published snapshot war file. I have 25 war files downloaded on agent currently. But I want just one for my case.

I have used the below task to download latest version of maven plugin.

- task: DownloadPackage@1
      inputs:
        packageType: 'maven'
        feed: ''
        view: ; ''
        definition: ''
        version: 'latest'
        files: '*.war'
        downloadPath: '$(System.DefaultWorkingDirectory)/webapps'

It is downloading all the snapshots war files. But I want to dowanlod only the latest snapshot file. Is it possible?

 rw-r--r-- 1 svc svc 68059451 Nov 23 06:16 tmptmp-20220120.194729-41.war
-rw-r--r-- 1 svc svc 68059488 Nov 23 06:16 tmptmp-20220128.181147-53.war
-rw-r--r-- 1 svc svc 68059498 Nov 23 06:16 tmptmp-20220128.154115-45.war
-rw-r--r-- 1 svc svc 68059467 Nov 23 06:16 tmptmp-20220128.164023-47.war
  • I am sorry but according to the doc: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/download-package-v1?view=azure-pipelines, unless you specify the name of the needed output latest file in the latest version. Otherwise, the system will find (all)/* war files in the latest version as output. Or if you could get the accurate time for the last published snapshot war file, it must doesn't share the same time with other war files, then chances are to add a task to filter the time and get the last published snapshot war file. – Antonia Wu-MSFT Nov 23 '22 at 10:15
  • Or you could report a user voice from: https://developercommunity.visualstudio.com/report?space=22&entry=suggestion. – Antonia Wu-MSFT Nov 23 '22 at 10:15

0 Answers0