mirror of https://github.com/apache/archiva.git
[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:
parent
1a7b107c06
commit
45ad3a396b
|
@ -286,6 +286,15 @@
|
||||||
</description>
|
</description>
|
||||||
<defaultValue>100</defaultValue>
|
<defaultValue>100</defaultValue>
|
||||||
</field>
|
</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>
|
</fields>
|
||||||
<codeSegments>
|
<codeSegments>
|
||||||
<codeSegment>
|
<codeSegment>
|
||||||
|
@ -323,7 +332,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.url.startsWith( "file" );
|
return this.url.startsWith( "file" );
|
||||||
}
|
}
|
||||||
|
|
||||||
]]></code>
|
]]></code>
|
||||||
</codeSegment>
|
</codeSegment>
|
||||||
</codeSegments>
|
</codeSegments>
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class RepositoryPurgeConsumer
|
||||||
/**
|
/**
|
||||||
* @plexus.requirement role-hint="jdo"
|
* @plexus.requirement role-hint="jdo"
|
||||||
*/
|
*/
|
||||||
private ArchivaDAO dao;
|
private ArchivaDAO dao;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @plexus.requirement
|
* @plexus.requirement
|
||||||
|
@ -176,7 +176,11 @@ public class RepositoryPurgeConsumer
|
||||||
{
|
{
|
||||||
try
|
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() );
|
repoPurge.process( path, configuration.getConfiguration() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,10 @@ public class AdminRepositoryConfiguration
|
||||||
this.setIndexDir( repoconfig.getIndexDir() );
|
this.setIndexDir( repoconfig.getIndexDir() );
|
||||||
this.setRefreshCronExpression( repoconfig.getRefreshCronExpression() );
|
this.setRefreshCronExpression( repoconfig.getRefreshCronExpression() );
|
||||||
|
|
||||||
|
this.setDaysOlder( repoconfig.getDaysOlder() );
|
||||||
|
this.setRetentionCount( repoconfig.getRetentionCount() );
|
||||||
|
this.setDeleteReleasedSnapshots( repoconfig.isDeleteReleasedSnapshots() );
|
||||||
|
|
||||||
if ( repoconfig.isManaged() )
|
if ( repoconfig.isManaged() )
|
||||||
{
|
{
|
||||||
RepositoryURL url = new RepositoryURL( repoconfig.getUrl() );
|
RepositoryURL url = new RepositoryURL( repoconfig.getUrl() );
|
||||||
|
|
|
@ -24,7 +24,12 @@
|
||||||
<ww:select list="#@java.util.LinkedHashMap@{'default' : 'Maven 2.x Repository', 'legacy' : 'Maven 1.x Repository'}"
|
<ww:select list="#@java.util.LinkedHashMap@{'default' : 'Maven 2.x Repository', 'legacy' : 'Maven 1.x Repository'}"
|
||||||
name="repository.layout" label="Type"/>
|
name="repository.layout" label="Type"/>
|
||||||
<ww:textfield name="repository.refreshCronExpression" label="Cron" size="40" required="true" />
|
<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.releases" value="repository.releases" label="Releases Included"/>
|
||||||
<ww:checkbox name="repository.snapshots" value="repository.snapshots" label="Snapshots 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.indexed" value="repository.indexed" label="Scannable"/>
|
||||||
|
<ww:checkbox name="repository.deleteReleasedSnapshots" value="repository.deleteReleasedSnapshots"
|
||||||
|
label="Delete Released Snapshots"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -130,6 +130,14 @@
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</td>
|
</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>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Releases Included</th>
|
<th>Releases Included</th>
|
||||||
|
@ -143,6 +151,10 @@
|
||||||
<th>Scanned</th>
|
<th>Scanned</th>
|
||||||
<td class="${repository.indexed ? 'donemark' : 'errormark'} booleanIcon"> ${repository.indexed}</td>
|
<td class="${repository.indexed ? 'donemark' : 'errormark'} booleanIcon"> ${repository.indexed}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Delete Released Snapshots</th>
|
||||||
|
<td class="${repository.deleteReleasedSnapshots ? 'donemark' : 'errormark'} booleanIcon"> ${repository.deleteReleasedSnapshots}</td>
|
||||||
|
</tr>
|
||||||
<c:if test="${repository.indexed}">
|
<c:if test="${repository.indexed}">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Scanning Cron</th>
|
<th>Scanning Cron</th>
|
||||||
|
|
Loading…
Reference in New Issue