summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-scheduler/archiva-scheduler-repository
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2010-12-29 06:14:04 +0000
committerBrett Porter <brett@apache.org>2010-12-29 06:14:04 +0000
commitf56609efad6393b10c861446ec11ddda00f9a218 (patch)
tree05aad2cd341eff4c2c1e3397e8a93570ef27bcfc /archiva-modules/archiva-scheduler/archiva-scheduler-repository
parenta44b2ac9dd664f3a93e2a7001afd507abb218110 (diff)
downloadarchiva-f56609efad6393b10c861446ec11ddda00f9a218.tar.gz
archiva-f56609efad6393b10c861446ec11ddda00f9a218.zip
[MRM-1330] refactor access around the concept of a "repository session". See Javadoc for some notes. This should be a single entry point for application users of either the metadata repository, resolution, or storage access. The session needs to be explicitly closed (and modifications saved) to facilitate some storage mechanisms.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1053542 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-scheduler/archiva-scheduler-repository')
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml10
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutor.java64
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryArchivaTaskScheduler.java60
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java43
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java38
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java18
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.xml8
7 files changed, 175 insertions, 66 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
index 489d3e0ad..19e9e377c 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>archiva-scheduler</artifactId>
@@ -56,6 +57,11 @@
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutor.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutor.java
index c4a8b8ec5..3c729c552 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutor.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutor.java
@@ -19,7 +19,10 @@ package org.apache.archiva.scheduler.repository;
* under the License.
*/
+import org.apache.archiva.metadata.repository.MetadataRepository;
import org.apache.archiva.metadata.repository.MetadataRepositoryException;
+import org.apache.archiva.metadata.repository.RepositorySession;
+import org.apache.archiva.metadata.repository.RepositorySessionFactory;
import org.apache.archiva.metadata.repository.stats.RepositoryStatistics;
import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager;
import org.apache.archiva.repository.scanner.RepositoryContentConsumers;
@@ -75,6 +78,13 @@ public class ArchivaRepositoryScanningTaskExecutor
*/
private RepositoryStatisticsManager repositoryStatisticsManager;
+ /**
+ * TODO: may be different implementations
+ *
+ * @plexus.requirement
+ */
+ private RepositorySessionFactory repositorySessionFactory;
+
public void initialize()
throws InitializationException
{
@@ -127,48 +137,48 @@ public class ArchivaRepositoryScanningTaskExecutor
long sinceWhen = RepositoryScanner.FRESH_SCAN;
long previousFileCount = 0;
- if ( !repoTask.isScanAll() )
+ RepositorySession repositorySession = repositorySessionFactory.createSession();
+ MetadataRepository metadataRepository = repositorySession.getRepository();
+ try
{
- RepositoryStatistics previousStats;
- try
+ if ( !repoTask.isScanAll() )
{
- previousStats = repositoryStatisticsManager.getLastStatistics( repoId );
+ RepositoryStatistics previousStats = repositoryStatisticsManager.getLastStatistics(
+ metadataRepository, repoId );
+ if ( previousStats != null )
+ {
+ sinceWhen = previousStats.getScanStartTime().getTime();
+ previousFileCount = previousStats.getTotalFileCount();
+ }
}
- catch ( MetadataRepositoryException e )
+
+ RepositoryScanStatistics stats;
+ try
{
- throw new TaskExecutionException( "Unable to get previous statistics: " + e.getMessage(), e );
+ stats = repoScanner.scan( arepo, sinceWhen );
}
- if ( previousStats != null )
+ catch ( RepositoryScannerException e )
{
- sinceWhen = previousStats.getScanStartTime().getTime();
- previousFileCount = previousStats.getTotalFileCount();
+ throw new TaskExecutionException( "Repository error when executing repository job.", e );
}
- }
- RepositoryScanStatistics stats;
- try
- {
- stats = repoScanner.scan( arepo, sinceWhen );
- }
- catch ( RepositoryScannerException e )
- {
- throw new TaskExecutionException( "Repository error when executing repository job.", e );
- }
+ log.info( "Finished first scan: " + stats.toDump( arepo ) );
- log.info( "Finished first scan: " + stats.toDump( arepo ) );
-
- // further statistics will be populated by the following method
- Date endTime = new Date( stats.getWhenGathered().getTime() + stats.getDuration() );
- try
- {
- repositoryStatisticsManager.addStatisticsAfterScan( repoId, stats.getWhenGathered(), endTime,
- stats.getTotalFileCount(),
+ // further statistics will be populated by the following method
+ Date endTime = new Date( stats.getWhenGathered().getTime() + stats.getDuration() );
+ repositoryStatisticsManager.addStatisticsAfterScan( metadataRepository, repoId, stats.getWhenGathered(),
+ endTime, stats.getTotalFileCount(),
stats.getTotalFileCount() - previousFileCount );
+ repositorySession.save();
}
catch ( MetadataRepositoryException e )
{
throw new TaskExecutionException( "Unable to store updated statistics: " + e.getMessage(), e );
}
+ finally
+ {
+ repositorySession.close();
+ }
// log.info( "Scanning for removed repository content" );
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryArchivaTaskScheduler.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryArchivaTaskScheduler.java
index ce02452a6..fa928cc49 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryArchivaTaskScheduler.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryArchivaTaskScheduler.java
@@ -19,7 +19,10 @@ package org.apache.archiva.scheduler.repository;
* under the License.
*/
+import org.apache.archiva.metadata.repository.MetadataRepository;
import org.apache.archiva.metadata.repository.MetadataRepositoryException;
+import org.apache.archiva.metadata.repository.RepositorySession;
+import org.apache.archiva.metadata.repository.RepositorySessionFactory;
import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager;
import org.apache.archiva.scheduler.ArchivaTaskScheduler;
import org.apache.maven.archiva.common.ArchivaException;
@@ -77,6 +80,13 @@ public class RepositoryArchivaTaskScheduler
*/
private RepositoryStatisticsManager repositoryStatisticsManager;
+ /**
+ * TODO: could have multiple implementations
+ *
+ * @plexus.requirement
+ */
+ private RepositorySessionFactory repositorySessionFactory;
+
private static final String REPOSITORY_SCAN_GROUP = "rg";
private static final String REPOSITORY_JOB = "rj";
@@ -114,33 +124,42 @@ public class RepositoryArchivaTaskScheduler
List<ManagedRepositoryConfiguration> repositories =
archivaConfiguration.getConfiguration().getManagedRepositories();
- for ( ManagedRepositoryConfiguration repoConfig : repositories )
+ RepositorySession repositorySession = repositorySessionFactory.createSession();
+ try
{
- if ( repoConfig.isScanned() )
+ MetadataRepository metadataRepository = repositorySession.getRepository();
+ for ( ManagedRepositoryConfiguration repoConfig : repositories )
{
- try
+ if ( repoConfig.isScanned() )
{
- scheduleRepositoryJobs( repoConfig );
- }
- catch ( SchedulerException e )
- {
- throw new StartingException( "Unable to start scheduler: " + e.getMessage(), e );
- }
+ try
+ {
+ scheduleRepositoryJobs( repoConfig );
+ }
+ catch ( SchedulerException e )
+ {
+ throw new StartingException( "Unable to start scheduler: " + e.getMessage(), e );
+ }
- try
- {
- if ( !isPreviouslyScanned( repoConfig ) )
+ try
{
- queueInitialRepoScan( repoConfig );
+ if ( !isPreviouslyScanned( repoConfig, metadataRepository ) )
+ {
+ queueInitialRepoScan( repoConfig );
+ }
+ }
+ catch ( MetadataRepositoryException e )
+ {
+ log.warn( "Unable to determine if a repository is already scanned, skipping initial scan: " +
+ e.getMessage(), e );
}
- }
- catch ( MetadataRepositoryException e )
- {
- log.warn( "Unable to determine if a repository is already scanned, skipping initial scan: " +
- e.getMessage(), e );
}
}
}
+ finally
+ {
+ repositorySession.close();
+ }
}
public void stop()
@@ -270,10 +289,11 @@ public class RepositoryArchivaTaskScheduler
}
@SuppressWarnings( "unchecked" )
- private boolean isPreviouslyScanned( ManagedRepositoryConfiguration repoConfig )
+ private boolean isPreviouslyScanned( ManagedRepositoryConfiguration repoConfig,
+ MetadataRepository metadataRepository )
throws MetadataRepositoryException
{
- return repositoryStatisticsManager.getLastStatistics( repoConfig.getId() ) != null;
+ return repositoryStatisticsManager.getLastStatistics( metadataRepository, repoConfig.getId() ) != null;
}
// MRM-848: Pre-configured repository initially appear to be empty
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java
new file mode 100644
index 000000000..3a96aaa92
--- /dev/null
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java
@@ -0,0 +1,43 @@
+package org.apache.archiva.metadata.repository;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public class TestRepositorySessionFactory
+ implements RepositorySessionFactory
+{
+ private MetadataRepository repository;
+
+ private MetadataResolver resolver;
+
+ public RepositorySession createSession()
+ {
+ return new RepositorySession( repository, resolver );
+ }
+
+ public void setRepository( MetadataRepository repository )
+ {
+ this.repository = repository;
+ }
+
+ public void setResolver( MetadataResolver resolver )
+ {
+ this.resolver = resolver;
+ }
+}
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java
index c3a44ac2b..f7b188c34 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java
@@ -19,6 +19,7 @@ package org.apache.archiva.scheduler.repository;
* under the License.
*/
+import org.apache.archiva.metadata.repository.MetadataRepository;
import org.apache.archiva.metadata.repository.MetadataRepositoryException;
import org.apache.archiva.metadata.repository.stats.RepositoryStatistics;
import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager;
@@ -36,6 +37,8 @@ import java.util.Collection;
import java.util.Date;
import java.util.List;
+import static org.mockito.Mockito.mock;
+
/**
* ArchivaRepositoryScanningTaskExecutorTest
*
@@ -54,12 +57,23 @@ public class ArchivaRepositoryScanningTaskExecutorTest
private TestConsumer testConsumer;
+ private MetadataRepository metadataRepository;
+
protected void setUp()
throws Exception
{
super.setUp();
- taskExecutor = (TaskExecutor) lookup( TaskExecutor.class, "test-repository-scanning" );
+ try
+ {
+ taskExecutor = (TaskExecutor) lookup( TaskExecutor.class, "test-repository-scanning" );
+ }
+ catch ( Exception e )
+ {
+ // TODO: handle cleanup in plexus-spring lookup method instead
+ applicationContext.close();
+ throw e;
+ }
File sourceRepoDir = new File( getBasedir(), "src/test/repositories/default-repository" );
repoDir = new File( getBasedir(), "target/default-repository" );
@@ -98,6 +112,8 @@ public class ArchivaRepositoryScanningTaskExecutorTest
repositoryStatisticsManager = (RepositoryStatisticsManager) lookup( RepositoryStatisticsManager.class );
testConsumer = (TestConsumer) lookup( KnownRepositoryContentConsumer.class, "test-consumer" );
+
+ metadataRepository = mock( MetadataRepository.class );
}
protected void tearDown()
@@ -145,7 +161,8 @@ public class ArchivaRepositoryScanningTaskExecutorTest
unprocessedResultList.size() );
// check correctness of new stats
- RepositoryStatistics newStats = repositoryStatisticsManager.getLastStatistics( TEST_REPO_ID );
+ RepositoryStatistics newStats = repositoryStatisticsManager.getLastStatistics( metadataRepository,
+ TEST_REPO_ID );
assertEquals( 0, newStats.getNewFileCount() );
assertEquals( 31, newStats.getTotalFileCount() );
// FIXME: can't test these as they weren't stored in the database, move to tests for RepositoryStatisticsManager implementation
@@ -176,7 +193,8 @@ public class ArchivaRepositoryScanningTaskExecutorTest
unprocessedResultList.size() );
// check correctness of new stats
- RepositoryStatistics updatedStats = repositoryStatisticsManager.getLastStatistics( TEST_REPO_ID );
+ RepositoryStatistics updatedStats = repositoryStatisticsManager.getLastStatistics( metadataRepository,
+ TEST_REPO_ID );
assertEquals( 2, updatedStats.getNewFileCount() );
assertEquals( 33, updatedStats.getTotalFileCount() );
// FIXME: can't test these as they weren't stored in the database, move to tests for RepositoryStatisticsManager implementation
@@ -220,7 +238,8 @@ public class ArchivaRepositoryScanningTaskExecutorTest
unprocessedResultList.size() );
// check correctness of new stats
- RepositoryStatistics newStats = repositoryStatisticsManager.getLastStatistics( TEST_REPO_ID );
+ RepositoryStatistics newStats = repositoryStatisticsManager.getLastStatistics( metadataRepository,
+ TEST_REPO_ID );
assertEquals( 2, newStats.getNewFileCount() );
assertEquals( 33, newStats.getTotalFileCount() );
// FIXME: can't test these as they weren't stored in the database, move to tests for RepositoryStatisticsManager implementation
@@ -264,7 +283,8 @@ public class ArchivaRepositoryScanningTaskExecutorTest
unprocessedResultList.size() );
// check correctness of new stats
- RepositoryStatistics newStats = repositoryStatisticsManager.getLastStatistics( TEST_REPO_ID );
+ RepositoryStatistics newStats = repositoryStatisticsManager.getLastStatistics( metadataRepository,
+ TEST_REPO_ID );
assertEquals( 2, newStats.getNewFileCount() );
assertEquals( 33, newStats.getTotalFileCount() );
// FIXME: can't test these as they weren't stored in the database, move to tests for RepositoryStatisticsManager implementation
@@ -283,8 +303,8 @@ public class ArchivaRepositoryScanningTaskExecutorTest
repoTask.setScanAll( true );
Date date = Calendar.getInstance().getTime();
- repositoryStatisticsManager.addStatisticsAfterScan( TEST_REPO_ID, new Date( date.getTime() - 1234567 ), date, 8,
- 8 );
+ repositoryStatisticsManager.addStatisticsAfterScan( metadataRepository, TEST_REPO_ID, new Date(
+ date.getTime() - 1234567 ), date, 8, 8 );
taskExecutor.executeTask( repoTask );
@@ -308,7 +328,7 @@ public class ArchivaRepositoryScanningTaskExecutorTest
stats.setTotalProjectCount( 5 );
stats.setTotalArtifactFileSize( 38545 );
- repositoryStatisticsManager.addStatisticsAfterScan( TEST_REPO_ID, new Date( date.getTime() - 1234567 ), date,
- 31, 31 );
+ repositoryStatisticsManager.addStatisticsAfterScan( metadataRepository, TEST_REPO_ID, new Date(
+ date.getTime() - 1234567 ), date, 31, 31 );
}
}
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java
index 155f927d5..2c1245060 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java
@@ -19,21 +19,22 @@ package org.apache.archiva.scheduler.repository;
* under the License.
*/
+import org.apache.archiva.metadata.repository.MetadataRepository;
+import org.apache.archiva.metadata.repository.stats.RepositoryStatistics;
+import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager;
+
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.apache.archiva.metadata.repository.stats.RepositoryStatistics;
-import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager;
-
public class TestRepositoryStatisticsManager
implements RepositoryStatisticsManager
{
private Map<String, List<RepositoryStatistics>> repoStats = new HashMap<String, List<RepositoryStatistics>>();
- public RepositoryStatistics getLastStatistics( String repositoryId )
+ public RepositoryStatistics getLastStatistics( MetadataRepository metadataRepository, String repositoryId )
{
List<RepositoryStatistics> repositoryStatisticsList = getStatsList( repositoryId );
return !repositoryStatisticsList.isEmpty()
@@ -41,8 +42,8 @@ public class TestRepositoryStatisticsManager
: null;
}
- public void addStatisticsAfterScan( String repositoryId, Date startTime, Date endTime, long totalFiles,
- long newFiles )
+ public void addStatisticsAfterScan( MetadataRepository metadataRepository, String repositoryId, Date startTime,
+ Date endTime, long totalFiles, long newFiles )
{
List<RepositoryStatistics> stats = getStatsList( repositoryId );
@@ -55,12 +56,13 @@ public class TestRepositoryStatisticsManager
stats.add( repositoryStatistics );
}
- public void deleteStatistics( String repositoryId )
+ public void deleteStatistics( MetadataRepository metadataRepository, String repositoryId )
{
repoStats.remove( repositoryId );
}
- public List<RepositoryStatistics> getStatisticsInRange( String repositoryId, Date startDate, Date endDate )
+ public List<RepositoryStatistics> getStatisticsInRange( MetadataRepository metadataRepository, String repositoryId,
+ Date startDate, Date endDate )
{
throw new UnsupportedOperationException();
}
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.xml
index d8bb6c288..48595aff4 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.xml
@@ -37,6 +37,9 @@
<requirement>
<role>org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager</role>
</requirement>
+ <requirement>
+ <role>org.apache.archiva.metadata.repository.RepositorySessionFactory</role>
+ </requirement>
</requirements>
</component>
@@ -87,5 +90,10 @@
</requirement>
</requirements>
</component>
+
+ <component>
+ <role>org.apache.archiva.metadata.repository.RepositorySessionFactory</role>
+ <implementation>org.apache.archiva.metadata.repository.TestRepositorySessionFactory</implementation>
+ </component>
</components>
</component-set>