Discussion:
deleting old snapshots
Matthew Broadhead
2018-10-08 18:00:34 UTC
Permalink
i am using 2.2.0 and i have looked through all the settings but i don't
understand how to automatically delete old snapshots.

i followed this
https://stackoverflow.com/questions/12315461/how-to-configure-maven-or-apache-archiva-that-it-keeps-only-n-builds-of-an-snaps
but it didn't work
Matthew Broadhead
2018-10-19 08:51:51 UTC
Permalink
sorry to chase but is anyone still monitoring this list?  are we
supposed to move to sonatype nexus oss?  i thought apache created maven?
Post by Matthew Broadhead
i am using 2.2.0 and i have looked through all the settings but i
don't understand how to automatically delete old snapshots.
i followed this
https://stackoverflow.com/questions/12315461/how-to-configure-maven-or-apache-archiva-that-it-keeps-only-n-builds-of-an-snaps
but it didn't work
Jay Vyas
2018-10-19 11:37:00 UTC
Permalink
Hey Matt: some of us are definetly here. Archiva saved me when I couldn’t pay for nexus so, I’d definetly say there are a few others in that boat. Ufortubately nobody has responded yet. Next step if necessary would be filing a JIrA issue on the Apache organization for archiva if nobody is able to help on the thread.
sorry to chase but is anyone still monitoring this list? are we supposed to move to sonatype nexus oss? i thought apache created maven?
i am using 2.2.0 and i have looked through all the settings but i don't understand how to automatically delete old snapshots.
i followed this https://stackoverflow.com/questions/12315461/how-to-configure-maven-or-apache-archiva-that-it-keeps-only-n-builds-of-an-snaps but it didn't work
Stefaan Dutry
2018-10-19 11:52:04 UTC
Permalink
According to my understanding it should be through the
repository-purge consumer. (This is located under Administration >
repository scanning > Consumers)

Then on the repository configuration itself there are settings like
"Delete Released Snapshots" and "retention count" and "days older"

Unfortunately the automatic purge isn't happening on our systems either.
(our version is 2.2.3)

see:
http://archiva.apache.org/docs/2.2.0/adminguide/repositories.html
* delete released snapshots
* repository purge by days older
* repository purge by retention count
http://archiva.apache.org/docs/2.2.0/adminguide/consumers.html
* repository-purge

But this is what's specified in the link you provided

Regards,
Stefaan Dutry
Post by Jay Vyas
Hey Matt: some of us are definetly here. Archiva saved me when I couldn’t pay for nexus so, I’d definetly say there are a few others in that boat. Ufortubately nobody has responded yet. Next step if necessary would be filing a JIrA issue on the Apache organization for archiva if nobody is able to help on the thread.
sorry to chase but is anyone still monitoring this list? are we supposed to move to sonatype nexus oss? i thought apache created maven?
i am using 2.2.0 and i have looked through all the settings but i don't understand how to automatically delete old snapshots.
i followed this https://stackoverflow.com/questions/12315461/how-to-configure-maven-or-apache-archiva-that-it-keeps-only-n-builds-of-an-snaps but it didn't work
Matthew Broadhead
2018-10-19 13:39:54 UTC
Permalink
yes i have activated the "repository-purge" consumer under Repository
scanning -> Consumers.  maybe i also need to activate the
"validate-checksums" consumer as that is the only one not enabled

in my snapshot repository i have the following values:
Cron Expression  0 0,30 * * * ?
Days Older  30
Retention Count  2
Delete Released Snapshots is checked

i was going to upgrade to 2.2.3 but if yours is not working either then
there is not much point

i wonder if there is any way to trigger it from the command line?
Post by Stefaan Dutry
According to my understanding it should be through the
repository-purge consumer. (This is located under Administration >
repository scanning > Consumers)
Then on the repository configuration itself there are settings like
"Delete Released Snapshots" and "retention count" and "days older"
Unfortunately the automatic purge isn't happening on our systems either.
(our version is 2.2.3)
http://archiva.apache.org/docs/2.2.0/adminguide/repositories.html
* delete released snapshots
* repository purge by days older
* repository purge by retention count
http://archiva.apache.org/docs/2.2.0/adminguide/consumers.html
* repository-purge
But this is what's specified in the link you provided
Regards,
Stefaan Dutry
Post by Jay Vyas
Hey Matt: some of us are definetly here. Archiva saved me when I couldn’t pay for nexus so, I’d definetly say there are a few others in that boat. Ufortubately nobody has responded yet. Next step if necessary would be filing a JIrA issue on the Apache organization for archiva if nobody is able to help on the thread.
sorry to chase but is anyone still monitoring this list? are we supposed to move to sonatype nexus oss? i thought apache created maven?
i am using 2.2.0 and i have looked through all the settings but i don't understand how to automatically delete old snapshots.
i followed this https://stackoverflow.com/questions/12315461/how-to-configure-maven-or-apache-archiva-that-it-keeps-only-n-builds-of-an-snaps but it didn't work
Matthew Broadhead
2018-10-19 14:59:13 UTC
Permalink
https://github.com/apache/archiva/blob/9351c66bc89c65357ba72bb84982951919cbc0c4/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutor.java#L181

seems that it hasn't been implemented?
Post by Matthew Broadhead
yes i have activated the "repository-purge" consumer under Repository
scanning -> Consumers.  maybe i also need to activate the
"validate-checksums" consumer as that is the only one not enabled
Cron Expression  0 0,30 * * * ?
Days Older  30
Retention Count  2
Delete Released Snapshots is checked
i was going to upgrade to 2.2.3 but if yours is not working either
then there is not much point
i wonder if there is any way to trigger it from the command line?
Post by Stefaan Dutry
According to my understanding it should be through the
repository-purge consumer. (This is located under Administration >
repository scanning > Consumers)
Then on the repository configuration itself there are settings like
"Delete Released Snapshots" and "retention count" and "days older"
Unfortunately the automatic purge isn't happening on our systems either.
(our version is 2.2.3)
http://archiva.apache.org/docs/2.2.0/adminguide/repositories.html
* delete released snapshots
* repository purge by days older
* repository purge by retention count
http://archiva.apache.org/docs/2.2.0/adminguide/consumers.html
* repository-purge
But this is what's specified in the link you provided
Regards,
Stefaan Dutry
Hey Matt: some of us are definetly here.  Archiva saved me when I
couldn’t pay for nexus so, I’d definetly say there are a few others
in that boat. Ufortubately nobody has responded yet.  Next step if
necessary would be filing a JIrA issue on the Apache organization
for archiva if nobody is able to help on the thread.
On Oct 19, 2018, at 4:51 AM, Matthew Broadhead
sorry to chase but is anyone still monitoring this list? are we
supposed to move to sonatype nexus oss?  i thought apache created maven?
Post by Matthew Broadhead
i am using 2.2.0 and i have looked through all the settings but i
don't understand how to automatically delete old snapshots.
i followed this
https://stackoverflow.com/questions/12315461/how-to-configure-maven-or-apache-archiva-that-it-keeps-only-n-builds-of-an-snaps
but it didn't work
Terence Kent
2018-10-19 17:22:01 UTC
Permalink
Stefaan, Matthew,

I hate "works for me responses", so apologies in advance. However, we are
seeing artifacts automatically removed according to our repository
retention settings in our deployment and I wanted to share
possibly-relevant information.

We've been using Archiva version 2.2.3 in a docker container for over a
year now and haven't had any retention-related problems. Here are the parts
of our configuration that may be relevant.

1. We have dedicated "snapshots" and "releases" repositories. Only
snapshots are allowed in the "snapshots" repository, and only "releases" in
the releases repository.
2. In each repository we have retention policies, and each repository is
configured to be scanned.
3. The "repository-purge" consumer is enabled.


Also, FWIW, I'm pretty sure the code that applies the retention policy is
in the "repository-purge" consumer, and the out-most class for the feature
is found here:

https://github.com/apache/archiva/blob/9351c66bc89c65357ba72bb84982951919cbc0c4/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java

Best,
Terence






On Fri, Oct 19, 2018 at 7:59 AM Matthew Broadhead
Post by Matthew Broadhead
https://github.com/apache/archiva/blob/9351c66bc89c65357ba72bb84982951919cbc0c4/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutor.java#L181
seems that it hasn't been implemented?
Post by Matthew Broadhead
yes i have activated the "repository-purge" consumer under Repository
scanning -> Consumers. maybe i also need to activate the
"validate-checksums" consumer as that is the only one not enabled
Cron Expression 0 0,30 * * * ?
Days Older 30
Retention Count 2
Delete Released Snapshots is checked
i was going to upgrade to 2.2.3 but if yours is not working either
then there is not much point
i wonder if there is any way to trigger it from the command line?
Post by Stefaan Dutry
According to my understanding it should be through the
repository-purge consumer. (This is located under Administration >
repository scanning > Consumers)
Then on the repository configuration itself there are settings like
"Delete Released Snapshots" and "retention count" and "days older"
Unfortunately the automatic purge isn't happening on our systems either.
(our version is 2.2.3)
http://archiva.apache.org/docs/2.2.0/adminguide/repositories.html
* delete released snapshots
* repository purge by days older
* repository purge by retention count
http://archiva.apache.org/docs/2.2.0/adminguide/consumers.html
* repository-purge
But this is what's specified in the link you provided
Regards,
Stefaan Dutry
Post by Jay Vyas
Hey Matt: some of us are definetly here. Archiva saved me when I
couldn’t pay for nexus so, I’d definetly say there are a few others
in that boat. Ufortubately nobody has responded yet. Next step if
necessary would be filing a JIrA issue on the Apache organization
for archiva if nobody is able to help on the thread.
On Oct 19, 2018, at 4:51 AM, Matthew Broadhead
sorry to chase but is anyone still monitoring this list? are we
supposed to move to sonatype nexus oss? i thought apache created
maven?
Post by Matthew Broadhead
i am using 2.2.0 and i have looked through all the settings but i
don't understand how to automatically delete old snapshots.
i followed this
https://stackoverflow.com/questions/12315461/how-to-configure-maven-or-apache-archiva-that-it-keeps-only-n-builds-of-an-snaps
Post by Matthew Broadhead
Post by Stefaan Dutry
Post by Jay Vyas
Post by Matthew Broadhead
but it didn't work
Martin
2018-10-19 19:48:48 UTC
Permalink
Hi Matthew, Terence,

thank you Terence, this is right. These should be the necessary configuration points to get it work.
The cron entry is also required, and you have to make sure that the snapshot artifact files are named, as maven creates
them, e.g. archiva-checksum-3.0.0-20180409.013311-155.jar

You have to make sure, that the "artifact" file types in the "Repository Scanning" configuration match your files, and the types
should not be listed in the "ignored" list.

You can manually run the the scan process by clicking the "Directories Scanning" action on the repository. If you activate debug
log, you should see entries from the "RepositoryPurgeConsumer" in archiva.log.

Regards

Martin
Post by Terence Kent
Stefaan, Matthew,
I hate "works for me responses", so apologies in advance. However, we are
seeing artifacts automatically removed according to our repository
retention settings in our deployment and I wanted to share
possibly-relevant information.
We've been using Archiva version 2.2.3 in a docker container for over a
year now and haven't had any retention-related problems. Here are the parts
of our configuration that may be relevant.
1. We have dedicated "snapshots" and "releases" repositories. Only
snapshots are allowed in the "snapshots" repository, and only "releases" in
the releases repository.
2. In each repository we have retention policies, and each repository is
configured to be scanned.
3. The "repository-purge" consumer is enabled.
Also, FWIW, I'm pretty sure the code that applies the retention policy is
in the "repository-purge" consumer, and the out-most class for the feature
https://github.com/apache/archiva/blob/9351c66bc89c65357ba72bb84982951919cbc0c4/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
Best,
Terence
On Fri, Oct 19, 2018 at 7:59 AM Matthew Broadhead
Post by Matthew Broadhead
https://github.com/apache/archiva/blob/9351c66bc89c65357ba72bb84982951919cbc0c4/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutor.java#L181
seems that it hasn't been implemented?
Post by Matthew Broadhead
yes i have activated the "repository-purge" consumer under Repository
scanning -> Consumers. maybe i also need to activate the
"validate-checksums" consumer as that is the only one not enabled
Cron Expression 0 0,30 * * * ?
Days Older 30
Retention Count 2
Delete Released Snapshots is checked
i was going to upgrade to 2.2.3 but if yours is not working either
then there is not much point
i wonder if there is any way to trigger it from the command line?
Post by Stefaan Dutry
According to my understanding it should be through the
repository-purge consumer. (This is located under Administration >
repository scanning > Consumers)
Then on the repository configuration itself there are settings like
"Delete Released Snapshots" and "retention count" and "days older"
Unfortunately the automatic purge isn't happening on our systems either.
(our version is 2.2.3)
http://archiva.apache.org/docs/2.2.0/adminguide/repositories.html
* delete released snapshots
* repository purge by days older
* repository purge by retention count
http://archiva.apache.org/docs/2.2.0/adminguide/consumers.html
* repository-purge
But this is what's specified in the link you provided
Regards,
Stefaan Dutry
Post by Jay Vyas
Hey Matt: some of us are definetly here. Archiva saved me when I
couldn’t pay for nexus so, I’d definetly say there are a few others
in that boat. Ufortubately nobody has responded yet. Next step if
necessary would be filing a JIrA issue on the Apache organization
for archiva if nobody is able to help on the thread.
On Oct 19, 2018, at 4:51 AM, Matthew Broadhead
sorry to chase but is anyone still monitoring this list? are we
supposed to move to sonatype nexus oss? i thought apache created
maven?
Post by Matthew Broadhead
i am using 2.2.0 and i have looked through all the settings but i
don't understand how to automatically delete old snapshots.
i followed this
https://stackoverflow.com/questions/12315461/how-to-configure-maven-or-apache-archiva-that-it-keeps-only-n-builds-of-an-snaps
Post by Matthew Broadhead
Post by Stefaan Dutry
Post by Jay Vyas
Post by Matthew Broadhead
but it didn't work
Martin Stockhammer
2018-10-19 17:19:35 UTC
Permalink
Hi Mathew,

sorry resources are very limited.
To help sort this out, please use version 2.2.3.
There are some tickets in jira about purging. Have you checked, if the snapshots are still in the filesystem? There is an issue about the index not updated for purged files.
Can you provide some logs?

Regards

Martin
Post by Matthew Broadhead
yes i have activated the "repository-purge" consumer under Repository
scanning -> Consumers.  maybe i also need to activate the
"validate-checksums" consumer as that is the only one not enabled
Cron Expression  0 0,30 * * * ?
Days Older  30
Retention Count  2
Delete Released Snapshots is checked
i was going to upgrade to 2.2.3 but if yours is not working either then
there is not much point
i wonder if there is any way to trigger it from the command line?
Post by Stefaan Dutry
According to my understanding it should be through the
repository-purge consumer. (This is located under Administration >
repository scanning > Consumers)
Then on the repository configuration itself there are settings like
"Delete Released Snapshots" and "retention count" and "days older"
Unfortunately the automatic purge isn't happening on our systems
either.
Post by Stefaan Dutry
(our version is 2.2.3)
http://archiva.apache.org/docs/2.2.0/adminguide/repositories.html
* delete released snapshots
* repository purge by days older
* repository purge by retention count
http://archiva.apache.org/docs/2.2.0/adminguide/consumers.html
* repository-purge
But this is what's specified in the link you provided
Regards,
Stefaan Dutry
Post by Jay Vyas
Hey Matt: some of us are definetly here. Archiva saved me when I
couldn’t pay for nexus so, I’d definetly say there are a few others in
that boat. Ufortubately nobody has responded yet. Next step if
necessary would be filing a JIrA issue on the Apache organization for
archiva if nobody is able to help on the thread.
Post by Stefaan Dutry
Post by Jay Vyas
On Oct 19, 2018, at 4:51 AM, Matthew Broadhead
sorry to chase but is anyone still monitoring this list? are we
supposed to move to sonatype nexus oss? i thought apache created
maven?
Post by Stefaan Dutry
Post by Jay Vyas
Post by Matthew Broadhead
i am using 2.2.0 and i have looked through all the settings but i
don't understand how to automatically delete old snapshots.
Post by Stefaan Dutry
Post by Jay Vyas
Post by Matthew Broadhead
i followed this
https://stackoverflow.com/questions/12315461/how-to-configure-maven-or-apache-archiva-that-it-keeps-only-n-builds-of-an-snaps
but it didn't work
--
This message was sent from mobile phone.
Matthew Broadhead
2018-10-19 13:33:03 UTC
Permalink
thanks for coming back to me.  i was going to try upgrading to 2.2.3
first and then submit a JIRA.  if i can figure out how to make it work
maybe i ould also suggest changes to the documentation through JIRA
Post by Jay Vyas
Hey Matt: some of us are definetly here. Archiva saved me when I couldn’t pay for nexus so, I’d definetly say there are a few others in that boat. Ufortubately nobody has responded yet. Next step if necessary would be filing a JIrA issue on the Apache organization for archiva if nobody is able to help on the thread.
sorry to chase but is anyone still monitoring this list? are we supposed to move to sonatype nexus oss? i thought apache created maven?
i am using 2.2.0 and i have looked through all the settings but i don't understand how to automatically delete old snapshots.
i followed this https://stackoverflow.com/questions/12315461/how-to-configure-maven-or-apache-archiva-that-it-keeps-only-n-builds-of-an-snaps but it didn't work
Loading...