mirror of https://github.com/apache/archiva.git
[MRM-144] indexed -> scanned
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@574891 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
184cf0176b
commit
ae4e1ada9b
|
@ -122,6 +122,7 @@ public class DefaultArchivaConfiguration
|
|||
for ( Iterator i = config.getRepositories().iterator(); i.hasNext(); )
|
||||
{
|
||||
V1RepositoryConfiguration r = (V1RepositoryConfiguration) i.next();
|
||||
r.setScanned( r.isIndexed() );
|
||||
|
||||
if ( r.getUrl().startsWith( "file://" ) )
|
||||
{
|
||||
|
|
|
@ -51,7 +51,7 @@ public class MavenProxyPropertyLoader
|
|||
config.setLocation( localCachePath );
|
||||
config.setName( "Imported Maven-Proxy Cache" );
|
||||
config.setId( "maven-proxy" );
|
||||
config.setIndexed( false );
|
||||
config.setScanned( false );
|
||||
config.setReleases( true );
|
||||
config.setSnapshots( false );
|
||||
configuration.addManagedRepository( config );
|
||||
|
|
|
@ -304,12 +304,11 @@
|
|||
<description>True if this repository contains snapshot versioned artifacts.</description>
|
||||
<defaultValue>false</defaultValue>
|
||||
</field>
|
||||
<!-- TODO! is indexed better named as scanned? check it's usages (or lack of usages) when iterating repos -->
|
||||
<field>
|
||||
<name>indexed</name>
|
||||
<name>scanned</name>
|
||||
<version>1.0.0+</version>
|
||||
<type>boolean</type>
|
||||
<description>True if this repository should be indexed.</description>
|
||||
<description>True if this repository should be scanned and processed.</description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</field>
|
||||
<field>
|
||||
|
@ -373,6 +372,12 @@
|
|||
The URL for this repository.
|
||||
</description>
|
||||
</field>
|
||||
<field>
|
||||
<name>indexed</name>
|
||||
<version>1.0.0+</version>
|
||||
<type>boolean</type>
|
||||
<required>true</required>
|
||||
</field>
|
||||
</fields>
|
||||
</class>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<layout>default</layout>
|
||||
<releases>true</releases>
|
||||
<snapshots>false</snapshots>
|
||||
<indexed>true</indexed>
|
||||
<scanned>true</scanned>
|
||||
<refreshCronExpression>0 0 0 * * ?</refreshCronExpression>
|
||||
<daysOlder>30</daysOlder>
|
||||
</managedRepository>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<layout>default</layout>
|
||||
<releases>false</releases>
|
||||
<snapshots>true</snapshots>
|
||||
<indexed>true</indexed>
|
||||
<scanned>true</scanned>
|
||||
<refreshCronExpression>0 0\,30 0 * * ?</refreshCronExpression>
|
||||
<daysOlder>30</daysOlder>
|
||||
</managedRepository>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<layout>default</layout>
|
||||
<releases>false</releases>
|
||||
<snapshots>true</snapshots>
|
||||
<indexed>true</indexed>
|
||||
<indexed>false</indexed>
|
||||
<refreshCronExpression>0 0,30 * * ?</refreshCronExpression>
|
||||
</repository>
|
||||
<repository>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
<layout>default</layout>
|
||||
<releases>true</releases>
|
||||
<snapshots>false</snapshots>
|
||||
<!-- TODO! -->
|
||||
<indexed>true</indexed>
|
||||
<refreshCronExpression>0 0 * * ?</refreshCronExpression>
|
||||
</managedRepository>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<layout>default</layout>
|
||||
<releases>true</releases>
|
||||
<snapshots>false</snapshots>
|
||||
<indexed>true</indexed>
|
||||
<scanned>true</scanned>
|
||||
<refreshCronExpression>0 0 * * ?</refreshCronExpression>
|
||||
</managedRepository>
|
||||
<managedRepository>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<layout>default</layout>
|
||||
<releases>false</releases>
|
||||
<snapshots>true</snapshots>
|
||||
<indexed>true</indexed>
|
||||
<scanned>true</scanned>
|
||||
<refreshCronExpression>0 0,30 * * ?</refreshCronExpression>
|
||||
</managedRepository>
|
||||
</managedRepositories>
|
||||
|
|
|
@ -66,7 +66,7 @@ public class ArchivaConfigurationTest
|
|||
assertEquals( "check managed repositories", "Archiva Managed Internal Repository", repository.getName() );
|
||||
assertEquals( "check managed repositories", "internal", repository.getId() );
|
||||
assertEquals( "check managed repositories", "default", repository.getLayout() );
|
||||
assertTrue( "check managed repositories", repository.isIndexed() );
|
||||
assertTrue( "check managed repositories", repository.isScanned() );
|
||||
}
|
||||
|
||||
public void testGetConfigurationFromDefaults()
|
||||
|
@ -87,7 +87,7 @@ public class ArchivaConfigurationTest
|
|||
assertEquals( "check managed repositories", "Archiva Managed Internal Repository", repository.getName() );
|
||||
assertEquals( "check managed repositories", "internal", repository.getId() );
|
||||
assertEquals( "check managed repositories", "default", repository.getLayout() );
|
||||
assertTrue( "check managed repositories", repository.isIndexed() );
|
||||
assertTrue( "check managed repositories", repository.isScanned() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -489,7 +489,7 @@ public class ArchivaConfigurationTest
|
|||
assertEquals( "check managed repositories", "Archiva Managed Internal Repository", repository.getName() );
|
||||
assertEquals( "check managed repositories", "internal", repository.getId() );
|
||||
assertEquals( "check managed repositories", "default", repository.getLayout() );
|
||||
assertTrue( "check managed repositories", repository.isIndexed() );
|
||||
assertTrue( "check managed repositories", repository.isScanned() );
|
||||
}
|
||||
|
||||
public void testAutoDetectV1()
|
||||
|
@ -510,7 +510,7 @@ public class ArchivaConfigurationTest
|
|||
assertEquals( "check managed repositories", "Archiva Managed Internal Repository", repository.getName() );
|
||||
assertEquals( "check managed repositories", "internal", repository.getId() );
|
||||
assertEquals( "check managed repositories", "default", repository.getLayout() );
|
||||
assertTrue( "check managed repositories", repository.isIndexed() );
|
||||
assertTrue( "check managed repositories", repository.isScanned() );
|
||||
}
|
||||
|
||||
public void testArchivaV1()
|
||||
|
@ -533,7 +533,7 @@ public class ArchivaConfigurationTest
|
|||
assertEquals( "check managed repositories", "Archiva Managed Internal Repository", repository.getName() );
|
||||
assertEquals( "check managed repositories", "internal", repository.getId() );
|
||||
assertEquals( "check managed repositories", "default", repository.getLayout() );
|
||||
assertTrue( "check managed repositories", repository.isIndexed() );
|
||||
assertTrue( "check managed repositories", repository.isScanned() );
|
||||
assertFalse( "check managed repositories", repository.isSnapshots() );
|
||||
|
||||
repository = map.get( "snapshots" );
|
||||
|
@ -542,7 +542,7 @@ public class ArchivaConfigurationTest
|
|||
assertEquals( "check managed repositories", "Archiva Managed Snapshot Repository", repository.getName() );
|
||||
assertEquals( "check managed repositories", "snapshots", repository.getId() );
|
||||
assertEquals( "check managed repositories", "default", repository.getLayout() );
|
||||
assertTrue( "check managed repositories", repository.isIndexed() );
|
||||
assertFalse( "check managed repositories", repository.isScanned() );
|
||||
assertTrue( "check managed repositories", repository.isSnapshots() );
|
||||
}
|
||||
|
||||
|
|
|
@ -107,13 +107,13 @@ public class ConfigurationTest
|
|||
}
|
||||
|
||||
private ManagedRepositoryConfiguration createManagedRepository( String id, String name, String location,
|
||||
boolean indexed )
|
||||
boolean scanned )
|
||||
{
|
||||
ManagedRepositoryConfiguration repo = new ManagedRepositoryConfiguration();
|
||||
repo.setId( id );
|
||||
repo.setName( name );
|
||||
repo.setLocation( location );
|
||||
repo.setIndexed( indexed );
|
||||
repo.setScanned( scanned );
|
||||
return repo;
|
||||
}
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ public class DefaultCrossRepositorySearch
|
|||
List<ManagedRepositoryConfiguration> repos = configuration.getConfiguration().getManagedRepositories();
|
||||
for ( ManagedRepositoryConfiguration repo : repos )
|
||||
{
|
||||
if ( repo.isIndexed() )
|
||||
if ( repo.isScanned() )
|
||||
{
|
||||
localIndexedRepositories.add( ArchivaConfigurationAdaptor.toArchivaRepository( repo ) );
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class DefaultCrossRepositorySearchTest
|
|||
repoConfig.setName( TEST_DEFAULT_REPOSITORY_NAME );
|
||||
repoConfig.setLocation( repoDir.getAbsolutePath() );
|
||||
repoConfig.setIndexDir( indexLocation.getAbsolutePath() );
|
||||
repoConfig.setIndexed( true );
|
||||
repoConfig.setScanned( true );
|
||||
|
||||
if ( indexLocation.exists() )
|
||||
{
|
||||
|
|
|
@ -103,7 +103,7 @@ public class DefaultArchivaTaskScheduler
|
|||
{
|
||||
ManagedRepositoryConfiguration repoConfig = (ManagedRepositoryConfiguration) i.next();
|
||||
|
||||
if ( repoConfig.isIndexed() )
|
||||
if ( repoConfig.isScanned() )
|
||||
{
|
||||
scheduleRepositoryJobs( repoConfig );
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public class ConfigureRepositoryAction
|
|||
this.mode = "add";
|
||||
|
||||
this.repository.setReleases( true );
|
||||
this.repository.setIndexed( true );
|
||||
this.repository.setScanned( true );
|
||||
|
||||
return INPUT;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ public class ConfigureRepositoryAction
|
|||
{
|
||||
this.repository = new ManagedRepositoryConfiguration();
|
||||
this.repository.setReleases( false );
|
||||
this.repository.setIndexed( false );
|
||||
this.repository.setScanned( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<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.scanned" value="repository.scanned" label="Scannable"/>
|
||||
<ww:checkbox name="repository.deleteReleasedSnapshots" value="repository.deleteReleasedSnapshots"
|
||||
label="Delete Released Snapshots"/>
|
||||
|
||||
|
|
|
@ -148,13 +148,13 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th>Scanned</th>
|
||||
<td class="${repository.indexed ? 'donemark' : 'errormark'} booleanIcon"> ${repository.indexed}</td>
|
||||
<td class="${repository.scanned ? 'donemark' : 'errormark'} booleanIcon"> ${repository.scanned}</td>
|
||||
</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.scanned}">
|
||||
<tr>
|
||||
<th>Scanning Cron</th>
|
||||
<td>${repository.refreshCronExpression}</td>
|
||||
|
|
|
@ -103,7 +103,7 @@ public class ConfigureRepositoryActionTest
|
|||
assertNull( configuration.getId() );
|
||||
// check all booleans are false
|
||||
assertFalse( configuration.isDeleteReleasedSnapshots() );
|
||||
assertFalse( configuration.isIndexed() );
|
||||
assertFalse( configuration.isScanned() );
|
||||
assertFalse( configuration.isReleases() );
|
||||
assertFalse( configuration.isSnapshots() );
|
||||
|
||||
|
@ -112,7 +112,7 @@ public class ConfigureRepositoryActionTest
|
|||
|
||||
// check defaults
|
||||
assertFalse( configuration.isDeleteReleasedSnapshots() );
|
||||
assertTrue( configuration.isIndexed() );
|
||||
assertTrue( configuration.isScanned() );
|
||||
assertTrue( configuration.isReleases() );
|
||||
assertFalse( configuration.isSnapshots() );
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ public class ConfigureRepositoryActionTest
|
|||
assertEquals( expectedRepository.getRefreshCronExpression(), actualRepository.getRefreshCronExpression() );
|
||||
assertEquals( expectedRepository.getRetentionCount(), actualRepository.getRetentionCount() );
|
||||
assertEquals( expectedRepository.isDeleteReleasedSnapshots(), actualRepository.isDeleteReleasedSnapshots() );
|
||||
assertEquals( expectedRepository.isIndexed(), actualRepository.isIndexed() );
|
||||
assertEquals( expectedRepository.isScanned(), actualRepository.isScanned() );
|
||||
assertEquals( expectedRepository.isReleases(), actualRepository.isReleases() );
|
||||
assertEquals( expectedRepository.isSnapshots(), actualRepository.isSnapshots() );
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ public class ConfigureRepositoryActionTest
|
|||
repository.setRetentionCount( 20 );
|
||||
repository.setReleases( true );
|
||||
repository.setSnapshots( true );
|
||||
repository.setIndexed( true );
|
||||
repository.setScanned( true );
|
||||
repository.setDeleteReleasedSnapshots( true );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue