Removing repositoryAdmin dependency
*/
import junit.framework.TestCase;
-import org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin;
import org.apache.archiva.admin.repository.proxyconnector.DefaultProxyConnectorAdmin;
-import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
import org.apache.archiva.common.utils.FileUtils;
import org.apache.archiva.configuration.ArchivaConfiguration;
import org.apache.archiva.configuration.Configuration;
import org.apache.maven.index.Scanner;
import org.apache.maven.index.ScanningRequest;
import org.apache.maven.index.ScanningResult;
-import org.apache.maven.index.context.IndexCreator;
import org.apache.maven.index.context.IndexingContext;
import org.easymock.EasyMock;
import org.easymock.IMocksControl;
Configuration config;
- @Inject
- PlexusSisuBridge plexusSisuBridge;
-
- @Inject
- List<IndexCreator> indexCreators;
-
@Inject
Indexer indexer;
@@ -131,9 +122,6 @@ public void setUp()
archivaConfig = archivaConfigControl.createMock( ArchivaConfiguration.class );
- DefaultManagedRepositoryAdmin defaultManagedRepositoryAdmin = new DefaultManagedRepositoryAdmin();
- defaultManagedRepositoryAdmin.setArchivaConfiguration( archivaConfig );
-
DefaultProxyConnectorAdmin defaultProxyConnectorAdmin = new DefaultProxyConnectorAdmin();
defaultProxyConnectorAdmin.setArchivaConfiguration( archivaConfig );
repositoryRegistry.setArchivaConfiguration( archivaConfig );
@@ -142,14 +130,12 @@ public void setUp()
queryCreator );
assertNotNull( repositoryRegistry );
- defaultManagedRepositoryAdmin.setRepositoryRegistry( repositoryRegistry );
config = new Configuration();
config.addManagedRepository( createRepositoryConfig( TEST_REPO_1 ) );
config.addManagedRepository( createRepositoryConfig( TEST_REPO_2 ) );
config.addManagedRepository( createRepositoryConfig( REPO_RELEASE ) );
-
archivaConfig.addListener( EasyMock.anyObject( ConfigurationListener.class ) );
EasyMock.expect( archivaConfig.getDefaultLocale() ).andReturn( Locale.getDefault( ) ).anyTimes();
EasyMock.expect( archivaConfig.getConfiguration() ).andReturn(config).anyTimes();
