How to stop Maven/Artifactory from keeping Snapshots with timestamps

前端 未结 6 825
Happy的楠姐
Happy的楠姐 2020-12-29 05:25

Due to disk space considerations I\'d like to only ever keep one version of any snapshot in my repository. Rather than keeping multiple versions with timestamp suffixes

6条回答
  •  忘掉有多难
    2020-12-29 05:52

    The simplest (and recommended) way is to use non-unique snapshots. If you must use unique snapshots, you can do this in Artifactory by specifying the property on the definition in artifactory.config.xml

    For example:

    
      snapshots
      false
      false
      true
      1
      **/*
      non-unique
    
    

    For reference you can do this in Nexus (via the UI) by setting up a scheduled service, it allows you to specify the minimum number to retain, the maximum period to retain them for, and whether to remove the snapshot if a release version is deployed.

提交回复
热议问题