- 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
</description>\r
<defaultValue>100</defaultValue>\r
</field>\r
+ <field>\r
+ <name>deleteReleasedSnapshots</name>\r
+ <version>1.0.0+</version>\r
+ <type>boolean</type>\r
+ <description>\r
+ True if the released snapshots are to be removed from the repo during repository purge.\r
+ </description>\r
+ <defaultValue>false</defaultValue>\r
+ </field>\r
</fields>\r
<codeSegments>\r
<codeSegment>\r
}\r
\r
return this.url.startsWith( "file" );\r
- } \r
+ }\r
+\r
]]></code>\r
</codeSegment>\r
</codeSegments>\r
/**
* @plexus.requirement role-hint="jdo"
*/
- private ArchivaDAO dao;
+ private ArchivaDAO dao;
/**
* @plexus.requirement
{
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() );
}
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() );
<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"/>
+
</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>
<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>