[ 
https://issues.apache.org/jira/browse/MRM-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16265488#comment-16265488
 ] 

Martin Stockhammer edited comment on MRM-1966 at 12/14/17 11:25 PM:
--------------------------------------------------------------------

Unfortunately I have to admit, that this is a bug in the UI. The value 0 should 
be allowed for the "Days older" value.
I fixed this in the current snapshot version 2.2.4-SNAPSHOT, but we are not 
planning a bugfix release the next time. So
either you can use the snapshot release (should be stable, there are not very 
much changes to version 2.2.3) or you can
try the workaround:

Set the value to 1 and save the configuration. Then open your archiva.xml 
(either in $HOME/.m2/archiva.xml or in the base directory conf/archiva.xml,
look at the modification timestamp) with an editor and search for the entry 
{{<daysOlder>1</daysOlder>}}.
Here you can change the value to '0'.

Additional information:
The snapshot cleanup works only for snapshot directories and you have to set a 
valid cron entry. The cleanup job is scheduled only for the times that
are defined by the cron entry.




was (Author: effrafax):
Unfortunately I have to admit, that this is a bug in the UI. The value 0 should 
be allowed for the "Days older" value.
I fixed this in the current snapshot version 2.2.4-SNAPSHOT, but we are not 
planning a bugfix release the next time. So
either you can use the snapshot release (should be stable, there are not very 
much changes to version 2.2.3) or you can
try the workaround:

Set the value to 1 and save the configuration. Then open your archiva.xml 
(either in $HOME/.m2/archiva.xml oder in the base directory conf/archiva.xml,
look at the modification timestamp) with an editor and search for the entry 
{{<daysOlder>1</daysOlder>}}.
Here you can change the value to '0'.

Additional information:
The snapshot cleanup works only for snapshot directories and you have to set a 
valid cron entry. The cleanup job is scheduled only for the times that
are defined by the cron entry.



> Yet another repository-purge not working
> ----------------------------------------
>
>                 Key: MRM-1966
>                 URL: https://issues.apache.org/jira/browse/MRM-1966
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 2.2.3
>            Reporter: Per Kristian Fjellby
>            Priority: Minor
>             Fix For: 3.0.0, 2.2.4
>
>
> Hi guys!
> I'm having a bit of a struggle with the automatic purge of snapshots. I have 
> a repository set up with {{Days Older: 1}} and {{Retention Count: 1}}. I've 
> also verified that the {{repository-purge}} is enabled under {{Repository 
> Scanning -> Consumers}}.
> Even with this configured I still see folders (e.g. 
> /srv/archiva/data/repositories/<my_repo>/<path_to_artifact>/1.0.0-SNAPSHOT) 
> with multiple artifacts with timestamps older than what is configured for 
> that repository. The number also does not add up wrt. the retention count 
> policy.
> What I'd like to do is to just have a "Purge By Retention" policy - I'd like 
> to keep the two latest snapshots for each version. My assumption is then to 
> set the "Purge By Days" field to 0 and set the "Purge By Retention" to 2 - 
> but that does not seem to do anything. The documentation 
> (http://archiva.apache.org/docs/2.2.3/adminguide/repositories.html) states 
> the following:
> {noformat}
> Days Older    The first option for repository purge. Archiva will check how 
> old the artifact is and if it is older than the set number of days in this 
> field, then the artifact will be deleted respecting the retention count of 
> course. In order to disable the purge by number of days old and set Archiva 
> to purge by retention count, just set the repository purge field to 0. The 
> maximum number of days which can be set here is 1000. See the Repository 
> Purge section below for more details.
> {noformat}
> Trying to set this value to {{0}} leads to the following error being thrown 
> by the interface:
> {noformat}
> Please enter a value greater than or equal to 1.
> {noformat}
> Do you guys see what I'm doing wrong? Is my impression about how this is 
> working wrong? Is what I'm trying to achieve possible?
> Thanks.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to