Max Unique Snapshots

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Max Unique Snapshots

pscheir
Hi,

It seems I can’t get "Max Unique Snapshots" to work.
Does this only work with POM files or also with standard metadata (e.g. time of deployment)?

I am here in a non-maven environment.

Thanks, Peter
Reply | Threaded
Open this post in threaded view
|

Re: Max Unique Snapshots

Ariel
Hi Peter,

In convention the "Max Unique Snapshots" will work for any environment as long as it fits the repository layout.
If you wish you can post here the repository layout and artifact path, and I will try to help.
Reply | Threaded
Open this post in threaded view
|

Re: Max Unique Snapshots

pscheir
Reply | Threaded
Open this post in threaded view
|

Re: Max Unique Snapshots

Ariel
This post was updated on .
Hi Peter,

The issue is that you don't use a valid Maven layout. Your curl command
should look like that:
curl --user u:p -T aaa.zip
http://yyy:8081/artifactory/simple/TestRepository/DataProcessing/DataManager/1.0-SNAPSHOT/DataManager-1.0-SNAPSHOT.zip
Your file names are not considered as SNAPSHOT and that is why the "Max Unique Snapshots" doesn't clean the old files.

Hope that helps,
Ariel.
Reply | Threaded
Open this post in threaded view
|

Re: Max Unique Snapshots

pscheir
Thanks Ariel, you were right!

It works without POM files and also in other layouts than maven2.

Thank you!

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Max Unique Snapshots

pscheir
This post was updated on .
Hi,

Unfortunately it seems I found a case where Max Unique Snapshots does not work:

I have a custom repository layout. Max Unique Snapshots is set to 3.

This is the Artifact Path Pattern: "[orgPath]/[module]/[baseRev](-[folderItegRev])(/[build<[a-zA-Z0-9._]*>])/[module]-[baseRev](-[fileItegRev])(-[classifier]).[ext]"

Folder and File Integration Revision RegExp are both "SNAPSHOT|[^-/]*"

I upload with the following command line:

curl --user u:p --upload-file aaa.zip http://yyy:8081/artifactory/simple/repo-snapshot/DataProcessing/DataManager/1.0-SNAPSHOT/aa/DataManager-1.0-build3.zip
curl --user u:p --upload-file aaa.zip http://yyy:8081/artifactory/simple/repo-snapshot/DataProcessing/DataManager/1.0-SNAPSHOT/aa/DataManager-1.0-build4.zip
curl --user u:p --upload-file aaa.zip http://yyy:8081/artifactory/simple/repo-snapshot/DataProcessing/DataManager/1.0-SNAPSHOT/aa/DataManager-1.0-build5.zip
curl --user u:p --upload-file aaa.zip http://yyy:8081/artifactory/simple/repo-snapshot/DataProcessing/DataManager/1.0-SNAPSHOT/aa/DataManager-1.0-build6.zip
curl --user u:p --upload-file aaa.zip http://yyy:8081/artifactory/simple/repo-snapshot/DataProcessing/DataManager/1.0-SNAPSHOT/aa/DataManager-1.0-build7.zip
curl --user u:p --upload-file aaa.zip http://yyy:8081/artifactory/simple/repo-snapshot/DataProcessing/DataManager/1.0-SNAPSHOT/aa/DataManager-1.0-build8.zip
curl --user u:p --upload-file aaa.zip http://yyy:8081/artifactory/simple/repo-snapshot/DataProcessing/DataManager/1.0-SNAPSHOT/aa/DataManager-1.0-build9.zip

The path is parsed correctly under "Test Artifact Path Resolution".

Thanks, Peter
Reply | Threaded
Open this post in threaded view
|

Re: Max Unique Snapshots

pscheir
Any ideas? Thanks, Peter
Reply | Threaded
Open this post in threaded view
|

Re: Max Unique Snapshots

Ariel
Hi Peter,

The issue looks like a bug in the way that custom layout with a custom token breaks the version search.

There is a Jira ticket on that issue.

Ariel.