diff options
Diffstat (limited to 'archiva-modules/archiva-base/archiva-proxy')
8 files changed, 38 insertions, 22 deletions
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java index a76e74457..a68f01dcc 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java @@ -54,14 +54,12 @@ import org.apache.archiva.redback.components.registry.Registry; import org.apache.archiva.redback.components.registry.RegistryListener; import org.apache.archiva.redback.components.taskqueue.TaskQueueException; import org.apache.archiva.repository.ManagedRepository; -import org.apache.archiva.repository.RemoteRepository; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.PasswordCredentials; +import org.apache.archiva.repository.RemoteRepository; import org.apache.archiva.repository.RemoteRepositoryContent; import org.apache.archiva.repository.RepositoryContentFactory; import org.apache.archiva.repository.RepositoryCredentials; -import org.apache.archiva.repository.RepositoryException; -import org.apache.archiva.repository.RepositoryNotFoundException; import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.repository.metadata.MetadataTools; import org.apache.archiva.repository.metadata.RepositoryMetadataException; diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/CacheFailuresTransferTest.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/CacheFailuresTransferTest.java index 3445ee86d..0061fa732 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/CacheFailuresTransferTest.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/CacheFailuresTransferTest.java @@ -30,11 +30,11 @@ import org.apache.maven.wagon.ResourceDoesNotExistException; import org.easymock.EasyMock; import org.junit.Test; +import javax.inject.Inject; import java.io.File; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import javax.inject.Inject; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/ErrorHandlingTest.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/ErrorHandlingTest.java index 9137993f8..cef7501b4 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/ErrorHandlingTest.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/ErrorHandlingTest.java @@ -33,7 +33,6 @@ import org.apache.maven.wagon.authorization.AuthorizationException; import org.easymock.EasyMock; import org.junit.Test; - import java.io.File; import java.io.IOException; import java.nio.file.Files; diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java index 40fa894ca..6978fde22 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java @@ -19,14 +19,8 @@ package org.apache.archiva.proxy; * under the License. */ -import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin; -import org.apache.archiva.proxy.model.RepositoryProxyConnectors; -import org.apache.archiva.repository.RepositoryContentProvider; -import org.apache.archiva.repository.RepositoryRegistry; -import org.apache.archiva.repository.maven2.MavenManagedRepository; -import org.apache.commons.io.FileUtils; import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.configuration.NetworkProxyConfiguration; import org.apache.archiva.configuration.ProxyConnectorConfiguration; @@ -38,7 +32,13 @@ import org.apache.archiva.policies.PropagateErrorsDownloadPolicy; import org.apache.archiva.policies.PropagateErrorsOnUpdateDownloadPolicy; import org.apache.archiva.policies.ReleasesPolicy; import org.apache.archiva.policies.SnapshotsPolicy; +import org.apache.archiva.proxy.model.RepositoryProxyConnectors; import org.apache.archiva.repository.ManagedRepositoryContent; +import org.apache.archiva.repository.RepositoryContentProvider; +import org.apache.archiva.repository.RepositoryRegistry; +import org.apache.archiva.repository.maven2.MavenManagedRepository; +import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; +import org.apache.commons.io.FileUtils; import org.assertj.core.api.Assertions; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.HttpConnectionFactory; @@ -63,9 +63,6 @@ import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.Locale; - -import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import static org.junit.Assert.*; diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java index b9a5f1ac3..23bfb8503 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java @@ -22,7 +22,11 @@ package org.apache.archiva.proxy; import org.apache.archiva.common.utils.VersionUtil; import org.apache.archiva.configuration.ProxyConnectorConfiguration; import org.apache.archiva.maven2.metadata.MavenMetadataReader; -import org.apache.archiva.model.*; +import org.apache.archiva.model.ArchivaRepositoryMetadata; +import org.apache.archiva.model.Plugin; +import org.apache.archiva.model.ProjectReference; +import org.apache.archiva.model.SnapshotVersion; +import org.apache.archiva.model.VersionedReference; import org.apache.archiva.policies.CachedFailuresPolicy; import org.apache.archiva.policies.ChecksumPolicy; import org.apache.archiva.policies.ReleasesPolicy; diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MockConfiguration.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MockConfiguration.java index 30de66392..fd6e66eb2 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MockConfiguration.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MockConfiguration.java @@ -19,7 +19,12 @@ package org.apache.archiva.proxy; * under the License. */ -import org.apache.archiva.configuration.*; +import org.apache.archiva.configuration.ArchivaConfiguration; +import org.apache.archiva.configuration.Configuration; +import org.apache.archiva.configuration.ConfigurationListener; +import org.apache.archiva.configuration.FileType; +import org.apache.archiva.configuration.FileTypes; +import org.apache.archiva.configuration.RepositoryScanningConfiguration; import org.apache.archiva.redback.components.registry.Registry; import org.apache.archiva.redback.components.registry.RegistryException; import org.apache.archiva.redback.components.registry.RegistryListener; @@ -31,7 +36,11 @@ import org.springframework.stereotype.Service; import javax.annotation.PostConstruct; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.*; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Set; /** * MockConfiguration diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java index 81563b625..dafcae9c8 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java @@ -21,7 +21,19 @@ package org.apache.archiva.repository.mock; import org.apache.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.archiva.configuration.RemoteRepositoryConfiguration; -import org.apache.archiva.repository.*; +import org.apache.archiva.repository.BasicManagedRepository; +import org.apache.archiva.repository.BasicRemoteRepository; +import org.apache.archiva.repository.EditableManagedRepository; +import org.apache.archiva.repository.EditableRemoteRepository; +import org.apache.archiva.repository.ManagedRepository; +import org.apache.archiva.repository.PasswordCredentials; +import org.apache.archiva.repository.ReleaseScheme; +import org.apache.archiva.repository.RemoteRepository; +import org.apache.archiva.repository.RepositoryCredentials; +import org.apache.archiva.repository.RepositoryEvent; +import org.apache.archiva.repository.RepositoryException; +import org.apache.archiva.repository.RepositoryProvider; +import org.apache.archiva.repository.RepositoryType; import org.apache.archiva.repository.features.ArtifactCleanupFeature; import org.apache.archiva.repository.features.IndexCreationFeature; import org.apache.archiva.repository.features.RemoteIndexFeature; diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-proxy/src/test/resources/META-INF/spring-context.xml index 0e0824920..537762dd0 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/resources/META-INF/spring-context.xml @@ -20,11 +20,8 @@ <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-3.0.xsd - http://www.springframework.org/schema/context - http://www.springframework.org/schema/context/spring-context-3.0.xsd" + http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" default-lazy-init="true"> |