[MRM-275]

- Added days older, retention count and delete released snapshots fields in repository page.
- Updated RepositoryPurgeConsumer



git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@563030 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maria Odea B. Ching 2007-08-06 05:45:38 +00:00
parent 1a7b107c06
commit 45ad3a396b
5 changed files with 38 additions and 3 deletions

View File

@ -286,6 +286,15 @@
</description>
<defaultValue>100</defaultValue>
</field>
<field>
<name>deleteReleasedSnapshots</name>
<version>1.0.0+</version>
<type>boolean</type>
<description>
True if the released snapshots are to be removed from the repo during repository purge.
</description>
<defaultValue>false</defaultValue>
</field>
</fields>
<codeSegments>
<codeSegment>
@ -323,7 +332,8 @@
}
return this.url.startsWith( "file" );
}
}
]]></code>
</codeSegment>
</codeSegments>

View File

@ -81,7 +81,7 @@ public class RepositoryPurgeConsumer
/**
* @plexus.requirement role-hint="jdo"
*/
private ArchivaDAO dao;
private ArchivaDAO dao;
/**
* @plexus.requirement
@ -176,7 +176,11 @@ public class RepositoryPurgeConsumer
{
try
{
cleanUp.process( path, configuration.getConfiguration() );
RepositoryConfiguration repoConfig = configuration.getConfiguration().findRepositoryById( repository.getId() );
if( repoConfig.isDeleteReleasedSnapshots() )
{
cleanUp.process( path, configuration.getConfiguration() );
}
repoPurge.process( path, configuration.getConfiguration() );
}

View File

@ -59,6 +59,10 @@ public class AdminRepositoryConfiguration
this.setIndexDir( repoconfig.getIndexDir() );
this.setRefreshCronExpression( repoconfig.getRefreshCronExpression() );
this.setDaysOlder( repoconfig.getDaysOlder() );
this.setRetentionCount( repoconfig.getRetentionCount() );
this.setDeleteReleasedSnapshots( repoconfig.isDeleteReleasedSnapshots() );
if ( repoconfig.isManaged() )
{
RepositoryURL url = new RepositoryURL( repoconfig.getUrl() );

View File

@ -24,7 +24,12 @@
<ww:select list="#@java.util.LinkedHashMap@{'default' : 'Maven 2.x Repository', 'legacy' : 'Maven 1.x Repository'}"
name="repository.layout" label="Type"/>
<ww:textfield name="repository.refreshCronExpression" label="Cron" size="40" required="true" />
<ww:textfield name="repository.daysOlder" label="Repository Purge By Days Older Than" size="5"/>
<ww:textfield name="repository.retentionCount" label="Repository Purge By Retention Count" size="5"/>
<ww:checkbox name="repository.releases" value="repository.releases" label="Releases Included"/>
<ww:checkbox name="repository.snapshots" value="repository.snapshots" label="Snapshots Included"/>
<ww:checkbox name="repository.indexed" value="repository.indexed" label="Scannable"/>
<ww:checkbox name="repository.deleteReleasedSnapshots" value="repository.deleteReleasedSnapshots"
label="Delete Released Snapshots"/>

View File

@ -130,6 +130,14 @@
</c:otherwise>
</c:choose>
</td>
</tr>
<tr>
<th>Repository Purge By Days Older Than</th>
<td>${repository.daysOlder}</td>
</tr>
<tr>
<th>Repository Purge By Retention Count</th>
<td>${repository.retentionCount}</td>
</tr>
<tr>
<th>Releases Included</th>
@ -143,6 +151,10 @@
<th>Scanned</th>
<td class="${repository.indexed ? 'donemark' : 'errormark'} booleanIcon"> ${repository.indexed}</td>
</tr>
<tr>
<th>Delete Released Snapshots</th>
<td class="${repository.deleteReleasedSnapshots ? 'donemark' : 'errormark'} booleanIcon"> ${repository.deleteReleasedSnapshots}</td>
</tr>
<c:if test="${repository.indexed}">
<tr>
<th>Scanning Cron</th>