Search in sources :

Example 46 with RemoteRepositoryConfiguration

use of org.apache.archiva.configuration.model.RemoteRepositoryConfiguration in project archiva by apache.

the class AbstractRepositoryServletProxiedTestCase method setupSnapshotsRemoteRepo.

protected void setupSnapshotsRemoteRepo() throws Exception {
    remoteSnapshots = createServer("snapshots");
    assertServerSetupCorrectly(remoteSnapshots);
    RemoteRepositoryConfiguration remoteRepositoryConfiguration = archivaConfiguration.getConfiguration().getRemoteRepositoriesAsMap().get(remoteSnapshots.id);
    if (remoteRepositoryConfiguration != null) {
        archivaConfiguration.getConfiguration().removeRemoteRepository(remoteRepositoryConfiguration);
    }
    archivaConfiguration.getConfiguration().addRemoteRepository(remoteSnapshots.config);
    setupCleanRepo(remoteSnapshots.root);
}
Also used : RemoteRepositoryConfiguration(org.apache.archiva.configuration.model.RemoteRepositoryConfiguration)

Aggregations

RemoteRepositoryConfiguration (org.apache.archiva.configuration.model.RemoteRepositoryConfiguration)46 Configuration (org.apache.archiva.configuration.model.Configuration)17 ManagedRepositoryConfiguration (org.apache.archiva.configuration.model.ManagedRepositoryConfiguration)14 ProxyConnectorConfiguration (org.apache.archiva.configuration.model.ProxyConnectorConfiguration)14 RemoteRepository (org.apache.archiva.repository.RemoteRepository)12 ContextConfiguration (org.springframework.test.context.ContextConfiguration)11 ArrayList (java.util.ArrayList)9 ArchivaConfiguration (org.apache.archiva.configuration.provider.ArchivaConfiguration)9 EditableRemoteRepository (org.apache.archiva.repository.EditableRemoteRepository)9 RepositoryException (org.apache.archiva.repository.RepositoryException)8 Test (org.junit.Test)8 Path (java.nio.file.Path)7 NetworkProxyConfiguration (org.apache.archiva.configuration.model.NetworkProxyConfiguration)7 RemoteIndexFeature (org.apache.archiva.repository.features.RemoteIndexFeature)7 Test (org.junit.jupiter.api.Test)7 HashMap (java.util.HashMap)6 RepositoryGroupConfiguration (org.apache.archiva.configuration.model.RepositoryGroupConfiguration)6 PasswordCredentials (org.apache.archiva.repository.base.PasswordCredentials)6 Iterator (java.util.Iterator)5 List (java.util.List)5