Archiva

Delete Released Snapshots doesn't work

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.2
  • Fix Version/s: 1.1
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    5

Description

I have 2 repositories. One for releases and the other for snapshots.
I activated the option to remove snapshots for already released artifacts.
(I also setup the repository with purge by retention = 2 and purge by days older than = 15D)
In my snapshots repository I have always some old snapshots

  1. archiva.xml
    06/May/08 7:03 AM
    5 kB
    Arnaud Heritier
  1. after-repo-scan.png
    50 kB
    12/May/08 9:20 PM
  2. before-repo-scan.png
    50 kB
    12/May/08 9:19 PM
  3. screenshot-1.jpg
    56 kB
    06/May/08 7:00 AM
  4. screenshot-2.jpg
    51 kB
    06/May/08 7:02 AM

Activity

Hide
Arnaud Heritier added a comment - - edited

A sample of snapshots entries for artifacts already released

Show
Arnaud Heritier added a comment - - edited A sample of snapshots entries for artifacts already released
Hide
Arnaud Heritier added a comment -

my snapshots repo configuration

Show
Arnaud Heritier added a comment - my snapshots repo configuration
Hide
Arnaud Heritier added a comment -

My archiva configuration file

Show
Arnaud Heritier added a comment - My archiva configuration file
Hide
James William Dumay added a comment -

Moving to 1.1.x

Show
James William Dumay added a comment - Moving to 1.1.x
Hide
Arnaud Heritier added a comment -

If this feature doesn't work and we can't fix it we could thnk to hide it in the UI and to remove it from the doc ???

Show
Arnaud Heritier added a comment - If this feature doesn't work and we can't fix it we could thnk to hide it in the UI and to remove it from the doc ???
Hide
James William Dumay added a comment -

Moved back to 1.1 as this is a critical bug

Show
James William Dumay added a comment - Moved back to 1.1 as this is a critical bug
Hide
Maria Odea Ching added a comment -

I tried to replicate this issue, and below are the results. (Pls. see the images 'before-repo-scan.png' and 'after-repo-scan.png' I've attached to this issue.)
1. those snapshot versions with '-SNAPSHOT' that have been released already were deleted.
2. those snapshot versions with the timestamped were not released.

Is this the same for you Arnaud?
If so, I guess the issue here is case #2?

Show
Maria Odea Ching added a comment - I tried to replicate this issue, and below are the results. (Pls. see the images 'before-repo-scan.png' and 'after-repo-scan.png' I've attached to this issue.) 1. those snapshot versions with '-SNAPSHOT' that have been released already were deleted. 2. those snapshot versions with the timestamped were not released. Is this the same for you Arnaud? If so, I guess the issue here is case #2?
Hide
Arnaud Heritier added a comment -

Hi Deng,

You just forgot to attach images
I'll check tomorrow. I have a virtual machin to reproduce it.

Show
Arnaud Heritier added a comment - Hi Deng, You just forgot to attach images I'll check tomorrow. I have a virtual machin to reproduce it.
Hide
Maria Odea Ching added a comment -

Oops.. sorry about that I'll attach them now.

Show
Maria Odea Ching added a comment - Oops.. sorry about that I'll attach them now.
Hide
Arnaud Heritier added a comment -

I have two repositories in my case, and after an archiva cleanup
in snapshots repo I have :

total 184
 4 drwxr-xr-x 28 ubuntu ubuntu  4096 2008-05-05 13:47 .
 4 drwxr-xr-x 40 ubuntu ubuntu  4096 2008-05-05 13:48 ..
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.10.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.1.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.10-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.11.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.1.1-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.12-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.2.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.3.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.3.1-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.4.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.5.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.6.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.7.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.7.1-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.7.2-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.8.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.9.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.1-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.2-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.3-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.4-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.5-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 15:08 1.6.0-SNAPSHOT
32 drwxr-xr-x  2 ubuntu ubuntu 32768 2008-05-05 15:07 1.7.0-SNAPSHOT
36 drwxr-xr-x  2 ubuntu ubuntu 36864 2008-05-13 10:43 1.8.0-SNAPSHOT
 4 -rwxr-xr-x  1 ubuntu ubuntu   367 2008-05-05 13:49 maven-metadata.xml
 4 -rwxr-xr-x  1 ubuntu ubuntu    52 2008-05-05 13:49 maven-metadata.xml.md5
 4 -rwxr-xr-x  1 ubuntu ubuntu    60 2008-05-05 13:49 maven-metadata.xml.sha1

in internal repo I have :

total 52
4 drwxr-xr-x 10 ubuntu ubuntu 4096 2008-05-05 16:44 .
4 drwxr-xr-x 21 ubuntu ubuntu 4096 2008-05-05 16:44 ..
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 0.9.0
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.0
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.1
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.3
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.4
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.5.0
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.5.1
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.7.0
4 -rwxr-xr-x  1 ubuntu ubuntu  507 2008-05-05 17:00 maven-metadata.xml
4 -rwxr-xr-x  1 ubuntu ubuntu   52 2008-05-05 16:44 maven-metadata.xml.md5
4 -rwxr-xr-x  1 ubuntu ubuntu   60 2008-05-05 16:44 maven-metadata.xml.sha1

And in the web interface I have :

*  0.9.0/
    * 1.0/
    * 1.1/
    * 1.3/
    * 1.4/
    * 1.5.0/
    * 1.5.1/
    * 1.6.0-20080226.173346-10/
    * 1.6.0-20080229.103456-11/
    * 1.7.0/
    * 1.7.0-20080318.134105-23/
    * 1.7.0-20080318.151519-24/
    * 1.8.0-20080428.123142-29/
    * 1.8.0-20080429.102033-30/
    * 1.8.0-SNAPSHOT/
    * 1.7.0-SNAPSHOT/
    * 1.6.0-SNAPSHOT/

Snapshots directories not shown in the web interface contain only metadata files.
I just noticed that there's no release for 1.6.0, perhaps it is why 1.7.0-SNAPSHOTS weren't removed ?

Show
Arnaud Heritier added a comment - I have two repositories in my case, and after an archiva cleanup in snapshots repo I have :
total 184
 4 drwxr-xr-x 28 ubuntu ubuntu  4096 2008-05-05 13:47 .
 4 drwxr-xr-x 40 ubuntu ubuntu  4096 2008-05-05 13:48 ..
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.10.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.1.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.10-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.11.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.1.1-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.12-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.2.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.3.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.3.1-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.4.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.5.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.6.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.7.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.7.1-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.7.2-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.8.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.9.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.1-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.2-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.3-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.4-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.5-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 15:08 1.6.0-SNAPSHOT
32 drwxr-xr-x  2 ubuntu ubuntu 32768 2008-05-05 15:07 1.7.0-SNAPSHOT
36 drwxr-xr-x  2 ubuntu ubuntu 36864 2008-05-13 10:43 1.8.0-SNAPSHOT
 4 -rwxr-xr-x  1 ubuntu ubuntu   367 2008-05-05 13:49 maven-metadata.xml
 4 -rwxr-xr-x  1 ubuntu ubuntu    52 2008-05-05 13:49 maven-metadata.xml.md5
 4 -rwxr-xr-x  1 ubuntu ubuntu    60 2008-05-05 13:49 maven-metadata.xml.sha1
in internal repo I have :
total 52
4 drwxr-xr-x 10 ubuntu ubuntu 4096 2008-05-05 16:44 .
4 drwxr-xr-x 21 ubuntu ubuntu 4096 2008-05-05 16:44 ..
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 0.9.0
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.0
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.1
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.3
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.4
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.5.0
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.5.1
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.7.0
4 -rwxr-xr-x  1 ubuntu ubuntu  507 2008-05-05 17:00 maven-metadata.xml
4 -rwxr-xr-x  1 ubuntu ubuntu   52 2008-05-05 16:44 maven-metadata.xml.md5
4 -rwxr-xr-x  1 ubuntu ubuntu   60 2008-05-05 16:44 maven-metadata.xml.sha1
And in the web interface I have :
*  0.9.0/
    * 1.0/
    * 1.1/
    * 1.3/
    * 1.4/
    * 1.5.0/
    * 1.5.1/
    * 1.6.0-20080226.173346-10/
    * 1.6.0-20080229.103456-11/
    * 1.7.0/
    * 1.7.0-20080318.134105-23/
    * 1.7.0-20080318.151519-24/
    * 1.8.0-20080428.123142-29/
    * 1.8.0-20080429.102033-30/
    * 1.8.0-SNAPSHOT/
    * 1.7.0-SNAPSHOT/
    * 1.6.0-SNAPSHOT/
Snapshots directories not shown in the web interface contain only metadata files. I just noticed that there's no release for 1.6.0, perhaps it is why 1.7.0-SNAPSHOTS weren't removed ?
Hide
Maria Odea Ching added a comment -

Ah, the delete released snapshots feature only checks for released snapshots in that repo and not against other repositories that's why the snapshots are still in there.

Show
Maria Odea Ching added a comment - Ah, the delete released snapshots feature only checks for released snapshots in that repo and not against other repositories that's why the snapshots are still in there.
Hide
Maria Odea Ching added a comment -

Do you think we should support a 'delete released snapshots' against all the repos the user has access to?

Show
Maria Odea Ching added a comment - Do you think we should support a 'delete released snapshots' against all the repos the user has access to?
Hide
Arnaud Heritier added a comment -

Yes I think because I don't think it is a good practice to have repositories storing releases and snapshots at the same time. It's often the cause of problems.

Show
Arnaud Heritier added a comment - Yes I think because I don't think it is a good practice to have repositories storing releases and snapshots at the same time. It's often the cause of problems.
Hide
Maria Odea Ching added a comment -

Good point I'll make a draft on how I'll implement this and post it here or send it to the dev list.
Thanks Arnaud!

Show
Maria Odea Ching added a comment - Good point I'll make a draft on how I'll implement this and post it here or send it to the dev list. Thanks Arnaud!
Hide
Maria Odea Ching added a comment -
Show
Maria Odea Ching added a comment - Posted this on the dev list: http://www.nabble.com/Delete-Released-Snaphots-td17224389.html
Hide
Maria Odea Ching added a comment -

Fixed in trunk -r660126:

  • check for released versions of the snapshot across all repos
  • added test
Show
Maria Odea Ching added a comment - Fixed in trunk -r660126:
  • check for released versions of the snapshot across all repos
  • added test

People

Vote (7)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: