From f1012523759e82b871d1d2ef038899d1e3237a9a Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Fri, 30 Mar 2018 20:11:57 +0200 Subject: [PATCH] Reorganizing imports --- .../org/apache/archiva/cli/ArchivaCli.java | 2 - .../resources/META-INF/spring-context.xml | 4 +- .../apache/archiva/common/utils/BaseFile.java | 1 - .../archiva/common/utils/BaseFileTest.java | 3 +- .../archiva/common/utils/DateUtilTest.java | 4 +- .../archiva/common/utils/FileUtilsTest.java | 1 - .../ArchivaConfigurationMRM789Test.java | 17 +++---- .../ArchivaConfigurationTest.java | 2 - .../configuration/ConfigurationTest.java | 8 ++-- .../archiva/configuration/FileTypesTest.java | 7 ++- .../configuration/LegacyArtifactPathTest.java | 4 +- .../MavenProxyPropertyLoaderTest.java | 13 ++++-- ...ectorConfigurationOrderComparatorTest.java | 11 +++-- ...RepositoryConfigurationComparatorTest.java | 6 ++- .../functors/ConsumerWantsFilePredicate.java | 10 ++-- .../src/main/java/SimpleArtifactConsumer.java | 19 ++++---- .../src/test/java/RepositoryProviderMock.java | 1 - .../test/java/SimpleArtifactConsumerTest.java | 8 ++-- .../src/test/resources/spring-context.xml | 4 +- .../core/MetadataUpdaterConsumer.java | 2 +- ...eanupReleasedSnapshotsRepositoryPurge.java | 2 +- .../repository/DaysOldRepositoryPurge.java | 2 +- .../repository/RepositoryPurgeConsumer.java | 2 - .../RetentionCountRepositoryPurge.java | 2 +- .../RepositoryPurgeConsumerTest.java | 6 --- .../RetentionCountRepositoryPurgeTest.java | 1 - .../mock/RepositoryProviderMock.java | 14 +++++- .../resources/META-INF/spring-context.xml | 5 +- .../lucene/test/TestRBACManager.java | 2 +- .../DefaultLegacyRepositoryConverter.java | 2 - .../LegacyConverterArtifactConsumer.java | 2 +- .../converter/RepositoryConverterTest.java | 4 +- .../DefaultFileLockManagerTimeoutTest.java | 6 ++- .../indexer/maven/MavenIndexManager.java | 19 ++++++-- .../maven/search/MavenRepositorySearch.java | 26 +++++++++-- .../indexer/maven/MavenIndexManagerTest.java | 1 - .../search/AbstractMavenRepositorySearch.java | 11 ++++- .../MavenRepositorySearchPaginateTest.java | 6 +-- .../search/MavenRepositorySearchTest.java | 6 ++- .../mock/MockRepositorySessionFactory.java | 7 ++- .../apache/archiva/model/ArchivaArtifact.java | 2 +- .../resources/META-INF/spring-context.xml | 7 +-- .../archiva/policies/ChecksumPolicyTest.java | 6 +-- .../archiva/policies/ReleasePolicyTest.java | 5 +- .../DefaultRepositoryProxyConnectors.java | 4 +- .../proxy/CacheFailuresTransferTest.java | 2 +- .../archiva/proxy/ErrorHandlingTest.java | 1 - .../archiva/proxy/HttpProxyTransferTest.java | 15 +++--- .../archiva/proxy/MetadataTransferTest.java | 6 ++- .../archiva/proxy/MockConfiguration.java | 13 +++++- .../mock/RepositoryProviderMock.java | 14 +++++- .../resources/META-INF/spring-context.xml | 5 +- .../admin/model/beans/AbstractRepository.java | 1 - .../model/managed/ManagedRepositoryAdmin.java | 2 - .../repository/AbstractRepositoryAdmin.java | 2 +- .../DefaultRepositoryCommonValidator.java | 2 +- .../admin/DefaultArchivaAdministration.java | 1 - .../DefaultManagedRepositoryAdmin.java | 6 ++- .../DefaultProxyConnectorAdmin.java | 2 - .../admin/mock/ArchivaIndexManagerMock.java | 29 ++++++++++-- .../managed/ManagedRepositoryAdminTest.java | 1 - .../archiva/indexer/ArchivaIndexManager.java | 2 - .../indexer/ArchivaIndexingContext.java | 2 - .../archiva/indexer/GenericIndexManager.java | 1 - .../indexer/search/ArtifactInfoFilter.java | 1 - .../archiva/repository/ManagedRepository.java | 2 - .../apache/archiva/repository/Repository.java | 2 - .../repository/RepositoryContentFactory.java | 2 - .../features/IndexCreationFeature.java | 3 -- .../resources/META-INF/spring-context.xml | 5 +- .../repository/AbstractRemoteRepository.java | 3 -- .../repository/AbstractRepository.java | 10 +++- .../repository/BasicManagedRepository.java | 2 - .../repository/BasicRemoteRepository.java | 2 - .../repository/RepositoryRegistry.java | 23 ++++++++-- .../repository/metadata/MetadataTools.java | 22 +++++++-- .../metadata/RepositoryMetadataMerge.java | 8 ++-- .../mock/ManagedRepositoryContentMock.java | 2 +- .../mock/RemoteRepositoryContentMock.java | 2 +- .../mock/RepositoryContentProviderMock.java | 10 +++- .../mock/RepositoryProviderMock.java | 14 +++++- .../src/test/resources/spring-context.xml | 5 +- .../scanner/DefaultRepositoryScanner.java | 6 ++- .../scanner/RepositoryContentConsumers.java | 7 ++- .../scanner/RepositoryScannerInstance.java | 14 +++++- .../functors/ConsumerProcessFileClosure.java | 2 +- .../functors/TriggerBeginScanClosure.java | 4 +- .../functors/TriggerScanCompletedClosure.java | 2 +- .../scanner/InvalidScanConsumer.java | 2 - .../src/test/resources/spring-context.xml | 5 +- .../transaction/AbstractTransactionEvent.java | 7 ++- .../archiva/transaction/CreateFileEvent.java | 4 +- .../transaction/AbstractFileEventTest.java | 6 +-- .../org/apache/archiva/xml/XMLReader.java | 15 +++++- .../org/apache/archiva/xml/XMLReaderTest.java | 6 +-- .../org/apache/archiva/xml/XMLWriterTest.java | 2 +- ...ArchivaRepositoryScanningTaskExecutor.java | 8 ++-- .../resources/META-INF/spring-context.xml | 4 +- .../mock/MockManagedRepositoryAdmin.java | 3 +- .../scheduler/repository/TestConsumer.java | 2 +- .../rest/api/services/BrowseService.java | 16 ++++++- .../services/ManagedRepositoriesService.java | 2 +- .../api/services/NetworkProxyService.java | 2 +- .../api/services/ProxyConnectorService.java | 2 +- .../RedbackRuntimeConfigurationService.java | 2 +- .../services/RemoteRepositoriesService.java | 2 +- .../api/services/RepositoriesService.java | 1 - .../api/services/RepositoryGroupService.java | 2 +- .../rest/api/services/SearchService.java | 6 ++- .../api/services/SystemStatusService.java | 2 +- .../rest/services/AbstractRestService.java | 7 ++- .../DefaultArchivaAdministrationService.java | 6 ++- .../rest/services/DefaultBrowseService.java | 26 +++++++++-- ...ultRedbackRuntimeConfigurationService.java | 7 ++- .../services/DefaultRepositoriesService.java | 29 +++++++++--- .../rest/services/DefaultSearchService.java | 16 ++++++- .../services/DefaultSystemStatusService.java | 8 +++- .../utils/AddAdminRepoConsumerClosure.java | 2 +- .../services/AbstractArchivaRestTest.java | 17 ++++++- .../rest/services/BrowseServiceTest.java | 13 +++++- .../apache/archiva/rss/RssFeedGenerator.java | 7 ++- .../NewArtifactsRssFeedProcessor.java | 7 ++- ...NewVersionsOfArtifactRssFeedProcessor.java | 6 ++- .../NewArtifactsRssFeedProcessorTest.java | 8 +++- ...ersionsOfArtifactRssFeedProcessorTest.java | 7 ++- .../security/mock/MockBeanServices.java | 8 +++- .../web/api/DefaultFileUploadService.java | 8 +++- .../archiva/web/api/FileUploadService.java | 9 +++- .../archiva/web/api/RuntimeInfoService.java | 6 ++- .../archiva/web/rss/RssFeedServlet.java | 12 ++++- .../ArchivaConfigurableUsersManager.java | 7 ++- .../ArchivaLdapRoleMapperConfiguration.java | 7 ++- .../web/security/ArchivaRbacManager.java | 19 +++++++- .../ArchivaUserManagerAuthenticator.java | 9 +++- .../archiva/web/startup/ArchivaStartup.java | 1 - .../remotedownload/AbstractDownloadTest.java | 7 ++- .../DownloadArtifactFromQueryTest.java | 6 ++- .../remotedownload/DownloadArtifactsTest.java | 6 ++- ...DownloadMergedIndexNonDefaultPathTest.java | 6 ++- .../DownloadMergedIndexTest.java | 6 ++- .../archiva/web/rss/RssFeedServletTest.java | 6 ++- .../archiva/web/rss/SecuritySystemStub.java | 13 +++++- .../memory/TestMetadataRepository.java | 6 ++- .../webtest/memory/TestMetadataResolver.java | 8 +++- .../web/test/parent/AbstractSeleniumTest.java | 6 ++- .../webdav/ArchivaDavResourceFactory.java | 2 +- .../webdav/ArchivaVirtualDavResource.java | 21 +++++++-- .../archiva/webdav/RepositoryServlet.java | 12 ++++- .../archiva/webdav/util/IndexWriter.java | 8 +++- .../AbstractRepositoryServletTestCase.java | 6 ++- .../archiva/metadata/model/CiManagement.java | 1 - .../model/ProjectVersionMetadata.java | 1 - .../model/facets/RepositoryProblemFacet.java | 4 +- .../AbstractMetadataRepository.java | 8 ++-- .../repository/RepositorySession.java | 1 - .../repository/storage/RepositoryStorage.java | 1 - .../AbstractMetadataRepositoryTest.java | 28 +++++++++-- .../DefaultRepositoryStatisticsTest.java | 2 +- .../generic/GenericMetadataFacet.java | 4 +- .../maven2/Maven2RepositoryStorage.java | 46 +++++++++++++++---- .../maven2/RepositoryModelResolver.java | 2 - .../AbstractDefaultRepositoryContent.java | 2 +- .../content/maven2/DefaultPathParser.java | 2 +- .../maven2/MavenManagedRepository.java | 5 -- .../maven2/MavenRemoteRepository.java | 2 - .../maven2/MavenRepositoryProvider.java | 16 ++++++- .../archiva/configuration/MockRepoAdmin.java | 1 - .../ManagedDefaultRepositoryContentTest.java | 2 +- ...yMetadataResolverMRM1411RepoGroupTest.java | 13 +++++- ...RepositoryMetadataResolverMRM1411Test.java | 12 ++++- .../Maven2RepositoryMetadataResolverTest.java | 20 ++++++-- .../RemoteDefaultRepositoryContentTest.java | 2 +- .../AbstractRepositoryLayerTestCase.java | 3 -- .../archiva/repository/RepositoryURLTest.java | 7 ++- .../content/maven2/RepositoryRequestTest.java | 2 +- .../index/mock/ArchivaIndexManagerMock.java | 30 ++++++++++-- .../metadata/Maven2RepositoryStorageTest.java | 2 - .../metadata/MetadataToolsTest.java | 2 +- .../spring-context-metadata-tools-test.xml | 5 +- .../CassandraMetadataRepository.java | 3 -- .../CassandraRepositorySessionFactory.java | 2 - .../repository/cassandra/CassandraUtils.java | 1 - .../DefaultCassandraArchivaManager.java | 4 +- .../model/ArtifactMetadataModel.java | 4 +- .../cassandra/model/MetadataFacetModel.java | 4 +- .../cassandra/MockRepositoryStorage.java | 1 - .../cassandra/RepositoriesNamespaceTest.java | 3 +- .../file/FileMetadataRepository.java | 35 ++++++++++++-- .../file/FileRepositorySessionFactory.java | 9 ++-- .../jcr/JcrRepositorySessionFactory.java | 8 +++- .../repository/jcr/RepositoryFactory.java | 6 ++- .../JcrRepositoryStatisticsGatheringTest.java | 6 ++- .../consumers/DuplicateArtifactsConsumer.java | 6 ++- .../DuplicateArtifactsConsumerTest.java | 4 +- .../src/test/resources/spring-context.xml | 5 +- .../src/test/resources/spring-context.xml | 5 +- .../merge/Maven2RepositoryMerger.java | 7 ++- 197 files changed, 940 insertions(+), 408 deletions(-) diff --git a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java index b2ca3782f..d8078a981 100644 --- a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java +++ b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java @@ -28,7 +28,6 @@ import org.apache.archiva.consumers.RepositoryContentConsumer; import org.apache.archiva.converter.RepositoryConversionException; import org.apache.archiva.converter.legacy.LegacyRepositoryConverter; import org.apache.archiva.repository.BasicManagedRepository; -import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.scanner.RepositoryScanStatistics; import org.apache.archiva.repository.scanner.RepositoryScanner; import org.apache.archiva.repository.scanner.RepositoryScannerException; @@ -48,7 +47,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.Properties; diff --git a/archiva-cli/src/main/resources/META-INF/spring-context.xml b/archiva-cli/src/main/resources/META-INF/spring-context.xml index b40e3851a..c19c37071 100644 --- a/archiva-cli/src/main/resources/META-INF/spring-context.xml +++ b/archiva-cli/src/main/resources/META-INF/spring-context.xml @@ -21,12 +21,10 @@ diff --git a/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/BaseFile.java b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/BaseFile.java index bc2db2a9f..0548cd444 100644 --- a/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/BaseFile.java +++ b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/BaseFile.java @@ -21,7 +21,6 @@ package org.apache.archiva.common.utils; import java.io.File; import java.net.URI; -import java.nio.file.Paths; /** * BaseFile - convenient File object that tracks the Base Directory and can provide relative path values diff --git a/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/BaseFileTest.java b/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/BaseFileTest.java index df3f19baa..a9778ebce 100644 --- a/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/BaseFileTest.java +++ b/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/BaseFileTest.java @@ -19,9 +19,8 @@ package org.apache.archiva.common.utils; * under the License. */ -import org.apache.commons.lang.StringUtils; - import junit.framework.TestCase; +import org.apache.commons.lang.StringUtils; import java.io.File; diff --git a/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/DateUtilTest.java b/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/DateUtilTest.java index a097e5a5e..1c2e23086 100644 --- a/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/DateUtilTest.java +++ b/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/DateUtilTest.java @@ -19,12 +19,12 @@ package org.apache.archiva.common.utils; * under the License. */ +import junit.framework.TestCase; + import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; -import junit.framework.TestCase; - /** * DateUtilTest * diff --git a/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/FileUtilsTest.java b/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/FileUtilsTest.java index c589e7c91..855a268dd 100644 --- a/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/FileUtilsTest.java +++ b/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/FileUtilsTest.java @@ -19,7 +19,6 @@ package org.apache.archiva.common.utils; * under the License. */ -import org.junit.Assert; import org.junit.Assume; import org.junit.Test; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationMRM789Test.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationMRM789Test.java index c91d2f841..5cc6617a9 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationMRM789Test.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationMRM789Test.java @@ -19,22 +19,23 @@ package org.apache.archiva.configuration; * under the License. */ -import java.nio.charset.Charset; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.List; -import javax.inject.Inject; - import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; -import static org.junit.Assert.*; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; +import javax.inject.Inject; +import java.nio.charset.Charset; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; + +import static org.junit.Assert.*; + /** * Test the configuration store. */ diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java index 36a8a7d64..e8af9a5af 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java @@ -22,7 +22,6 @@ package org.apache.archiva.configuration; import org.apache.archiva.redback.components.registry.RegistryException; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.commons.io.FileUtils; -import org.custommonkey.xmlunit.XMLAssert; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; @@ -38,7 +37,6 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; -import java.util.Map; import static org.easymock.EasyMock.*; import static org.junit.Assert.*; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ConfigurationTest.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ConfigurationTest.java index cc058e6a9..2a5e9b447 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ConfigurationTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ConfigurationTest.java @@ -19,13 +19,15 @@ package org.apache.archiva.configuration; * under the License. */ +import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; +import org.junit.Test; +import org.junit.runner.RunWith; + import java.util.Arrays; import java.util.HashSet; import java.util.Map; -import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; + import static org.junit.Assert.*; -import org.junit.Test; -import org.junit.runner.RunWith; /** * Test the generated Configuration class from Modello. This is primarily to test the hand coded methods. diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/FileTypesTest.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/FileTypesTest.java index f0e5701fa..83874b7a0 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/FileTypesTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/FileTypesTest.java @@ -19,13 +19,16 @@ package org.apache.archiva.configuration; * under the License. */ -import javax.inject.Inject; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; -import static org.junit.Assert.*; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; +import javax.inject.Inject; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + @RunWith( ArchivaSpringJUnit4ClassRunner.class ) @ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml" } ) public class FileTypesTest diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/LegacyArtifactPathTest.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/LegacyArtifactPathTest.java index db4117c5b..c36a93b71 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/LegacyArtifactPathTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/LegacyArtifactPathTest.java @@ -20,10 +20,12 @@ package org.apache.archiva.configuration; */ import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; -import static org.junit.Assert.*; import org.junit.Test; import org.junit.runner.RunWith; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + /** * Test the generated LegacyArtifactPath class from Modello. This is primarily to test the hand coded methods. * diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/MavenProxyPropertyLoaderTest.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/MavenProxyPropertyLoaderTest.java index 5e620bcbf..dfc41e949 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/MavenProxyPropertyLoaderTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/MavenProxyPropertyLoaderTest.java @@ -19,16 +19,19 @@ package org.apache.archiva.configuration; * under the License. */ +import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; + import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.Map; import java.util.Properties; -import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; -import static org.junit.Assert.*; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; /** */ diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java index 9bac5bf28..62a666c20 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java @@ -19,16 +19,19 @@ package org.apache.archiva.configuration.functors; * under the License. */ -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; import org.apache.archiva.configuration.ProxyConnectorConfiguration; import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; import org.apache.commons.lang.StringUtils; -import static org.junit.Assert.*; import org.junit.Test; import org.junit.runner.RunWith; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + /** * ProxyConnectorConfigurationOrderComparatorTest * diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/RepositoryConfigurationComparatorTest.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/RepositoryConfigurationComparatorTest.java index e1f4d0dfc..2dd659c86 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/RepositoryConfigurationComparatorTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/RepositoryConfigurationComparatorTest.java @@ -19,14 +19,16 @@ package org.apache.archiva.configuration.functors; * under the License. */ -import java.util.Comparator; import org.apache.archiva.configuration.AbstractRepositoryConfiguration; import org.apache.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; -import static org.junit.Assert.*; import org.junit.Test; import org.junit.runner.RunWith; +import java.util.Comparator; + +import static org.junit.Assert.assertEquals; + /** * Test the repositry comparator. */ diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/ConsumerWantsFilePredicate.java b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/ConsumerWantsFilePredicate.java index 91f58acbc..b7404e5b9 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/ConsumerWantsFilePredicate.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/ConsumerWantsFilePredicate.java @@ -19,20 +19,20 @@ package org.apache.archiva.consumers.functors; * under the License. */ -import java.nio.file.Paths; -import java.util.List; - +import org.apache.archiva.common.utils.BaseFile; +import org.apache.archiva.consumers.RepositoryContentConsumer; import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.features.IndexCreationFeature; import org.apache.commons.collections.Predicate; import org.apache.commons.io.FilenameUtils; -import org.apache.archiva.common.utils.BaseFile; -import org.apache.archiva.consumers.RepositoryContentConsumer; import org.apache.commons.lang.StringUtils; import org.apache.tools.ant.types.selectors.SelectorUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.nio.file.Paths; +import java.util.List; + /** * ConsumerWantsFilePredicate */ diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java index 54e04dc9a..5c5f45f21 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java @@ -19,10 +19,6 @@ package $package; * under the License. */ -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.configuration.FileTypes; import org.apache.archiva.consumers.AbstractMonitoredConsumer; @@ -34,20 +30,21 @@ import org.apache.archiva.metadata.repository.RepositorySessionFactory; import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.redback.components.registry.Registry; import org.apache.archiva.redback.components.registry.RegistryListener; - +import org.apache.archiva.repository.LayoutException; +import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.RepositoryContentFactory; -import org.apache.archiva.repository.RepositoryException; -import org.apache.archiva.repository.LayoutException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; + import javax.annotation.PostConstruct; import javax.inject.Inject; import javax.inject.Named; - -import org.springframework.context.annotation.Scope; -import org.springframework.stereotype.Service; -import org.apache.archiva.repository.ManagedRepository; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; /** * SimpleArtifactConsumer diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/RepositoryProviderMock.java b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/RepositoryProviderMock.java index ec13f21f0..f871fbb89 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/RepositoryProviderMock.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/RepositoryProviderMock.java @@ -39,7 +39,6 @@ import org.apache.archiva.repository.features.RemoteIndexFeature; import org.apache.archiva.repository.features.StagingRepositoryFeature; import org.springframework.stereotype.Service; - import java.net.URI; import java.nio.file.Paths; import java.time.Duration; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java index 0b134ba05..54ec5d0a3 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java @@ -20,14 +20,12 @@ package $package; */ import org.apache.archiva.admin.model.RepositoryAdminException; -import org.apache.archiva.repository.ManagedRepository; -import org.apache.archiva.repository.BasicManagedRepository; -import org.apache.archiva.repository.RepositoryRegistry; -import org.apache.archiva.repository.RepositoryException; import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.metadata.repository.MetadataRepository; -import org.apache.archiva.metadata.repository.RepositorySession; import org.apache.archiva.metadata.repository.RepositorySessionFactory; +import org.apache.archiva.repository.BasicManagedRepository; +import org.apache.archiva.repository.RepositoryException; +import org.apache.archiva.repository.RepositoryRegistry; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml index 56894fc5f..908c9b5ee 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml @@ -20,12 +20,12 @@ --> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java index 8f537b56b..6af89a33a 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java @@ -28,12 +28,12 @@ import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.ProjectReference; import org.apache.archiva.model.VersionedReference; import org.apache.archiva.repository.ContentNotFoundException; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.RepositoryException; import org.apache.archiva.repository.RepositoryNotFoundException; import org.apache.archiva.repository.RepositoryRegistry; -import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.metadata.MetadataTools; import org.apache.archiva.repository.metadata.RepositoryMetadataException; import org.slf4j.Logger; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurge.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurge.java index 265c8e2e7..ce6dc2803 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurge.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurge.java @@ -28,12 +28,12 @@ import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.ProjectReference; import org.apache.archiva.model.VersionedReference; import org.apache.archiva.repository.ContentNotFoundException; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.ReleaseScheme; import org.apache.archiva.repository.RepositoryException; import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.repository.events.RepositoryListener; -import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.metadata.MetadataTools; import org.apache.archiva.repository.metadata.RepositoryMetadataException; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java index 2952f7fbc..6c6607d2d 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java @@ -25,9 +25,9 @@ import org.apache.archiva.metadata.repository.RepositorySession; import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.VersionedReference; import org.apache.archiva.repository.ContentNotFoundException; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.events.RepositoryListener; -import org.apache.archiva.repository.LayoutException; import org.apache.commons.lang.time.DateUtils; import java.io.IOException; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java index d869666f7..c065a2f81 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java @@ -33,8 +33,6 @@ import org.apache.archiva.redback.components.registry.RegistryListener; import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.RepositoryContentFactory; -import org.apache.archiva.repository.RepositoryException; -import org.apache.archiva.repository.RepositoryNotFoundException; import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.repository.events.RepositoryListener; import org.apache.archiva.repository.features.ArtifactCleanupFeature; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java index bcecc8a8e..a364dc3a1 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java @@ -25,9 +25,9 @@ import org.apache.archiva.metadata.repository.RepositorySession; import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.VersionedReference; import org.apache.archiva.repository.ContentNotFoundException; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.events.RepositoryListener; -import org.apache.archiva.repository.LayoutException; import java.nio.file.Files; import java.nio.file.Path; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java index 11e0ffeb4..65047eeb0 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java @@ -19,11 +19,6 @@ package org.apache.archiva.consumers.core.repository; * under the License. */ -import org.apache.archiva.admin.model.RepositoryCommonValidator; -import org.apache.archiva.admin.model.beans.ManagedRepository; -import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; -import org.apache.archiva.admin.repository.DefaultRepositoryCommonValidator; -import org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin; import org.apache.archiva.common.utils.BaseFile; import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.configuration.FileType; @@ -38,7 +33,6 @@ import org.apache.archiva.repository.features.ArtifactCleanupFeature; import org.custommonkey.xmlunit.XMLAssert; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.slf4j.Logger; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurgeTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurgeTest.java index 13d6b6857..d80a0b693 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurgeTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurgeTest.java @@ -19,7 +19,6 @@ package org.apache.archiva.consumers.core.repository; * under the License. */ -import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.repository.events.RepositoryListener; import org.apache.archiva.repository.features.ArtifactCleanupFeature; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java index 4af39c33a..af3597e21 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/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-consumers/archiva-core-consumers/src/test/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/META-INF/spring-context.xml index baa381e48..810411f3d 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/META-INF/spring-context.xml @@ -20,11 +20,8 @@ --> + http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" default-lazy-init="true"> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/archiva/consumers/lucene/test/TestRBACManager.java b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/archiva/consumers/lucene/test/TestRBACManager.java index 6c974c397..7c237e2c0 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/archiva/consumers/lucene/test/TestRBACManager.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/archiva/consumers/lucene/test/TestRBACManager.java @@ -21,13 +21,13 @@ package org.apache.archiva.consumers.lucene.test; import org.apache.archiva.redback.rbac.Operation; import org.apache.archiva.redback.rbac.Permission; import org.apache.archiva.redback.rbac.RBACManager; +import org.apache.archiva.redback.rbac.RBACManagerListener; import org.apache.archiva.redback.rbac.RbacManagerException; import org.apache.archiva.redback.rbac.RbacObjectInvalidException; import org.apache.archiva.redback.rbac.RbacObjectNotFoundException; import org.apache.archiva.redback.rbac.Resource; import org.apache.archiva.redback.rbac.Role; import org.apache.archiva.redback.rbac.UserAssignment; -import org.apache.archiva.redback.rbac.RBACManagerListener; import org.springframework.stereotype.Service; import java.util.Collection; diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java index cc1af39e9..8431dcb41 100644 --- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java +++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java @@ -19,7 +19,6 @@ package org.apache.archiva.converter.legacy; * under the License. */ -import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.common.plexusbridge.PlexusSisuBridge; import org.apache.archiva.common.plexusbridge.PlexusSisuBridgeException; import org.apache.archiva.common.utils.PathUtil; @@ -41,7 +40,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.Locale; /** * DefaultLegacyRepositoryConverter diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java index 04653a5ac..13a79dd64 100644 --- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java +++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java @@ -29,10 +29,10 @@ import org.apache.archiva.converter.artifact.ArtifactConversionException; import org.apache.archiva.converter.artifact.ArtifactConverter; import org.apache.archiva.metadata.repository.storage.maven2.ArtifactMappingProvider; import org.apache.archiva.model.ArtifactReference; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.content.maven2.ManagedDefaultRepositoryContent; -import org.apache.archiva.repository.LayoutException; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/archiva/converter/RepositoryConverterTest.java b/archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/archiva/converter/RepositoryConverterTest.java index 8abe89d4b..fe82cd8a4 100644 --- a/archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/archiva/converter/RepositoryConverterTest.java +++ b/archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/archiva/converter/RepositoryConverterTest.java @@ -21,9 +21,10 @@ package org.apache.archiva.converter; import junit.framework.TestCase; import org.apache.archiva.common.plexusbridge.PlexusSisuBridge; +import org.apache.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.archiva.converter.legacy.LegacyRepositoryConverter; +import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.commons.io.FileUtils; -import org.apache.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; @@ -40,7 +41,6 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; -import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; /** * Test the repository converter. diff --git a/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTimeoutTest.java b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTimeoutTest.java index 6ed069a88..4eecb2b6d 100644 --- a/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTimeoutTest.java +++ b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTimeoutTest.java @@ -30,7 +30,11 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import javax.inject.Inject; import javax.inject.Named; import java.io.IOException; -import java.nio.file.*; +import java.nio.file.FileSystemException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; /** * @author Olivier Lamy diff --git a/archiva-modules/archiva-base/archiva-maven2-indexer/src/main/java/org/apache/archiva/indexer/maven/MavenIndexManager.java b/archiva-modules/archiva-base/archiva-maven2-indexer/src/main/java/org/apache/archiva/indexer/maven/MavenIndexManager.java index f80e39baf..cc7cef0eb 100644 --- a/archiva-modules/archiva-base/archiva-maven2-indexer/src/main/java/org/apache/archiva/indexer/maven/MavenIndexManager.java +++ b/archiva-modules/archiva-base/archiva-maven2-indexer/src/main/java/org/apache/archiva/indexer/maven/MavenIndexManager.java @@ -33,12 +33,24 @@ import org.apache.archiva.indexer.UnsupportedBaseContextException; import org.apache.archiva.proxy.common.WagonFactory; import org.apache.archiva.proxy.common.WagonFactoryException; import org.apache.archiva.proxy.common.WagonFactoryRequest; -import org.apache.archiva.repository.*; -import org.apache.archiva.repository.features.IndexCreationEvent; +import org.apache.archiva.repository.EditableRepository; +import org.apache.archiva.repository.ManagedRepository; +import org.apache.archiva.repository.PasswordCredentials; +import org.apache.archiva.repository.RemoteRepository; +import org.apache.archiva.repository.Repository; +import org.apache.archiva.repository.RepositoryType; +import org.apache.archiva.repository.UnsupportedRepositoryTypeException; import org.apache.archiva.repository.features.IndexCreationFeature; import org.apache.archiva.repository.features.RemoteIndexFeature; import org.apache.commons.lang.StringUtils; -import org.apache.maven.index.*; +import org.apache.maven.index.ArtifactContext; +import org.apache.maven.index.ArtifactContextProducer; +import org.apache.maven.index.DefaultScannerListener; +import org.apache.maven.index.Indexer; +import org.apache.maven.index.IndexerEngine; +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.apache.maven.index.packer.IndexPacker; @@ -65,7 +77,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; -import javax.annotation.PostConstruct; import javax.inject.Inject; import java.io.FileNotFoundException; import java.io.IOException; diff --git a/archiva-modules/archiva-base/archiva-maven2-indexer/src/main/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearch.java b/archiva-modules/archiva-base/archiva-maven2-indexer/src/main/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearch.java index e18e10115..d2123c080 100644 --- a/archiva-modules/archiva-base/archiva-maven2-indexer/src/main/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearch.java +++ b/archiva-modules/archiva-base/archiva-maven2-indexer/src/main/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearch.java @@ -25,7 +25,13 @@ import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorAdmin; import org.apache.archiva.common.plexusbridge.PlexusSisuBridgeException; import org.apache.archiva.indexer.UnsupportedBaseContextException; import org.apache.archiva.indexer.search.ArtifactInfoFilter; -import org.apache.archiva.indexer.search.*; +import org.apache.archiva.indexer.search.NoClassifierArtifactInfoFilter; +import org.apache.archiva.indexer.search.RepositorySearch; +import org.apache.archiva.indexer.search.RepositorySearchException; +import org.apache.archiva.indexer.search.SearchFields; +import org.apache.archiva.indexer.search.SearchResultHit; +import org.apache.archiva.indexer.search.SearchResultLimits; +import org.apache.archiva.indexer.search.SearchResults; import org.apache.archiva.indexer.util.SearchUtil; import org.apache.archiva.model.ArchivaArtifactModel; import org.apache.archiva.repository.RemoteRepository; @@ -33,7 +39,14 @@ import org.apache.archiva.repository.Repository; import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.repository.RepositoryType; import org.apache.commons.lang.StringUtils; -import org.apache.maven.index.*; +import org.apache.maven.index.ArtifactInfo; +import org.apache.maven.index.FlatSearchRequest; +import org.apache.maven.index.FlatSearchResponse; +import org.apache.maven.index.Indexer; +import org.apache.maven.index.MAVEN; +import org.apache.maven.index.OSGI; +import org.apache.maven.index.QueryCreator; +import org.apache.maven.index.SearchType; import org.apache.maven.index.context.IndexingContext; import org.apache.maven.index.expr.SearchExpression; import org.apache.maven.index.expr.SearchTyped; @@ -42,14 +55,19 @@ import org.apache.maven.index.expr.UserInputSearchExpression; import org.apache.maven.index_shaded.lucene.search.BooleanClause; import org.apache.maven.index_shaded.lucene.search.BooleanClause.Occur; import org.apache.maven.index_shaded.lucene.search.BooleanQuery; -import org.apache.maven.index_shaded.lucene.search.Query; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import javax.inject.Inject; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; /** * RepositorySearch implementation which uses the Maven Indexer for searching. diff --git a/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/MavenIndexManagerTest.java b/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/MavenIndexManagerTest.java index 32e3b6f2f..71363dc33 100644 --- a/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/MavenIndexManagerTest.java +++ b/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/MavenIndexManagerTest.java @@ -42,7 +42,6 @@ import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import javax.inject.Inject; - import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; diff --git a/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/search/AbstractMavenRepositorySearch.java b/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/search/AbstractMavenRepositorySearch.java index e5171d206..de69ac56b 100644 --- a/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/search/AbstractMavenRepositorySearch.java +++ b/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/search/AbstractMavenRepositorySearch.java @@ -35,7 +35,16 @@ import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.repository.features.IndexCreationFeature; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.commons.lang.SystemUtils; -import org.apache.maven.index.*; +import org.apache.maven.index.ArtifactContext; +import org.apache.maven.index.ArtifactContextProducer; +import org.apache.maven.index.ArtifactScanningListener; +import org.apache.maven.index.DefaultScannerListener; +import org.apache.maven.index.Indexer; +import org.apache.maven.index.IndexerEngine; +import org.apache.maven.index.QueryCreator; +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; diff --git a/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearchPaginateTest.java b/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearchPaginateTest.java index d679edf27..3390cc47e 100644 --- a/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearchPaginateTest.java +++ b/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearchPaginateTest.java @@ -19,7 +19,6 @@ package org.apache.archiva.indexer.maven.search; */ import junit.framework.TestCase; -import org.apache.archiva.indexer.maven.search.MavenRepositorySearch; import org.apache.archiva.indexer.search.SearchResultHit; import org.apache.archiva.indexer.search.SearchResultLimits; import org.apache.archiva.indexer.search.SearchResults; @@ -29,13 +28,10 @@ import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; - -import java.util.Arrays; -import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import javax.inject.Inject; +import java.util.Arrays; /** * @author Olivier Lamy diff --git a/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearchTest.java b/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearchTest.java index eff589fce..cb43a1a08 100644 --- a/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearchTest.java +++ b/archiva-modules/archiva-base/archiva-maven2-indexer/src/test/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearchTest.java @@ -19,7 +19,11 @@ package org.apache.archiva.indexer.maven.search; * under the License. */ -import org.apache.archiva.indexer.search.*; +import org.apache.archiva.indexer.search.RepositorySearchException; +import org.apache.archiva.indexer.search.SearchFields; +import org.apache.archiva.indexer.search.SearchResultHit; +import org.apache.archiva.indexer.search.SearchResultLimits; +import org.apache.archiva.indexer.search.SearchResults; import org.apache.archiva.indexer.util.SearchUtil; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.maven.index_shaded.lucene.index.IndexUpgrader; diff --git a/archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockRepositorySessionFactory.java b/archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockRepositorySessionFactory.java index 3f17ceb23..0a8ba431a 100644 --- a/archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockRepositorySessionFactory.java +++ b/archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockRepositorySessionFactory.java @@ -19,7 +19,12 @@ package org.apache.archiva.mock; * under the License. */ -import org.apache.archiva.metadata.repository.*; +import org.apache.archiva.metadata.repository.AbstractMetadataRepository; +import org.apache.archiva.metadata.repository.AbstractRepositorySessionFactory; +import org.apache.archiva.metadata.repository.MetadataRepository; +import org.apache.archiva.metadata.repository.MetadataResolver; +import org.apache.archiva.metadata.repository.RepositorySession; +import org.apache.archiva.metadata.repository.RepositorySessionFactory; import org.springframework.stereotype.Service; /** diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaArtifact.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaArtifact.java index 75364a14d..e48477850 100644 --- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaArtifact.java +++ b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaArtifact.java @@ -19,8 +19,8 @@ package org.apache.archiva.model; * under the License. */ -import org.apache.commons.lang.StringUtils; import org.apache.archiva.common.utils.VersionUtil; +import org.apache.commons.lang.StringUtils; /** * ArchivaArtifact - Mutable artifact object. diff --git a/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/resources/META-INF/spring-context.xml index 9c12ec813..62f125414 100644 --- a/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/resources/META-INF/spring-context.xml @@ -21,14 +21,11 @@ + http://www.springframework.org/schema/context/spring-context.xsd" + default-lazy-init="true"> diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/AbstractRepository.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/AbstractRepository.java index fb50b8421..343eea062 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/AbstractRepository.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/AbstractRepository.java @@ -19,7 +19,6 @@ package org.apache.archiva.admin.model.beans; */ import java.io.Serializable; -import java.security.KeyStore; import java.util.Collections; import java.util.HashMap; import java.util.Locale; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/managed/ManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/managed/ManagedRepositoryAdmin.java index 08d68cf90..dfe0f7ee4 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/managed/ManagedRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/managed/ManagedRepositoryAdmin.java @@ -22,8 +22,6 @@ package org.apache.archiva.admin.model.managed; import org.apache.archiva.admin.model.AuditInformation; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.beans.ManagedRepository; -import org.apache.archiva.indexer.ArchivaIndexingContext; -import org.apache.maven.index.context.IndexingContext; import java.util.List; import java.util.Map; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java index 8041817a5..e0426a6eb 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java @@ -27,8 +27,8 @@ import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.configuration.Configuration; import org.apache.archiva.configuration.IndeterminateConfigurationException; import org.apache.archiva.metadata.model.facets.AuditEvent; -import org.apache.archiva.redback.users.User; import org.apache.archiva.redback.components.registry.Registry; +import org.apache.archiva.redback.users.User; import org.apache.archiva.repository.Repository; import org.apache.archiva.repository.events.AuditListener; import org.apache.archiva.repository.features.IndexCreationFeature; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/DefaultRepositoryCommonValidator.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/DefaultRepositoryCommonValidator.java index eb125922e..5053949d3 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/DefaultRepositoryCommonValidator.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/DefaultRepositoryCommonValidator.java @@ -25,10 +25,10 @@ import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.configuration.Configuration; +import org.apache.archiva.redback.components.registry.Registry; import org.apache.archiva.redback.components.scheduler.CronExpressionValidator; import org.apache.commons.lang.StringUtils; import org.apache.commons.validator.GenericValidator; -import org.apache.archiva.redback.components.registry.Registry; import org.springframework.stereotype.Service; import javax.inject.Inject; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java index 54d26fb5e..171dd4cca 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java @@ -32,7 +32,6 @@ import org.apache.archiva.configuration.UserInterfaceOptions; import org.apache.archiva.configuration.WebappConfiguration; import org.apache.archiva.metadata.model.facets.AuditEvent; import org.apache.commons.lang.StringUtils; -import org.apache.http.impl.conn.PoolingClientConnectionManager; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.maven.wagon.providers.http.HttpWagon; import org.springframework.stereotype.Service; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java index 7d87e048f..445d920b1 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java @@ -23,7 +23,11 @@ import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.admin.repository.AbstractRepositoryAdmin; -import org.apache.archiva.configuration.*; +import org.apache.archiva.configuration.Configuration; +import org.apache.archiva.configuration.IndeterminateConfigurationException; +import org.apache.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.archiva.configuration.ProxyConnectorConfiguration; +import org.apache.archiva.configuration.RepositoryGroupConfiguration; import org.apache.archiva.indexer.ArchivaIndexManager; import org.apache.archiva.indexer.IndexManagerFactory; import org.apache.archiva.indexer.IndexUpdateFailedException; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java index 94ace55b3..38d2b7ef8 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java @@ -21,10 +21,8 @@ package org.apache.archiva.admin.repository.proxyconnector; import org.apache.archiva.admin.model.AuditInformation; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.beans.ProxyConnector; -import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorAdmin; import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorOrderComparator; -import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin; import org.apache.archiva.admin.repository.AbstractRepositoryAdmin; import org.apache.archiva.configuration.Configuration; import org.apache.archiva.configuration.ProxyConnectorConfiguration; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/ArchivaIndexManagerMock.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/ArchivaIndexManagerMock.java index 16893d568..d2b8de8d0 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/ArchivaIndexManagerMock.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/ArchivaIndexManagerMock.java @@ -25,15 +25,32 @@ import org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin; import org.apache.archiva.common.utils.FileUtils; import org.apache.archiva.common.utils.PathUtil; import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.indexer.*; +import org.apache.archiva.indexer.ArchivaIndexManager; +import org.apache.archiva.indexer.ArchivaIndexingContext; +import org.apache.archiva.indexer.IndexCreationFailedException; +import org.apache.archiva.indexer.IndexUpdateFailedException; +import org.apache.archiva.indexer.UnsupportedBaseContextException; import org.apache.archiva.proxy.common.WagonFactory; import org.apache.archiva.proxy.common.WagonFactoryException; import org.apache.archiva.proxy.common.WagonFactoryRequest; -import org.apache.archiva.repository.*; +import org.apache.archiva.repository.EditableRepository; +import org.apache.archiva.repository.ManagedRepository; +import org.apache.archiva.repository.PasswordCredentials; +import org.apache.archiva.repository.RemoteRepository; +import org.apache.archiva.repository.Repository; +import org.apache.archiva.repository.RepositoryType; +import org.apache.archiva.repository.UnsupportedRepositoryTypeException; import org.apache.archiva.repository.features.IndexCreationFeature; import org.apache.archiva.repository.features.RemoteIndexFeature; import org.apache.commons.lang.StringUtils; -import org.apache.maven.index.*; +import org.apache.maven.index.ArtifactContext; +import org.apache.maven.index.ArtifactContextProducer; +import org.apache.maven.index.DefaultScannerListener; +import org.apache.maven.index.Indexer; +import org.apache.maven.index.IndexerEngine; +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.apache.maven.index.packer.IndexPacker; @@ -41,7 +58,11 @@ import org.apache.maven.index.packer.IndexPackingRequest; import org.apache.maven.index.updater.IndexUpdateRequest; import org.apache.maven.index.updater.ResourceFetcher; import org.apache.maven.index_shaded.lucene.index.IndexFormatTooOldException; -import org.apache.maven.wagon.*; +import org.apache.maven.wagon.ConnectionException; +import org.apache.maven.wagon.ResourceDoesNotExistException; +import org.apache.maven.wagon.StreamWagon; +import org.apache.maven.wagon.TransferFailedException; +import org.apache.maven.wagon.Wagon; import org.apache.maven.wagon.authentication.AuthenticationException; import org.apache.maven.wagon.authentication.AuthenticationInfo; import org.apache.maven.wagon.authorization.AuthorizationException; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java index 87c6f97c3..05b40c35e 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java @@ -32,7 +32,6 @@ import javax.inject.Inject; import java.io.IOException; import java.net.URISyntaxException; import java.net.URL; -import java.nio.file.CopyOption; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java index 5e64d23c9..7af9d019d 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java @@ -20,11 +20,9 @@ package org.apache.archiva.indexer; */ import org.apache.archiva.repository.Repository; -import org.apache.archiva.repository.RepositoryEventListener; import org.apache.archiva.repository.RepositoryType; import java.net.URI; -import java.nio.file.Path; import java.util.Collection; public interface ArchivaIndexManager { diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexingContext.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexingContext.java index 95555a3c3..795354598 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexingContext.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexingContext.java @@ -20,11 +20,9 @@ package org.apache.archiva.indexer; */ import org.apache.archiva.repository.Repository; -import org.apache.archiva.repository.RepositoryType; import java.io.IOException; import java.net.URI; -import java.time.LocalDateTime; import java.time.ZonedDateTime; import java.util.Set; diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/GenericIndexManager.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/GenericIndexManager.java index 8a059f894..9ec3f9081 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/GenericIndexManager.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/GenericIndexManager.java @@ -21,7 +21,6 @@ package org.apache.archiva.indexer; import org.apache.archiva.common.utils.PathUtil; import org.apache.archiva.repository.Repository; -import org.apache.archiva.repository.RepositoryEvent; import org.apache.archiva.repository.RepositoryType; import org.apache.archiva.repository.features.IndexCreationFeature; import org.apache.commons.lang.StringUtils; diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/search/ArtifactInfoFilter.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/search/ArtifactInfoFilter.java index 39c32daf6..7cce7c3d1 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/search/ArtifactInfoFilter.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/search/ArtifactInfoFilter.java @@ -19,7 +19,6 @@ package org.apache.archiva.indexer.search; */ import org.apache.archiva.model.ArchivaArtifactModel; -import org.apache.archiva.model.ArtifactReference; import java.util.Map; diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepository.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepository.java index 550a9ce86..1dea02bb1 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepository.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepository.java @@ -20,8 +20,6 @@ package org.apache.archiva.repository; */ -import org.apache.archiva.indexer.ArchivaIndexingContext; - import java.util.Set; /** diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/Repository.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/Repository.java index 78a330a96..f80f94b0d 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/Repository.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/Repository.java @@ -22,10 +22,8 @@ package org.apache.archiva.repository; import org.apache.archiva.indexer.ArchivaIndexingContext; import org.apache.archiva.repository.features.RepositoryFeature; -import java.io.IOException; import java.net.URI; import java.nio.file.Path; -import java.util.List; import java.util.Locale; import java.util.Set; diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContentFactory.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContentFactory.java index 65d54e605..3936dc321 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContentFactory.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContentFactory.java @@ -21,8 +21,6 @@ package org.apache.archiva.repository; import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.configuration.ConfigurationNames; -import org.apache.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.archiva.configuration.RemoteRepositoryConfiguration; import org.apache.archiva.redback.components.registry.Registry; import org.apache.archiva.redback.components.registry.RegistryListener; import org.springframework.context.ApplicationContext; diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/features/IndexCreationFeature.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/features/IndexCreationFeature.java index 6289cc651..5e68fdd5d 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/features/IndexCreationFeature.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/features/IndexCreationFeature.java @@ -27,9 +27,6 @@ import org.apache.commons.lang.StringUtils; import java.net.URI; import java.net.URISyntaxException; import java.nio.file.Path; -import java.util.ArrayList; -import java.util.EventListener; -import java.util.List; /** * diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-repository-api/src/main/resources/META-INF/spring-context.xml index c70b579f5..56f378cee 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/resources/META-INF/spring-context.xml @@ -22,13 +22,10 @@ diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRemoteRepository.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRemoteRepository.java index 26a3fb50a..5c3aebaae 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRemoteRepository.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRemoteRepository.java @@ -20,10 +20,7 @@ package org.apache.archiva.repository; */ -import org.apache.commons.lang.StringUtils; - import java.nio.file.Path; -import java.nio.file.Paths; import java.time.Duration; import java.util.Collections; import java.util.HashMap; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRepository.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRepository.java index d63007a52..448b1ba13 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRepository.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRepository.java @@ -34,8 +34,14 @@ import org.slf4j.LoggerFactory; import java.io.IOException; import java.net.URI; import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; /** * Implementation of a repository with the necessary fields for a bare repository. diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/BasicManagedRepository.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/BasicManagedRepository.java index 6aa2fe927..d424862a9 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/BasicManagedRepository.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/BasicManagedRepository.java @@ -19,14 +19,12 @@ package org.apache.archiva.repository; * under the License. */ -import org.apache.archiva.indexer.ArchivaIndexingContext; import org.apache.archiva.repository.features.ArtifactCleanupFeature; import org.apache.archiva.repository.features.IndexCreationFeature; import org.apache.archiva.repository.features.StagingRepositoryFeature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; import java.nio.file.Path; import java.util.Locale; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/BasicRemoteRepository.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/BasicRemoteRepository.java index 70c38a5a0..81c7b3925 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/BasicRemoteRepository.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/BasicRemoteRepository.java @@ -19,13 +19,11 @@ package org.apache.archiva.repository; * under the License. */ -import org.apache.archiva.indexer.ArchivaIndexingContext; import org.apache.archiva.repository.features.IndexCreationFeature; import org.apache.archiva.repository.features.RemoteIndexFeature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; import java.nio.file.Path; import java.util.Locale; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java index 8843ce623..f4e7ed66b 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java @@ -19,8 +19,19 @@ package org.apache.archiva.repository; * under the License. */ -import org.apache.archiva.configuration.*; -import org.apache.archiva.indexer.*; +import org.apache.archiva.configuration.ArchivaConfiguration; +import org.apache.archiva.configuration.Configuration; +import org.apache.archiva.configuration.ConfigurationEvent; +import org.apache.archiva.configuration.ConfigurationListener; +import org.apache.archiva.configuration.IndeterminateConfigurationException; +import org.apache.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.archiva.configuration.ProxyConnectorConfiguration; +import org.apache.archiva.configuration.RemoteRepositoryConfiguration; +import org.apache.archiva.indexer.ArchivaIndexManager; +import org.apache.archiva.indexer.ArchivaIndexingContext; +import org.apache.archiva.indexer.IndexCreationFailedException; +import org.apache.archiva.indexer.IndexManagerFactory; +import org.apache.archiva.indexer.IndexUpdateFailedException; import org.apache.archiva.redback.components.registry.RegistryException; import org.apache.archiva.repository.features.IndexCreationEvent; import org.apache.archiva.repository.features.IndexCreationFeature; @@ -34,7 +45,13 @@ import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.inject.Inject; import javax.inject.Named; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.stream.Collectors; import java.util.stream.Stream; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java index 062169273..af5b4ea1a 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java @@ -30,13 +30,18 @@ import org.apache.archiva.configuration.ConfigurationNames; import org.apache.archiva.configuration.FileTypes; 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.ArtifactReference; +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.redback.components.registry.Registry; import org.apache.archiva.redback.components.registry.RegistryListener; import org.apache.archiva.repository.ContentNotFoundException; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.RemoteRepositoryContent; -import org.apache.archiva.repository.LayoutException; import org.apache.archiva.xml.XMLException; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils; @@ -55,7 +60,18 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.regex.Matcher; import java.util.stream.Stream; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/RepositoryMetadataMerge.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/RepositoryMetadataMerge.java index 7f0636033..d1c70ce41 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/RepositoryMetadataMerge.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/RepositoryMetadataMerge.java @@ -19,14 +19,14 @@ package org.apache.archiva.repository.metadata; * under the License. */ -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.lang.StringUtils; import org.apache.archiva.model.ArchivaModelCloner; import org.apache.archiva.model.ArchivaRepositoryMetadata; import org.apache.archiva.model.Plugin; import org.apache.archiva.model.SnapshotVersion; +import org.apache.commons.lang.StringUtils; + +import java.util.ArrayList; +import java.util.List; /** * RepositoryMetadataMerge diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java index 72ef7e37d..efcdfed15 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java @@ -24,10 +24,10 @@ import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.ProjectReference; import org.apache.archiva.model.VersionedReference; import org.apache.archiva.repository.ContentNotFoundException; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.RepositoryException; -import org.apache.archiva.repository.LayoutException; import org.springframework.stereotype.Service; import java.nio.file.Path; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java index ecce0cf10..c797b5686 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java @@ -21,9 +21,9 @@ package org.apache.archiva.repository.mock; import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.RepositoryURL; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.RemoteRepository; import org.apache.archiva.repository.RemoteRepositoryContent; -import org.apache.archiva.repository.LayoutException; import org.springframework.stereotype.Service; /** diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryContentProviderMock.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryContentProviderMock.java index 3693e0725..65fca5ab3 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryContentProviderMock.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryContentProviderMock.java @@ -19,7 +19,15 @@ package org.apache.archiva.repository.mock; * under the License. */ -import org.apache.archiva.repository.*; +import org.apache.archiva.repository.ManagedRepository; +import org.apache.archiva.repository.ManagedRepositoryContent; +import org.apache.archiva.repository.RemoteRepository; +import org.apache.archiva.repository.RemoteRepositoryContent; +import org.apache.archiva.repository.Repository; +import org.apache.archiva.repository.RepositoryContent; +import org.apache.archiva.repository.RepositoryContentProvider; +import org.apache.archiva.repository.RepositoryException; +import org.apache.archiva.repository.RepositoryType; import org.springframework.stereotype.Service; import java.util.HashSet; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java index 82e10477b..553471241 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/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-repository-layer/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/spring-context.xml index 2b7748f3c..4c58e4d8c 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/spring-context.xml @@ -21,13 +21,10 @@ diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java index fff20693a..7e080158d 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java @@ -36,7 +36,11 @@ import java.nio.file.FileVisitOption; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.*; +import java.util.ArrayList; +import java.util.EnumSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; /** * DefaultRepositoryScanner diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java index c3159c733..c03c5d111 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java @@ -42,8 +42,11 @@ import org.springframework.stereotype.Service; import javax.inject.Inject; import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * RepositoryContentConsumerUtil diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScannerInstance.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScannerInstance.java index 5928823ea..6d2616696 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScannerInstance.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScannerInstance.java @@ -36,9 +36,19 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; -import java.nio.file.*; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.FileVisitResult; +import java.nio.file.FileVisitor; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.PathMatcher; import java.nio.file.attribute.BasicFileAttributes; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java index 85375bc00..a6e5f7739 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java @@ -19,9 +19,9 @@ package org.apache.archiva.repository.scanner.functors; * under the License. */ -import org.apache.commons.collections.Closure; import org.apache.archiva.common.utils.BaseFile; import org.apache.archiva.consumers.RepositoryContentConsumer; +import org.apache.commons.collections.Closure; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java index 4ae19dc14..b1e164bc6 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java @@ -19,10 +19,10 @@ package org.apache.archiva.repository.scanner.functors; * under the License. */ -import org.apache.archiva.repository.ManagedRepository; -import org.apache.commons.collections.Closure; import org.apache.archiva.consumers.ConsumerException; import org.apache.archiva.consumers.RepositoryContentConsumer; +import org.apache.archiva.repository.ManagedRepository; +import org.apache.commons.collections.Closure; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java index c4789be31..d14af6917 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java @@ -19,9 +19,9 @@ package org.apache.archiva.repository.scanner.functors; * under the License. */ +import org.apache.archiva.consumers.RepositoryContentConsumer; import org.apache.archiva.repository.ManagedRepository; import org.apache.commons.collections.Closure; -import org.apache.archiva.consumers.RepositoryContentConsumer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java index 81f9440a9..b379dde09 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java @@ -25,8 +25,6 @@ import org.apache.archiva.consumers.InvalidRepositoryContentConsumer; import org.apache.archiva.repository.ManagedRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.context.annotation.Scope; -import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.Date; diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml index 87120cc64..d0b44b201 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml @@ -20,11 +20,8 @@ --> diff --git a/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java b/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java index c6adde4ed..2df01e668 100644 --- a/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java +++ b/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java @@ -28,7 +28,12 @@ import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; import java.util.stream.Stream; /** diff --git a/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/CreateFileEvent.java b/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/CreateFileEvent.java index dcaf68b43..6cb6126b7 100644 --- a/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/CreateFileEvent.java +++ b/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/CreateFileEvent.java @@ -19,13 +19,13 @@ package org.apache.archiva.transaction; * under the License. */ +import org.codehaus.plexus.digest.Digester; + import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; -import org.codehaus.plexus.digest.Digester; - /** * Event for creating a file from a string content. * diff --git a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/archiva/transaction/AbstractFileEventTest.java b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/archiva/transaction/AbstractFileEventTest.java index 690ce7f6d..80b9ca924 100644 --- a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/archiva/transaction/AbstractFileEventTest.java +++ b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/archiva/transaction/AbstractFileEventTest.java @@ -20,10 +20,13 @@ package org.apache.archiva.transaction; */ import junit.framework.TestCase; +import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; import org.apache.commons.io.FileUtils; import org.codehaus.plexus.digest.Digester; import org.codehaus.plexus.digest.Md5Digester; import org.codehaus.plexus.digest.Sha1Digester; +import org.junit.Before; +import org.junit.runner.RunWith; import java.io.IOException; import java.nio.charset.Charset; @@ -32,9 +35,6 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; import java.util.List; -import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; -import org.junit.Before; -import org.junit.runner.RunWith; /** * diff --git a/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/XMLReader.java b/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/XMLReader.java index 5d3f1cd0e..f938e5fcb 100644 --- a/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/XMLReader.java +++ b/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/XMLReader.java @@ -20,7 +20,14 @@ package org.apache.archiva.xml; */ import org.apache.commons.lang.StringUtils; -import org.dom4j.*; +import org.dom4j.Attribute; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.Namespace; +import org.dom4j.Node; +import org.dom4j.QName; +import org.dom4j.XPath; import org.dom4j.io.SAXReader; import java.io.IOException; @@ -31,7 +38,11 @@ import java.net.URL; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; /** * XMLReader - a set of common xml utility methods for reading content out of an xml file. diff --git a/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLReaderTest.java b/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLReaderTest.java index fa99a4afa..3dc13825d 100644 --- a/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLReaderTest.java +++ b/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLReaderTest.java @@ -19,13 +19,13 @@ package org.apache.archiva.xml; * under the License. */ +import org.dom4j.Element; +import org.junit.Test; + import java.nio.file.Path; import java.util.ArrayList; import java.util.List; -import org.dom4j.Element; -import org.junit.Test; - /** * XMLReaderTest * diff --git a/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLWriterTest.java b/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLWriterTest.java index 4791311da..9ff014b6f 100644 --- a/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLWriterTest.java +++ b/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLWriterTest.java @@ -22,9 +22,9 @@ package org.apache.archiva.xml; import org.dom4j.Document; import org.dom4j.DocumentHelper; import org.dom4j.Element; +import org.junit.Test; import java.io.StringWriter; -import org.junit.Test; /** * XMLWriterTest 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 c3178eb11..c3f64b735 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,6 @@ package org.apache.archiva.scheduler.repository; * under the License. */ -import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.metadata.repository.MetadataRepository; @@ -28,6 +27,10 @@ import org.apache.archiva.metadata.repository.RepositorySession; import org.apache.archiva.metadata.repository.RepositorySessionFactory; import org.apache.archiva.metadata.repository.stats.model.RepositoryStatistics; import org.apache.archiva.metadata.repository.stats.model.RepositoryStatisticsManager; +import org.apache.archiva.redback.components.taskqueue.Task; +import org.apache.archiva.redback.components.taskqueue.execution.TaskExecutionException; +import org.apache.archiva.redback.components.taskqueue.execution.TaskExecutor; +import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.repository.scanner.RepositoryContentConsumers; import org.apache.archiva.repository.scanner.RepositoryScanStatistics; @@ -36,9 +39,6 @@ import org.apache.archiva.repository.scanner.RepositoryScannerException; import org.apache.archiva.scheduler.repository.model.RepositoryTask; import org.apache.commons.lang.StringUtils; import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; -import org.apache.archiva.redback.components.taskqueue.Task; -import org.apache.archiva.redback.components.taskqueue.execution.TaskExecutionException; -import org.apache.archiva.redback.components.taskqueue.execution.TaskExecutor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/resources/META-INF/spring-context.xml index bca32acb6..d23af0759 100755 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/resources/META-INF/spring-context.xml @@ -21,12 +21,10 @@ diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockManagedRepositoryAdmin.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockManagedRepositoryAdmin.java index 3f28dddf7..5ff2d9f6a 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockManagedRepositoryAdmin.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockManagedRepositoryAdmin.java @@ -22,10 +22,9 @@ import org.apache.archiva.admin.model.AuditInformation; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; -import org.apache.commons.lang.StringUtils; import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.maven.index.context.IndexingContext; +import org.apache.commons.lang.StringUtils; import java.util.ArrayList; import java.util.List; diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java index 519ac4877..373a51500 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java @@ -23,10 +23,10 @@ import org.apache.archiva.consumers.AbstractMonitoredConsumer; import org.apache.archiva.consumers.ConsumerException; import org.apache.archiva.consumers.KnownRepositoryContentConsumer; import org.apache.archiva.model.ArtifactReference; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.RepositoryContentFactory; -import org.apache.archiva.repository.LayoutException; import org.springframework.stereotype.Service; import javax.inject.Inject; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java index c672607d7..cdb99eb38 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java @@ -23,9 +23,21 @@ import org.apache.archiva.maven2.model.Artifact; import org.apache.archiva.maven2.model.TreeEntry; import org.apache.archiva.metadata.model.ProjectVersionMetadata; import org.apache.archiva.redback.authorization.RedbackAuthorization; -import org.apache.archiva.rest.api.model.*; +import org.apache.archiva.rest.api.model.ArtifactContent; +import org.apache.archiva.rest.api.model.ArtifactContentEntry; +import org.apache.archiva.rest.api.model.BrowseResult; +import org.apache.archiva.rest.api.model.Entry; +import org.apache.archiva.rest.api.model.MetadataAddRequest; +import org.apache.archiva.rest.api.model.VersionsList; -import javax.ws.rs.*; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import java.util.List; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ManagedRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ManagedRepositoriesService.java index 4917e6bbe..c5dc6c825 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ManagedRepositoriesService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ManagedRepositoriesService.java @@ -20,9 +20,9 @@ package org.apache.archiva.rest.api.services; */ import org.apache.archiva.admin.model.beans.ManagedRepository; +import org.apache.archiva.redback.authorization.RedbackAuthorization; import org.apache.archiva.rest.api.model.ArchivaRepositoryStatistics; import org.apache.archiva.security.common.ArchivaRoleConstants; -import org.apache.archiva.redback.authorization.RedbackAuthorization; import javax.ws.rs.Consumes; import javax.ws.rs.GET; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/NetworkProxyService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/NetworkProxyService.java index 2a9236c79..b17c30089 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/NetworkProxyService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/NetworkProxyService.java @@ -19,8 +19,8 @@ package org.apache.archiva.rest.api.services; */ import org.apache.archiva.admin.model.beans.NetworkProxy; -import org.apache.archiva.security.common.ArchivaRoleConstants; import org.apache.archiva.redback.authorization.RedbackAuthorization; +import org.apache.archiva.security.common.ArchivaRoleConstants; import javax.ws.rs.Consumes; import javax.ws.rs.GET; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ProxyConnectorService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ProxyConnectorService.java index 2ad9f1be7..5f63fd051 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ProxyConnectorService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ProxyConnectorService.java @@ -19,9 +19,9 @@ package org.apache.archiva.rest.api.services; */ import org.apache.archiva.admin.model.beans.ProxyConnector; +import org.apache.archiva.redback.authorization.RedbackAuthorization; import org.apache.archiva.rest.api.model.PolicyInformation; import org.apache.archiva.security.common.ArchivaRoleConstants; -import org.apache.archiva.redback.authorization.RedbackAuthorization; import javax.ws.rs.Consumes; import javax.ws.rs.GET; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RedbackRuntimeConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RedbackRuntimeConfigurationService.java index 7cd0bea24..dff24307e 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RedbackRuntimeConfigurationService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RedbackRuntimeConfigurationService.java @@ -18,8 +18,8 @@ package org.apache.archiva.rest.api.services; * under the License. */ -import org.apache.archiva.admin.model.beans.RedbackRuntimeConfiguration; import org.apache.archiva.admin.model.beans.LdapConfiguration; +import org.apache.archiva.admin.model.beans.RedbackRuntimeConfiguration; import org.apache.archiva.redback.authorization.RedbackAuthorization; import org.apache.archiva.rest.api.model.RBACManagerImplementationInformation; import org.apache.archiva.rest.api.model.RedbackImplementationsInformations; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RemoteRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RemoteRepositoriesService.java index 19cbf5d69..97aa4b9d2 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RemoteRepositoriesService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RemoteRepositoriesService.java @@ -20,8 +20,8 @@ package org.apache.archiva.rest.api.services; */ import org.apache.archiva.admin.model.beans.RemoteRepository; -import org.apache.archiva.security.common.ArchivaRoleConstants; import org.apache.archiva.redback.authorization.RedbackAuthorization; +import org.apache.archiva.security.common.ArchivaRoleConstants; import javax.ws.rs.Consumes; import javax.ws.rs.GET; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RepositoriesService.java index 249ef0c6a..9d48a0011 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RepositoriesService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RepositoriesService.java @@ -35,7 +35,6 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; -import java.util.List; /** * @author Olivier Lamy diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RepositoryGroupService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RepositoryGroupService.java index f6471d4b2..f031d1c90 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RepositoryGroupService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RepositoryGroupService.java @@ -19,8 +19,8 @@ package org.apache.archiva.rest.api.services; */ import org.apache.archiva.admin.model.beans.RepositoryGroup; -import org.apache.archiva.security.common.ArchivaRoleConstants; import org.apache.archiva.redback.authorization.RedbackAuthorization; +import org.apache.archiva.security.common.ArchivaRoleConstants; import javax.ws.rs.Consumes; import javax.ws.rs.GET; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java index f75c69e2c..1b3fa08b5 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java @@ -27,7 +27,11 @@ import org.apache.archiva.rest.api.model.GroupIdList; import org.apache.archiva.rest.api.model.SearchRequest; import org.apache.archiva.rest.api.model.StringList; -import javax.ws.rs.*; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import java.util.List; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SystemStatusService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SystemStatusService.java index 8b0eaa036..ae1b02bbb 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SystemStatusService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SystemStatusService.java @@ -18,11 +18,11 @@ package org.apache.archiva.rest.api.services; * under the License. */ +import org.apache.archiva.redback.authorization.RedbackAuthorization; import org.apache.archiva.rest.api.model.CacheEntry; import org.apache.archiva.rest.api.model.QueueEntry; import org.apache.archiva.rest.api.model.RepositoryScannerStatistics; import org.apache.archiva.security.common.ArchivaRoleConstants; -import org.apache.archiva.redback.authorization.RedbackAuthorization; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java index 4dacc86ff..e0317dee1 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java @@ -65,7 +65,12 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * abstract class with common utilities methods diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java index 736fb8c75..ff1d3fd18 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java @@ -20,7 +20,11 @@ package org.apache.archiva.rest.services; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.admin.ArchivaAdministration; -import org.apache.archiva.admin.model.beans.*; +import org.apache.archiva.admin.model.beans.FileType; +import org.apache.archiva.admin.model.beans.LegacyArtifactPath; +import org.apache.archiva.admin.model.beans.NetworkConfiguration; +import org.apache.archiva.admin.model.beans.OrganisationInformation; +import org.apache.archiva.admin.model.beans.UiConfiguration; import org.apache.archiva.repository.scanner.RepositoryContentConsumers; import org.apache.archiva.rest.api.model.AdminRepositoryConsumer; import org.apache.archiva.rest.api.services.ArchivaAdministrationService; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java index 2a87462aa..55cfbf5ec 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java @@ -31,7 +31,11 @@ import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.model.MetadataFacet; import org.apache.archiva.metadata.model.ProjectVersionMetadata; import org.apache.archiva.metadata.model.ProjectVersionReference; -import org.apache.archiva.metadata.repository.*; +import org.apache.archiva.metadata.repository.MetadataRepository; +import org.apache.archiva.metadata.repository.MetadataRepositoryException; +import org.apache.archiva.metadata.repository.MetadataResolutionException; +import org.apache.archiva.metadata.repository.MetadataResolver; +import org.apache.archiva.metadata.repository.RepositorySession; import org.apache.archiva.metadata.repository.storage.maven2.ArtifactMetadataVersionComparator; import org.apache.archiva.metadata.repository.storage.maven2.MavenProjectFacet; import org.apache.archiva.model.ArchivaArtifact; @@ -39,12 +43,16 @@ import org.apache.archiva.model.ArchivaRepositoryMetadata; import org.apache.archiva.proxy.model.RepositoryProxyConnectors; import org.apache.archiva.redback.components.cache.Cache; import org.apache.archiva.repository.ManagedRepositoryContent; -import org.apache.archiva.repository.RepositoryContentFactory; 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.rest.api.model.*; +import org.apache.archiva.rest.api.model.ArtifactContent; +import org.apache.archiva.rest.api.model.ArtifactContentEntry; +import org.apache.archiva.rest.api.model.BrowseResult; +import org.apache.archiva.rest.api.model.BrowseResultEntry; +import org.apache.archiva.rest.api.model.Entry; +import org.apache.archiva.rest.api.model.MetadataAddRequest; +import org.apache.archiva.rest.api.model.VersionsList; import org.apache.archiva.rest.api.services.ArchivaRestServiceException; import org.apache.archiva.rest.api.services.BrowseService; import org.apache.archiva.rest.services.utils.ArtifactContentEntryComparator; @@ -63,7 +71,15 @@ import java.io.InputStream; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.zip.ZipEntry; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java index 81d3fa62e..4b3db121e 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java @@ -46,7 +46,12 @@ import org.springframework.stereotype.Service; import javax.inject.Inject; import javax.inject.Named; import javax.naming.InvalidNameException; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Properties; /** * @author Olivier Lamy diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java index eaf37c374..d3da9bb62 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java @@ -33,7 +33,11 @@ import org.apache.archiva.maven2.model.Artifact; import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.model.facets.AuditEvent; import org.apache.archiva.metadata.model.maven2.MavenArtifactFacet; -import org.apache.archiva.metadata.repository.*; +import org.apache.archiva.metadata.repository.MetadataRepository; +import org.apache.archiva.metadata.repository.MetadataRepositoryException; +import org.apache.archiva.metadata.repository.MetadataResolutionException; +import org.apache.archiva.metadata.repository.RepositorySession; +import org.apache.archiva.metadata.repository.RepositorySessionFactory; import org.apache.archiva.model.ArchivaRepositoryMetadata; import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.VersionedReference; @@ -47,8 +51,11 @@ import org.apache.archiva.redback.system.SecuritySystem; import org.apache.archiva.redback.users.User; import org.apache.archiva.redback.users.UserManagerException; import org.apache.archiva.redback.users.UserNotFoundException; -import org.apache.archiva.repository.*; -import org.apache.archiva.repository.content.maven2.ManagedDefaultRepositoryContent; +import org.apache.archiva.repository.ContentNotFoundException; +import org.apache.archiva.repository.ManagedRepositoryContent; +import org.apache.archiva.repository.RepositoryException; +import org.apache.archiva.repository.RepositoryNotFoundException; +import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.repository.events.RepositoryListener; import org.apache.archiva.repository.metadata.MetadataTools; import org.apache.archiva.repository.metadata.RepositoryMetadataException; @@ -72,7 +79,6 @@ import org.apache.archiva.security.common.ArchivaRoleConstants; import org.apache.archiva.xml.XMLException; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang.StringUtils; -import org.apache.maven.index.context.IndexingContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -82,10 +88,21 @@ import javax.inject.Inject; import javax.inject.Named; import javax.ws.rs.core.Response; import java.io.IOException; -import java.nio.file.*; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; import java.text.DateFormat; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Set; +import java.util.TimeZone; /** * @author Olivier Lamy diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java index 8687b7201..68631041e 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java @@ -20,7 +20,12 @@ package org.apache.archiva.rest.services; */ import org.apache.archiva.common.utils.VersionComparator; -import org.apache.archiva.indexer.search.*; +import org.apache.archiva.indexer.search.RepositorySearch; +import org.apache.archiva.indexer.search.RepositorySearchException; +import org.apache.archiva.indexer.search.SearchFields; +import org.apache.archiva.indexer.search.SearchResultHit; +import org.apache.archiva.indexer.search.SearchResultLimits; +import org.apache.archiva.indexer.search.SearchResults; import org.apache.archiva.maven2.model.Artifact; import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.repository.MetadataRepository; @@ -40,7 +45,14 @@ import org.springframework.stereotype.Service; import javax.inject.Inject; import javax.ws.rs.core.Response; import java.net.URI; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeMap; /** * @author Olivier Lamy diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSystemStatusService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSystemStatusService.java index ab4970261..fdacd992b 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSystemStatusService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSystemStatusService.java @@ -40,7 +40,13 @@ import javax.inject.Inject; import javax.ws.rs.core.Response; import java.text.DecimalFormat; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; /** * @author Olivier Lamy diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/utils/AddAdminRepoConsumerClosure.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/utils/AddAdminRepoConsumerClosure.java index 6a42c9518..77de7a0d5 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/utils/AddAdminRepoConsumerClosure.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/utils/AddAdminRepoConsumerClosure.java @@ -19,9 +19,9 @@ package org.apache.archiva.rest.services.utils; * under the License. */ +import org.apache.archiva.consumers.RepositoryContentConsumer; import org.apache.archiva.rest.api.model.AdminRepositoryConsumer; import org.apache.commons.collections.Closure; -import org.apache.archiva.consumers.RepositoryContentConsumer; import java.util.ArrayList; import java.util.List; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java index bb4e949fd..9e370b7bc 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java @@ -23,7 +23,22 @@ import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.redback.rest.api.services.RedbackServiceException; import org.apache.archiva.redback.rest.services.AbstractRestServicesTest; -import org.apache.archiva.rest.api.services.*; +import org.apache.archiva.rest.api.services.ArchivaAdministrationService; +import org.apache.archiva.rest.api.services.ArchivaRestServiceException; +import org.apache.archiva.rest.api.services.BrowseService; +import org.apache.archiva.rest.api.services.CommonServices; +import org.apache.archiva.rest.api.services.ManagedRepositoriesService; +import org.apache.archiva.rest.api.services.MergeRepositoriesService; +import org.apache.archiva.rest.api.services.NetworkProxyService; +import org.apache.archiva.rest.api.services.PingService; +import org.apache.archiva.rest.api.services.PluginsService; +import org.apache.archiva.rest.api.services.ProxyConnectorRuleService; +import org.apache.archiva.rest.api.services.ProxyConnectorService; +import org.apache.archiva.rest.api.services.RedbackRuntimeConfigurationService; +import org.apache.archiva.rest.api.services.RemoteRepositoriesService; +import org.apache.archiva.rest.api.services.RepositoriesService; +import org.apache.archiva.rest.api.services.RepositoryGroupService; +import org.apache.archiva.rest.api.services.SearchService; import org.apache.archiva.security.common.ArchivaRoleConstants; import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; import org.apache.commons.io.FileUtils; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java index fa3d94a23..f7f8c5152 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java @@ -23,7 +23,12 @@ import org.apache.archiva.maven2.model.Artifact; import org.apache.archiva.metadata.model.ProjectVersionMetadata; import org.apache.archiva.redback.rest.api.model.Role; import org.apache.archiva.redback.rest.api.services.RedbackServiceException; -import org.apache.archiva.rest.api.model.*; +import org.apache.archiva.rest.api.model.ArtifactContentEntry; +import org.apache.archiva.rest.api.model.BrowseResult; +import org.apache.archiva.rest.api.model.BrowseResultEntry; +import org.apache.archiva.rest.api.model.Entry; +import org.apache.archiva.rest.api.model.MetadataAddRequest; +import org.apache.archiva.rest.api.model.VersionsList; import org.apache.archiva.rest.api.services.ArchivaRestServiceException; import org.apache.archiva.rest.api.services.BrowseService; import org.apache.cxf.jaxrs.client.WebClient; @@ -34,7 +39,11 @@ import org.junit.Test; import javax.ws.rs.core.MediaType; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; diff --git a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java index 5823977d0..4b7856f2f 100644 --- a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java +++ b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java @@ -19,7 +19,12 @@ package org.apache.archiva.rss; * under the License. */ -import com.sun.syndication.feed.synd.*; +import com.sun.syndication.feed.synd.SyndContent; +import com.sun.syndication.feed.synd.SyndContentImpl; +import com.sun.syndication.feed.synd.SyndEntry; +import com.sun.syndication.feed.synd.SyndEntryImpl; +import com.sun.syndication.feed.synd.SyndFeed; +import com.sun.syndication.feed.synd.SyndFeedImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Scope; diff --git a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java index 4381d75e6..019c9e16a 100644 --- a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java +++ b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java @@ -31,7 +31,12 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import javax.inject.Inject; -import java.util.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; /** * Retrieve and process all artifacts of a repository from the database and generate a rss feed. diff --git a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessor.java b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessor.java index 9953e2f89..f9c24bd5c 100644 --- a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessor.java +++ b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessor.java @@ -32,7 +32,11 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import javax.inject.Inject; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Map; /** * Retrieve and process new versions of an artifact from the database and diff --git a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java index 209e64436..328ef91ea 100644 --- a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java +++ b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java @@ -30,7 +30,13 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import java.util.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; @RunWith (ArchivaBlockJUnit4ClassRunner.class) public class NewArtifactsRssFeedProcessorTest diff --git a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessorTest.java b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessorTest.java index 6cf8f672c..2b71c0f5c 100644 --- a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessorTest.java +++ b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessorTest.java @@ -31,7 +31,12 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import static org.easymock.EasyMock.createControl; import static org.easymock.EasyMock.expect; diff --git a/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockBeanServices.java b/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockBeanServices.java index 9480019a0..728f675a5 100644 --- a/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockBeanServices.java +++ b/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockBeanServices.java @@ -18,14 +18,18 @@ package org.apache.archiva.security.mock; * under the License. */ -import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.model.ProjectMetadata; import org.apache.archiva.metadata.model.ProjectVersionMetadata; import org.apache.archiva.metadata.repository.MetadataRepository; import org.apache.archiva.metadata.repository.RepositorySession; import org.apache.archiva.metadata.repository.filter.Filter; -import org.apache.archiva.metadata.repository.storage.*; +import org.apache.archiva.metadata.repository.storage.ReadMetadataRequest; +import org.apache.archiva.metadata.repository.storage.RepositoryStorage; +import org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataException; +import org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataInvalidException; +import org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataNotFoundException; +import org.apache.archiva.metadata.repository.storage.RepositoryStorageRuntimeException; import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.policies.ProxyDownloadException; import org.apache.archiva.redback.components.taskqueue.TaskQueueException; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java index f1711ca8d..937470af2 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java @@ -74,7 +74,13 @@ import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.text.DateFormat; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import java.util.TimeZone; import java.util.concurrent.CopyOnWriteArrayList; /** diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/FileUploadService.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/FileUploadService.java index 020a9d9f5..a846381f3 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/FileUploadService.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/FileUploadService.java @@ -24,7 +24,14 @@ import org.apache.archiva.security.common.ArchivaRoleConstants; import org.apache.archiva.web.model.FileMetadata; import org.apache.cxf.jaxrs.ext.multipart.MultipartBody; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import java.util.List; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/RuntimeInfoService.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/RuntimeInfoService.java index a1b566c89..8d2e9dc76 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/RuntimeInfoService.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/RuntimeInfoService.java @@ -22,7 +22,11 @@ import org.apache.archiva.redback.authorization.RedbackAuthorization; import org.apache.archiva.rest.api.services.ArchivaRestServiceException; import org.apache.archiva.web.model.ApplicationRuntimeInfo; -import javax.ws.rs.*; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; /** diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java index a435e70e4..a0994cd25 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java @@ -35,7 +35,11 @@ import org.apache.archiva.redback.system.SecuritySession; import org.apache.archiva.redback.users.UserManager; import org.apache.archiva.redback.users.UserNotFoundException; import org.apache.archiva.rss.processor.RssFeedProcessor; -import org.apache.archiva.security.*; +import org.apache.archiva.security.AccessDeniedException; +import org.apache.archiva.security.ArchivaSecurityException; +import org.apache.archiva.security.PrincipalNotFoundException; +import org.apache.archiva.security.ServletAuthenticator; +import org.apache.archiva.security.UserRepositories; import org.apache.archiva.security.common.ArchivaRoleConstants; import org.apache.commons.codec.Decoder; import org.apache.commons.codec.DecoderException; @@ -52,7 +56,11 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * Servlet for handling rss feed requests. diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java index a9bd67203..9ea05cb56 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java @@ -21,7 +21,12 @@ package org.apache.archiva.web.security; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.runtime.RedbackRuntimeConfigurationAdmin; import org.apache.archiva.redback.components.cache.Cache; -import org.apache.archiva.redback.users.*; +import org.apache.archiva.redback.users.AbstractUserManager; +import org.apache.archiva.redback.users.User; +import org.apache.archiva.redback.users.UserManager; +import org.apache.archiva.redback.users.UserManagerException; +import org.apache.archiva.redback.users.UserNotFoundException; +import org.apache.archiva.redback.users.UserQuery; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Service; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java index 5379430e6..e16800390 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java @@ -30,7 +30,12 @@ import org.springframework.stereotype.Service; import javax.inject.Inject; import javax.inject.Named; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * @author Olivier Lamy diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java index 661ba1ca9..a98dc4998 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java @@ -21,14 +21,29 @@ package org.apache.archiva.web.security; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.runtime.RedbackRuntimeConfigurationAdmin; import org.apache.archiva.redback.components.cache.Cache; -import org.apache.archiva.redback.rbac.*; +import org.apache.archiva.redback.rbac.AbstractRBACManager; +import org.apache.archiva.redback.rbac.Operation; +import org.apache.archiva.redback.rbac.Permission; +import org.apache.archiva.redback.rbac.RBACManager; +import org.apache.archiva.redback.rbac.RbacManagerException; +import org.apache.archiva.redback.rbac.RbacObjectInvalidException; +import org.apache.archiva.redback.rbac.RbacObjectNotFoundException; +import org.apache.archiva.redback.rbac.Resource; +import org.apache.archiva.redback.rbac.Role; +import org.apache.archiva.redback.rbac.UserAssignment; import org.apache.commons.lang.StringUtils; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Service; import javax.inject.Inject; import javax.inject.Named; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; /** * @author Olivier Lamy diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java index 8e276baab..0acc266bf 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java @@ -20,7 +20,14 @@ package org.apache.archiva.web.security; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.runtime.RedbackRuntimeConfigurationAdmin; -import org.apache.archiva.redback.authentication.*; +import org.apache.archiva.redback.authentication.AbstractAuthenticator; +import org.apache.archiva.redback.authentication.AuthenticationConstants; +import org.apache.archiva.redback.authentication.AuthenticationDataSource; +import org.apache.archiva.redback.authentication.AuthenticationException; +import org.apache.archiva.redback.authentication.AuthenticationFailureCause; +import org.apache.archiva.redback.authentication.AuthenticationResult; +import org.apache.archiva.redback.authentication.Authenticator; +import org.apache.archiva.redback.authentication.PasswordBasedAuthenticationDataSource; import org.apache.archiva.redback.policy.AccountLockedException; import org.apache.archiva.redback.policy.MustChangePasswordException; import org.apache.archiva.redback.policy.PasswordEncoder; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/ArchivaStartup.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/ArchivaStartup.java index e3b8fd846..44a5e485a 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/ArchivaStartup.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/ArchivaStartup.java @@ -24,7 +24,6 @@ import org.apache.archiva.redback.components.scheduler.DefaultScheduler; import org.apache.archiva.redback.components.taskqueue.Task; import org.apache.archiva.redback.components.taskqueue.execution.ThreadedTaskQueueExecutor; import org.apache.archiva.scheduler.repository.DefaultRepositoryArchivaTaskScheduler; -import org.apache.maven.index.context.IndexingContext; import org.quartz.SchedulerException; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java index f53a56fca..cf69545b1 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java @@ -25,7 +25,12 @@ import org.apache.archiva.redback.rest.api.model.User; import org.apache.archiva.redback.rest.api.services.RoleManagementService; import org.apache.archiva.redback.rest.api.services.UserService; import org.apache.archiva.redback.rest.services.FakeCreateAdminService; -import org.apache.archiva.rest.api.services.*; +import org.apache.archiva.rest.api.services.ManagedRepositoriesService; +import org.apache.archiva.rest.api.services.ProxyConnectorService; +import org.apache.archiva.rest.api.services.RemoteRepositoriesService; +import org.apache.archiva.rest.api.services.RepositoriesService; +import org.apache.archiva.rest.api.services.RepositoryGroupService; +import org.apache.archiva.rest.api.services.SearchService; import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; import org.apache.archiva.webdav.RepositoryServlet; import org.apache.commons.lang.StringUtils; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java index beedae587..b377f6169 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java @@ -24,7 +24,11 @@ import org.apache.archiva.rest.api.services.RepositoriesService; import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; import org.apache.commons.io.FileUtils; import org.assertj.core.api.Assertions; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; import org.junit.runner.RunWith; import javax.ws.rs.RedirectionException; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java index d476e90e0..f1c79ae8a 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java @@ -30,7 +30,11 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexNonDefaultPathTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexNonDefaultPathTest.java index d2c569c95..b64f128ef 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexNonDefaultPathTest.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexNonDefaultPathTest.java @@ -27,7 +27,11 @@ import org.apache.archiva.maven2.model.Artifact; import org.apache.archiva.redback.integration.security.role.RedbackRoleConstants; import org.apache.archiva.redback.rest.services.FakeCreateAdminService; import org.apache.archiva.rest.api.model.SearchRequest; -import org.apache.archiva.rest.api.services.*; +import org.apache.archiva.rest.api.services.ManagedRepositoriesService; +import org.apache.archiva.rest.api.services.ProxyConnectorService; +import org.apache.archiva.rest.api.services.RepositoriesService; +import org.apache.archiva.rest.api.services.RepositoryGroupService; +import org.apache.archiva.rest.api.services.SearchService; import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; import org.junit.After; import org.junit.AfterClass; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexTest.java index 36b96f4ad..7bb4bb173 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexTest.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexTest.java @@ -26,7 +26,11 @@ import org.apache.archiva.maven2.model.Artifact; import org.apache.archiva.redback.integration.security.role.RedbackRoleConstants; import org.apache.archiva.redback.rest.services.FakeCreateAdminService; import org.apache.archiva.rest.api.model.SearchRequest; -import org.apache.archiva.rest.api.services.*; +import org.apache.archiva.rest.api.services.ManagedRepositoriesService; +import org.apache.archiva.rest.api.services.ProxyConnectorService; +import org.apache.archiva.rest.api.services.RepositoriesService; +import org.apache.archiva.rest.api.services.RepositoryGroupService; +import org.apache.archiva.rest.api.services.SearchService; import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; import org.apache.commons.io.FileUtils; import org.junit.After; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java index 0693e56ab..b798423d2 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java @@ -24,7 +24,11 @@ import junit.framework.TestCase; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.commons.codec.Encoder; import org.apache.commons.codec.binary.Base64; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java index dd2c5f7b5..410d6c1a3 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java @@ -31,10 +31,19 @@ import org.apache.archiva.redback.policy.UserSecurityPolicy; import org.apache.archiva.redback.system.DefaultSecuritySession; import org.apache.archiva.redback.system.SecuritySession; import org.apache.archiva.redback.system.SecuritySystem; -import org.apache.archiva.redback.users.*; +import org.apache.archiva.redback.users.User; +import org.apache.archiva.redback.users.UserManager; +import org.apache.archiva.redback.users.UserManagerException; +import org.apache.archiva.redback.users.UserManagerListener; +import org.apache.archiva.redback.users.UserNotFoundException; +import org.apache.archiva.redback.users.UserQuery; import org.apache.archiva.redback.users.jpa.model.JpaUser; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * SecuritySystem stub used for testing. diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java index 5ec9d6f31..aa55d47f6 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java @@ -22,7 +22,11 @@ package org.apache.archiva.webtest.memory; import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.repository.AbstractMetadataRepository; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.List; public class TestMetadataRepository extends AbstractMetadataRepository diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataResolver.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataResolver.java index 7e3f6d888..b0edd246d 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataResolver.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataResolver.java @@ -25,7 +25,13 @@ import org.apache.archiva.metadata.model.ProjectVersionReference; import org.apache.archiva.metadata.repository.MetadataResolver; import org.apache.archiva.metadata.repository.RepositorySession; -import java.util.*; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; public class TestMetadataResolver implements MetadataResolver diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java index 48a1361c0..f3ce8f62d 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java @@ -23,7 +23,11 @@ import org.apache.archiva.web.test.tools.ArchivaSeleniumExecutionRule; import org.apache.archiva.web.test.tools.WebdriverUtility; import org.junit.Assert; import org.junit.Rule; -import org.openqa.selenium.*; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Point; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.ExpectedConditions; diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java index c42380e23..62e510056 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java @@ -57,6 +57,7 @@ import org.apache.archiva.redback.policy.MustChangePasswordException; import org.apache.archiva.redback.system.SecuritySession; import org.apache.archiva.redback.users.User; import org.apache.archiva.redback.users.UserManager; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.ReleaseScheme; @@ -65,7 +66,6 @@ import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.repository.content.maven2.RepositoryRequest; import org.apache.archiva.repository.events.AuditListener; import org.apache.archiva.repository.features.IndexCreationFeature; -import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.metadata.MetadataTools; import org.apache.archiva.repository.metadata.RepositoryMetadataException; import org.apache.archiva.repository.metadata.RepositoryMetadataMerge; diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java index cb8e7ea1b..236be5084 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java @@ -22,11 +22,26 @@ package org.apache.archiva.webdav; import org.apache.archiva.webdav.util.IndexWriter; import org.apache.archiva.webdav.util.MimeTypes; import org.apache.jackrabbit.util.Text; -import org.apache.jackrabbit.webdav.*; +import org.apache.jackrabbit.webdav.DavException; +import org.apache.jackrabbit.webdav.DavResource; +import org.apache.jackrabbit.webdav.DavResourceFactory; +import org.apache.jackrabbit.webdav.DavResourceIterator; +import org.apache.jackrabbit.webdav.DavResourceLocator; +import org.apache.jackrabbit.webdav.DavSession; +import org.apache.jackrabbit.webdav.MultiStatusResponse; import org.apache.jackrabbit.webdav.io.InputContext; import org.apache.jackrabbit.webdav.io.OutputContext; -import org.apache.jackrabbit.webdav.lock.*; -import org.apache.jackrabbit.webdav.property.*; +import org.apache.jackrabbit.webdav.lock.ActiveLock; +import org.apache.jackrabbit.webdav.lock.LockInfo; +import org.apache.jackrabbit.webdav.lock.LockManager; +import org.apache.jackrabbit.webdav.lock.Scope; +import org.apache.jackrabbit.webdav.lock.Type; +import org.apache.jackrabbit.webdav.property.DavProperty; +import org.apache.jackrabbit.webdav.property.DavPropertyName; +import org.apache.jackrabbit.webdav.property.DavPropertyNameSet; +import org.apache.jackrabbit.webdav.property.DavPropertySet; +import org.apache.jackrabbit.webdav.property.DefaultDavProperty; +import org.apache.jackrabbit.webdav.property.ResourceType; import org.joda.time.DateTime; import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.ISODateTimeFormat; diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/RepositoryServlet.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/RepositoryServlet.java index 24f2db36a..1b6e64d62 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/RepositoryServlet.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/RepositoryServlet.java @@ -27,7 +27,17 @@ import org.apache.archiva.configuration.ConfigurationEvent; import org.apache.archiva.configuration.ConfigurationListener; import org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticator; import org.apache.archiva.security.ServletAuthenticator; -import org.apache.jackrabbit.webdav.*; +import org.apache.jackrabbit.webdav.DavException; +import org.apache.jackrabbit.webdav.DavLocatorFactory; +import org.apache.jackrabbit.webdav.DavMethods; +import org.apache.jackrabbit.webdav.DavResource; +import org.apache.jackrabbit.webdav.DavResourceFactory; +import org.apache.jackrabbit.webdav.DavServletResponse; +import org.apache.jackrabbit.webdav.DavSessionProvider; +import org.apache.jackrabbit.webdav.WebdavRequest; +import org.apache.jackrabbit.webdav.WebdavRequestImpl; +import org.apache.jackrabbit.webdav.WebdavResponse; +import org.apache.jackrabbit.webdav.WebdavResponseImpl; import org.apache.jackrabbit.webdav.server.AbstractWebdavServlet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/util/IndexWriter.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/util/IndexWriter.java index fbbdd67ff..3da1664b4 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/util/IndexWriter.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/util/IndexWriter.java @@ -31,7 +31,13 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.text.DateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; import java.util.stream.Collectors; /** diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java index 96828aba7..b04a13db8 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java @@ -19,7 +19,11 @@ package org.apache.archiva.webdav; * under the License. */ -import com.gargoylesoftware.htmlunit.*; +import com.gargoylesoftware.htmlunit.HttpMethod; +import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController; +import com.gargoylesoftware.htmlunit.WebClient; +import com.gargoylesoftware.htmlunit.WebRequest; +import com.gargoylesoftware.htmlunit.WebResponse; import junit.framework.TestCase; import net.sf.ehcache.CacheManager; import org.apache.archiva.admin.model.beans.ManagedRepository; diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java index 18705d209..a5f1f55c7 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java @@ -19,7 +19,6 @@ package org.apache.archiva.metadata.model; * under the License. */ -import javax.persistence.Entity; import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java index 967eb0d13..1183532e2 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java @@ -20,7 +20,6 @@ package org.apache.archiva.metadata.model; */ import javax.xml.bind.annotation.XmlRootElement; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/facets/RepositoryProblemFacet.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/facets/RepositoryProblemFacet.java index dc202a165..debbd8605 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/facets/RepositoryProblemFacet.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/facets/RepositoryProblemFacet.java @@ -19,11 +19,11 @@ package org.apache.archiva.metadata.model.facets; * under the License. */ +import org.apache.archiva.metadata.model.MetadataFacet; + import java.util.HashMap; import java.util.Map; -import org.apache.archiva.metadata.model.MetadataFacet; - public class RepositoryProblemFacet implements MetadataFacet { diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/AbstractMetadataRepository.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/AbstractMetadataRepository.java index 8bec50167..6b9b845f8 100644 --- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/AbstractMetadataRepository.java +++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/AbstractMetadataRepository.java @@ -19,16 +19,16 @@ package org.apache.archiva.metadata.repository; * under the License. */ -import java.util.Collection; -import java.util.Date; -import java.util.List; - import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.model.MetadataFacet; import org.apache.archiva.metadata.model.ProjectMetadata; import org.apache.archiva.metadata.model.ProjectVersionMetadata; import org.apache.archiva.metadata.model.ProjectVersionReference; +import java.util.Collection; +import java.util.Date; +import java.util.List; + public abstract class AbstractMetadataRepository implements MetadataRepository { diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySession.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySession.java index 5aeb5090e..07424033a 100644 --- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySession.java +++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySession.java @@ -21,7 +21,6 @@ package org.apache.archiva.metadata.repository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.lang.AutoCloseable; /** * The repository session provides a single interface to accessing Archiva repositories. It provides access to three diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java index 1504c4b2a..c9895da81 100644 --- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java +++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java @@ -19,7 +19,6 @@ package org.apache.archiva.metadata.repository.storage; * under the License. */ -import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.model.ProjectMetadata; import org.apache.archiva.metadata.model.ProjectVersionMetadata; diff --git a/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java b/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java index c740c54b3..5d033f54f 100644 --- a/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java +++ b/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java @@ -19,11 +19,22 @@ package org.apache.archiva.metadata.repository; * under the License. */ -import junit.framework.AssertionFailedError; import junit.framework.TestCase; import org.apache.archiva.metadata.generic.GenericMetadataFacet; import org.apache.archiva.metadata.generic.GenericMetadataFacetFactory; -import org.apache.archiva.metadata.model.*; +import org.apache.archiva.metadata.model.ArtifactMetadata; +import org.apache.archiva.metadata.model.CiManagement; +import org.apache.archiva.metadata.model.Dependency; +import org.apache.archiva.metadata.model.IssueManagement; +import org.apache.archiva.metadata.model.License; +import org.apache.archiva.metadata.model.MailingList; +import org.apache.archiva.metadata.model.MetadataFacet; +import org.apache.archiva.metadata.model.MetadataFacetFactory; +import org.apache.archiva.metadata.model.Organization; +import org.apache.archiva.metadata.model.ProjectMetadata; +import org.apache.archiva.metadata.model.ProjectVersionMetadata; +import org.apache.archiva.metadata.model.ProjectVersionReference; +import org.apache.archiva.metadata.model.Scm; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.assertj.core.util.Sets; import org.junit.Test; @@ -33,7 +44,18 @@ import org.slf4j.LoggerFactory; import org.springframework.test.context.ContextConfiguration; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; import static org.assertj.core.api.Assertions.assertThat; diff --git a/archiva-modules/metadata/metadata-statistics-api/src/test/java/org/apache/archiva/metadata/repository/stats/model/DefaultRepositoryStatisticsTest.java b/archiva-modules/metadata/metadata-statistics-api/src/test/java/org/apache/archiva/metadata/repository/stats/model/DefaultRepositoryStatisticsTest.java index eb38a3954..7aff156c3 100644 --- a/archiva-modules/metadata/metadata-statistics-api/src/test/java/org/apache/archiva/metadata/repository/stats/model/DefaultRepositoryStatisticsTest.java +++ b/archiva-modules/metadata/metadata-statistics-api/src/test/java/org/apache/archiva/metadata/repository/stats/model/DefaultRepositoryStatisticsTest.java @@ -25,7 +25,7 @@ import java.util.Date; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; /** * @author Martin Stockhammer diff --git a/archiva-modules/plugins/generic-metadata-support/src/main/java/org/apache/archiva/metadata/generic/GenericMetadataFacet.java b/archiva-modules/plugins/generic-metadata-support/src/main/java/org/apache/archiva/metadata/generic/GenericMetadataFacet.java index 1a839e811..844c7c913 100644 --- a/archiva-modules/plugins/generic-metadata-support/src/main/java/org/apache/archiva/metadata/generic/GenericMetadataFacet.java +++ b/archiva-modules/plugins/generic-metadata-support/src/main/java/org/apache/archiva/metadata/generic/GenericMetadataFacet.java @@ -19,11 +19,11 @@ package org.apache.archiva.metadata.generic; * under the License. */ +import org.apache.archiva.metadata.model.MetadataFacet; + import java.util.Map; import java.util.TreeMap; -import org.apache.archiva.metadata.model.MetadataFacet; - public class GenericMetadataFacet implements MetadataFacet { diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java index 62089c82e..e8ff5e8f6 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java @@ -22,10 +22,8 @@ package org.apache.archiva.metadata.repository.storage.maven2; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.beans.NetworkProxy; import org.apache.archiva.admin.model.beans.ProxyConnector; -import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin; import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorAdmin; -import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin; import org.apache.archiva.checksum.ChecksumAlgorithm; import org.apache.archiva.checksum.ChecksummedFile; import org.apache.archiva.common.Try; @@ -36,22 +34,45 @@ import org.apache.archiva.metadata.model.ProjectMetadata; import org.apache.archiva.metadata.model.ProjectVersionMetadata; import org.apache.archiva.metadata.model.facets.RepositoryProblemFacet; import org.apache.archiva.metadata.repository.filter.Filter; -import org.apache.archiva.metadata.repository.storage.*; +import org.apache.archiva.metadata.repository.storage.ReadMetadataRequest; +import org.apache.archiva.metadata.repository.storage.RelocationException; +import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator; +import org.apache.archiva.metadata.repository.storage.RepositoryStorage; +import org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataInvalidException; +import org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataNotFoundException; +import org.apache.archiva.metadata.repository.storage.RepositoryStorageRuntimeException; import org.apache.archiva.model.ArchivaRepositoryMetadata; import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.SnapshotVersion; import org.apache.archiva.policies.ProxyDownloadException; import org.apache.archiva.proxy.common.WagonFactory; import org.apache.archiva.proxy.model.RepositoryProxyConnectors; -import org.apache.archiva.repository.*; +import org.apache.archiva.repository.LayoutException; +import org.apache.archiva.repository.ManagedRepository; +import org.apache.archiva.repository.ManagedRepositoryContent; +import org.apache.archiva.repository.ReleaseScheme; +import org.apache.archiva.repository.RemoteRepository; +import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.repository.content.PathParser; -import org.apache.archiva.repository.features.RepositoryFeature; -import org.apache.archiva.repository.features.StagingRepositoryFeature; import org.apache.archiva.xml.XMLException; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; -import org.apache.maven.model.*; -import org.apache.maven.model.building.*; +import org.apache.maven.model.CiManagement; +import org.apache.maven.model.Dependency; +import org.apache.maven.model.DistributionManagement; +import org.apache.maven.model.IssueManagement; +import org.apache.maven.model.License; +import org.apache.maven.model.MailingList; +import org.apache.maven.model.Model; +import org.apache.maven.model.Organization; +import org.apache.maven.model.Relocation; +import org.apache.maven.model.Scm; +import org.apache.maven.model.building.DefaultModelBuilderFactory; +import org.apache.maven.model.building.DefaultModelBuildingRequest; +import org.apache.maven.model.building.ModelBuilder; +import org.apache.maven.model.building.ModelBuildingException; +import org.apache.maven.model.building.ModelBuildingRequest; +import org.apache.maven.model.building.ModelProblem; import org.apache.maven.model.io.xpp3.MavenXpp3Reader; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import org.slf4j.Logger; @@ -70,7 +91,14 @@ import java.nio.file.Files; import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.stream.Stream; diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java index a6c3c24ba..f72c22b5b 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java @@ -31,7 +31,6 @@ import org.apache.archiva.proxy.common.WagonFactoryRequest; import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.RemoteRepository; import org.apache.archiva.repository.RepositoryCredentials; -import org.apache.archiva.repository.features.RemoteIndexFeature; import org.apache.archiva.xml.XMLException; import org.apache.commons.lang.StringUtils; import org.apache.http.auth.UsernamePasswordCredentials; @@ -56,7 +55,6 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.time.temporal.ChronoUnit; import java.util.List; import java.util.Map; diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/content/maven2/AbstractDefaultRepositoryContent.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/content/maven2/AbstractDefaultRepositoryContent.java index ae8a92281..f3cdb190f 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/content/maven2/AbstractDefaultRepositoryContent.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/content/maven2/AbstractDefaultRepositoryContent.java @@ -27,9 +27,9 @@ import org.apache.archiva.model.ArchivaArtifact; import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.ProjectReference; import org.apache.archiva.model.VersionedReference; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.RepositoryContent; import org.apache.archiva.repository.content.PathParser; -import org.apache.archiva.repository.LayoutException; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/content/maven2/DefaultPathParser.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/content/maven2/DefaultPathParser.java index d28a8284b..0a8d644f4 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/content/maven2/DefaultPathParser.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/content/maven2/DefaultPathParser.java @@ -26,8 +26,8 @@ import org.apache.archiva.metadata.repository.storage.maven2.ArtifactMappingProv import org.apache.archiva.metadata.repository.storage.maven2.DefaultArtifactMappingProvider; import org.apache.archiva.metadata.repository.storage.maven2.Maven2RepositoryPathTranslator; import org.apache.archiva.model.ArtifactReference; -import org.apache.archiva.repository.content.PathParser; import org.apache.archiva.repository.LayoutException; +import org.apache.archiva.repository.content.PathParser; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Service; diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java index 05f877142..7b9279f2b 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java @@ -20,7 +20,6 @@ package org.apache.archiva.repository.maven2; */ import org.apache.archiva.common.utils.PathUtil; -import org.apache.archiva.indexer.ArchivaIndexingContext; import org.apache.archiva.repository.AbstractManagedRepository; import org.apache.archiva.repository.ReleaseScheme; import org.apache.archiva.repository.RepositoryCapabilities; @@ -38,11 +37,7 @@ import java.io.IOException; import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Collections; -import java.util.HashSet; import java.util.Locale; -import java.util.Set; /** * Maven2 managed repository implementation. diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRemoteRepository.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRemoteRepository.java index 15b212e8e..0dc66e182 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRemoteRepository.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRemoteRepository.java @@ -1,6 +1,5 @@ package org.apache.archiva.repository.maven2; -import org.apache.archiva.indexer.ArchivaIndexingContext; import org.apache.archiva.repository.AbstractRemoteRepository; import org.apache.archiva.repository.ReleaseScheme; import org.apache.archiva.repository.RemoteRepository; @@ -14,7 +13,6 @@ import org.apache.archiva.repository.features.RepositoryFeature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; import java.nio.file.Path; import java.util.Locale; diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java index c779baa42..62057b033 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java @@ -19,12 +19,24 @@ package org.apache.archiva.repository.maven2; * under the License. */ -import org.apache.archiva.common.utils.PathUtil; import org.apache.archiva.configuration.AbstractRepositoryConfiguration; import org.apache.archiva.configuration.ArchivaConfiguration; 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.EditableManagedRepository; +import org.apache.archiva.repository.EditableRemoteRepository; +import org.apache.archiva.repository.EditableRepository; +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.UnsupportedURIException; 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/plugins/maven2-repository/src/test/java/org/apache/archiva/configuration/MockRepoAdmin.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/configuration/MockRepoAdmin.java index c6fa3cc20..74af31509 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/configuration/MockRepoAdmin.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/configuration/MockRepoAdmin.java @@ -30,7 +30,6 @@ import org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin; import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorAdmin; import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorOrderComparator; import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin; -import org.apache.archiva.indexer.ArchivaIndexingContext; import org.apache.commons.lang.StringUtils; import org.apache.maven.index.context.IndexingContext; import org.modelmapper.ModelMapper; diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/ManagedDefaultRepositoryContentTest.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/ManagedDefaultRepositoryContentTest.java index 98bfac076..59c15a21d 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/ManagedDefaultRepositoryContentTest.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/ManagedDefaultRepositoryContentTest.java @@ -27,8 +27,8 @@ import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.ProjectReference; import org.apache.archiva.model.VersionedReference; import org.apache.archiva.repository.EditableManagedRepository; -import org.apache.archiva.repository.content.maven2.ManagedDefaultRepositoryContent; import org.apache.archiva.repository.LayoutException; +import org.apache.archiva.repository.content.maven2.ManagedDefaultRepositoryContent; import org.apache.archiva.repository.maven2.MavenManagedRepository; import org.junit.Before; import org.junit.Test; diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverMRM1411RepoGroupTest.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverMRM1411RepoGroupTest.java index ff52b6c3e..79a2c52b0 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverMRM1411RepoGroupTest.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverMRM1411RepoGroupTest.java @@ -20,8 +20,17 @@ package org.apache.archiva.metadata.repository.storage.maven2; */ import junit.framework.TestCase; -import org.apache.archiva.configuration.*; -import org.apache.archiva.metadata.model.*; +import org.apache.archiva.configuration.ArchivaConfiguration; +import org.apache.archiva.configuration.Configuration; +import org.apache.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.archiva.configuration.ProxyConnectorConfiguration; +import org.apache.archiva.configuration.RemoteRepositoryConfiguration; +import org.apache.archiva.configuration.RepositoryGroupConfiguration; +import org.apache.archiva.metadata.model.ArtifactMetadata; +import org.apache.archiva.metadata.model.Dependency; +import org.apache.archiva.metadata.model.License; +import org.apache.archiva.metadata.model.MailingList; +import org.apache.archiva.metadata.model.ProjectVersionMetadata; import org.apache.archiva.metadata.repository.filter.AllFilter; import org.apache.archiva.metadata.repository.filter.Filter; import org.apache.archiva.metadata.repository.storage.ReadMetadataRequest; diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverMRM1411Test.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverMRM1411Test.java index 6bc69f492..81f5d1bb9 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverMRM1411Test.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverMRM1411Test.java @@ -20,8 +20,16 @@ package org.apache.archiva.metadata.repository.storage.maven2; */ import junit.framework.TestCase; -import org.apache.archiva.configuration.*; -import org.apache.archiva.metadata.model.*; +import org.apache.archiva.configuration.ArchivaConfiguration; +import org.apache.archiva.configuration.Configuration; +import org.apache.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.archiva.configuration.ProxyConnectorConfiguration; +import org.apache.archiva.configuration.RemoteRepositoryConfiguration; +import org.apache.archiva.metadata.model.ArtifactMetadata; +import org.apache.archiva.metadata.model.Dependency; +import org.apache.archiva.metadata.model.License; +import org.apache.archiva.metadata.model.MailingList; +import org.apache.archiva.metadata.model.ProjectVersionMetadata; import org.apache.archiva.metadata.repository.filter.AllFilter; import org.apache.archiva.metadata.repository.filter.Filter; import org.apache.archiva.metadata.repository.storage.ReadMetadataRequest; diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java index 18ae3cd41..2a4bbe7f5 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java @@ -20,8 +20,17 @@ package org.apache.archiva.metadata.repository.storage.maven2; */ import junit.framework.TestCase; -import org.apache.archiva.configuration.*; -import org.apache.archiva.metadata.model.*; +import org.apache.archiva.configuration.ArchivaConfiguration; +import org.apache.archiva.configuration.Configuration; +import org.apache.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.archiva.configuration.ProxyConnectorConfiguration; +import org.apache.archiva.configuration.RemoteRepositoryConfiguration; +import org.apache.archiva.configuration.RepositoryScanningConfiguration; +import org.apache.archiva.metadata.model.ArtifactMetadata; +import org.apache.archiva.metadata.model.Dependency; +import org.apache.archiva.metadata.model.License; +import org.apache.archiva.metadata.model.MailingList; +import org.apache.archiva.metadata.model.ProjectVersionMetadata; import org.apache.archiva.metadata.model.maven2.MavenArtifactFacet; import org.apache.archiva.metadata.repository.filter.AllFilter; import org.apache.archiva.metadata.repository.filter.ExcludesFilter; @@ -48,7 +57,12 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/RemoteDefaultRepositoryContentTest.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/RemoteDefaultRepositoryContentTest.java index 4af23f6fd..42a5b26a9 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/RemoteDefaultRepositoryContentTest.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/RemoteDefaultRepositoryContentTest.java @@ -20,10 +20,10 @@ package org.apache.archiva.metadata.repository.storage.maven2; */ import org.apache.archiva.model.ArtifactReference; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.RemoteRepository; import org.apache.archiva.repository.RemoteRepositoryContent; import org.apache.archiva.repository.content.maven2.RemoteDefaultRepositoryContent; -import org.apache.archiva.repository.LayoutException; import org.junit.Before; import javax.inject.Inject; diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/AbstractRepositoryLayerTestCase.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/AbstractRepositoryLayerTestCase.java index 56af25fc0..0c2fdbd78 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/AbstractRepositoryLayerTestCase.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/AbstractRepositoryLayerTestCase.java @@ -19,8 +19,6 @@ package org.apache.archiva.repository; * under the License. */ -import org.apache.archiva.admin.model.beans.ManagedRepository; -import org.apache.archiva.admin.model.beans.RemoteRepository; import org.apache.archiva.repository.maven2.MavenManagedRepository; import org.apache.archiva.repository.maven2.MavenRemoteRepository; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; @@ -35,7 +33,6 @@ import java.net.URI; import java.net.URISyntaxException; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.Locale; /** * AbstractRepositoryLayerTestCase diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/RepositoryURLTest.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/RepositoryURLTest.java index f0bfdbc66..08f79ff33 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/RepositoryURLTest.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/RepositoryURLTest.java @@ -20,15 +20,14 @@ package org.apache.archiva.repository; */ -import org.apache.archiva.model.RepositoryURL; - -import java.net.MalformedURLException; - import junit.framework.TestCase; +import org.apache.archiva.model.RepositoryURL; import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; import org.junit.Test; import org.junit.runner.RunWith; +import java.net.MalformedURLException; + /** * RepositoryURLTest * diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/content/maven2/RepositoryRequestTest.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/content/maven2/RepositoryRequestTest.java index faf2ba241..db3210863 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/content/maven2/RepositoryRequestTest.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/content/maven2/RepositoryRequestTest.java @@ -22,9 +22,9 @@ package org.apache.archiva.repository.content.maven2; import org.apache.archiva.common.utils.FileUtils; import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.model.ArtifactReference; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.RepositoryContentProvider; -import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.maven2.MavenManagedRepository; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.commons.lang.StringUtils; diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/index/mock/ArchivaIndexManagerMock.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/index/mock/ArchivaIndexManagerMock.java index f6f59250d..7ce74c00d 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/index/mock/ArchivaIndexManagerMock.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/index/mock/ArchivaIndexManagerMock.java @@ -25,24 +25,44 @@ import org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin; import org.apache.archiva.common.utils.FileUtils; import org.apache.archiva.common.utils.PathUtil; import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.indexer.*; +import org.apache.archiva.indexer.ArchivaIndexManager; +import org.apache.archiva.indexer.ArchivaIndexingContext; +import org.apache.archiva.indexer.IndexCreationFailedException; +import org.apache.archiva.indexer.IndexUpdateFailedException; +import org.apache.archiva.indexer.UnsupportedBaseContextException; import org.apache.archiva.proxy.common.WagonFactory; import org.apache.archiva.proxy.common.WagonFactoryException; import org.apache.archiva.proxy.common.WagonFactoryRequest; -import org.apache.archiva.repository.*; +import org.apache.archiva.repository.EditableRepository; +import org.apache.archiva.repository.ManagedRepository; +import org.apache.archiva.repository.PasswordCredentials; +import org.apache.archiva.repository.RemoteRepository; +import org.apache.archiva.repository.Repository; +import org.apache.archiva.repository.RepositoryType; +import org.apache.archiva.repository.UnsupportedRepositoryTypeException; import org.apache.archiva.repository.features.IndexCreationFeature; import org.apache.archiva.repository.features.RemoteIndexFeature; import org.apache.commons.lang.StringUtils; -import org.apache.maven.index.*; +import org.apache.maven.index.ArtifactContext; +import org.apache.maven.index.ArtifactContextProducer; +import org.apache.maven.index.DefaultScannerListener; +import org.apache.maven.index.Indexer; +import org.apache.maven.index.IndexerEngine; +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.apache.maven.index.packer.IndexPacker; import org.apache.maven.index.packer.IndexPackingRequest; import org.apache.maven.index.updater.IndexUpdateRequest; -import org.apache.maven.index.updater.IndexUpdater; import org.apache.maven.index.updater.ResourceFetcher; import org.apache.maven.index_shaded.lucene.index.IndexFormatTooOldException; -import org.apache.maven.wagon.*; +import org.apache.maven.wagon.ConnectionException; +import org.apache.maven.wagon.ResourceDoesNotExistException; +import org.apache.maven.wagon.StreamWagon; +import org.apache.maven.wagon.TransferFailedException; +import org.apache.maven.wagon.Wagon; import org.apache.maven.wagon.authentication.AuthenticationException; import org.apache.maven.wagon.authentication.AuthenticationInfo; import org.apache.maven.wagon.authorization.AuthorizationException; diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/metadata/Maven2RepositoryStorageTest.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/metadata/Maven2RepositoryStorageTest.java index ceb25db73..4c3168fb5 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/metadata/Maven2RepositoryStorageTest.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/metadata/Maven2RepositoryStorageTest.java @@ -19,7 +19,6 @@ package org.apache.archiva.repository.metadata; * under the License. */ -import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.metadata.repository.storage.RepositoryStorage; import org.apache.archiva.repository.maven2.MavenManagedRepository; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; @@ -31,7 +30,6 @@ import org.springframework.test.context.ContextConfiguration; import javax.inject.Inject; import javax.inject.Named; import java.nio.file.Paths; -import java.util.Locale; /** * @author Olivier Lamy diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/metadata/MetadataToolsTest.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/metadata/MetadataToolsTest.java index 7bbf4cb6f..e1be3e449 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/metadata/MetadataToolsTest.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/metadata/MetadataToolsTest.java @@ -29,10 +29,10 @@ import org.apache.archiva.policies.ChecksumPolicy; import org.apache.archiva.policies.ReleasesPolicy; import org.apache.archiva.policies.SnapshotsPolicy; import org.apache.archiva.repository.AbstractRepositoryLayerTestCase; +import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.RemoteRepositoryContent; import org.apache.archiva.repository.RepositoryContentProvider; -import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.maven2.MavenManagedRepository; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/spring-context-metadata-tools-test.xml b/archiva-modules/plugins/maven2-repository/src/test/resources/spring-context-metadata-tools-test.xml index 60989a3d7..b320fa6a5 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/resources/spring-context-metadata-tools-test.xml +++ b/archiva-modules/plugins/maven2-repository/src/test/resources/spring-context-metadata-tools-test.xml @@ -20,11 +20,8 @@ --> diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java index 268fd157e..5cc9face1 100644 --- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java +++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java @@ -21,7 +21,6 @@ package org.apache.archiva.metadata.repository.cassandra; import com.google.common.base.Predicate; import com.google.common.collect.Iterables; - import me.prettyprint.cassandra.serializers.LongSerializer; import me.prettyprint.cassandra.serializers.StringSerializer; import me.prettyprint.cassandra.service.template.ColumnFamilyResult; @@ -38,7 +37,6 @@ import me.prettyprint.hector.api.mutation.MutationResult; import me.prettyprint.hector.api.mutation.Mutator; import me.prettyprint.hector.api.query.QueryResult; import me.prettyprint.hector.api.query.RangeSlicesQuery; - import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.model.CiManagement; @@ -69,7 +67,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.persistence.PersistenceException; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java index 56bdaf058..c4b524105 100644 --- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java +++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java @@ -29,12 +29,10 @@ import org.apache.commons.lang.StringUtils; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Service; -import javax.annotation.PostConstruct; import javax.inject.Inject; import javax.inject.Named; import java.util.HashMap; import java.util.Map; -import java.util.concurrent.atomic.AtomicBoolean; /** * @author Olivier Lamy diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraUtils.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraUtils.java index f3de42b90..ce2ab7c64 100644 --- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraUtils.java +++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraUtils.java @@ -28,7 +28,6 @@ import me.prettyprint.hector.api.beans.ColumnSlice; import me.prettyprint.hector.api.beans.HColumn; import me.prettyprint.hector.api.factory.HFactory; import me.prettyprint.hector.api.mutation.Mutator; - import org.apache.archiva.metadata.repository.cassandra.model.ColumnNames; import org.apache.commons.lang.StringUtils; diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraArchivaManager.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraArchivaManager.java index d0185d9fc..76381b680 100644 --- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraArchivaManager.java +++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraArchivaManager.java @@ -19,8 +19,6 @@ package org.apache.archiva.metadata.repository.cassandra; * under the License. */ -import static org.apache.archiva.metadata.repository.cassandra.model.ColumnNames.*; - import me.prettyprint.cassandra.model.BasicColumnDefinition; import me.prettyprint.cassandra.model.ConfigurableConsistencyLevel; import me.prettyprint.cassandra.serializers.StringSerializer; @@ -47,6 +45,8 @@ import javax.inject.Inject; import java.util.ArrayList; import java.util.List; +import static org.apache.archiva.metadata.repository.cassandra.model.ColumnNames.*; + /** * FIXME make all configuration not hardcoded :-) * diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ArtifactMetadataModel.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ArtifactMetadataModel.java index 530a49e1f..db0499786 100644 --- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ArtifactMetadataModel.java +++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ArtifactMetadataModel.java @@ -19,13 +19,13 @@ package org.apache.archiva.metadata.repository.cassandra.model; * under the License. */ -import static org.apache.archiva.metadata.repository.cassandra.model.ColumnNames.*; - import org.apache.archiva.metadata.repository.cassandra.CassandraUtils; import java.io.Serializable; import java.util.Date; +import static org.apache.archiva.metadata.repository.cassandra.model.ColumnNames.*; + /** * Cassandra storage model for {@link org.apache.archiva.metadata.model.ArtifactMetadata} * diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/MetadataFacetModel.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/MetadataFacetModel.java index a2347bf1b..36b75aafb 100644 --- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/MetadataFacetModel.java +++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/MetadataFacetModel.java @@ -19,10 +19,10 @@ package org.apache.archiva.metadata.repository.cassandra.model; * under the License. */ -import static org.apache.archiva.metadata.repository.cassandra.model.ColumnNames.*; - import org.apache.archiva.metadata.repository.cassandra.CassandraUtils; +import static org.apache.archiva.metadata.repository.cassandra.model.ColumnNames.*; + /** * Cassandra storage model for {@link org.apache.archiva.metadata.model.MetadataFacet} * diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/MockRepositoryStorage.java b/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/MockRepositoryStorage.java index c09221fad..cd844d420 100644 --- a/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/MockRepositoryStorage.java +++ b/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/MockRepositoryStorage.java @@ -19,7 +19,6 @@ package org.apache.archiva.metadata.repository.cassandra; * under the License. */ -import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.model.ProjectMetadata; import org.apache.archiva.metadata.model.ProjectVersionMetadata; diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/RepositoriesNamespaceTest.java b/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/RepositoriesNamespaceTest.java index 3a999c0fb..061d8e7b4 100644 --- a/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/RepositoriesNamespaceTest.java +++ b/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/RepositoriesNamespaceTest.java @@ -23,7 +23,6 @@ import org.apache.archiva.metadata.model.ProjectMetadata; import org.apache.archiva.metadata.repository.cassandra.model.Namespace; import org.apache.archiva.metadata.repository.cassandra.model.Repository; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; -import static org.assertj.core.api.Assertions.assertThat; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -35,6 +34,8 @@ import org.springframework.test.context.ContextConfiguration; import javax.inject.Inject; import javax.inject.Named; +import static org.assertj.core.api.Assertions.assertThat; + /** * @author Olivier Lamy */ diff --git a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java index 55f9ffbd0..6f29d404c 100644 --- a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java +++ b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java @@ -21,7 +21,19 @@ package org.apache.archiva.metadata.repository.file; import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.archiva.metadata.model.*; +import org.apache.archiva.metadata.model.ArtifactMetadata; +import org.apache.archiva.metadata.model.CiManagement; +import org.apache.archiva.metadata.model.Dependency; +import org.apache.archiva.metadata.model.IssueManagement; +import org.apache.archiva.metadata.model.License; +import org.apache.archiva.metadata.model.MailingList; +import org.apache.archiva.metadata.model.MetadataFacet; +import org.apache.archiva.metadata.model.MetadataFacetFactory; +import org.apache.archiva.metadata.model.Organization; +import org.apache.archiva.metadata.model.ProjectMetadata; +import org.apache.archiva.metadata.model.ProjectVersionMetadata; +import org.apache.archiva.metadata.model.ProjectVersionReference; +import org.apache.archiva.metadata.model.Scm; import org.apache.archiva.metadata.repository.MetadataRepository; import org.apache.archiva.metadata.repository.MetadataRepositoryException; import org.apache.archiva.metadata.repository.MetadataResolutionException; @@ -32,8 +44,25 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.nio.file.*; -import java.util.*; +import java.nio.file.FileVisitOption; +import java.nio.file.Files; +import java.nio.file.NoSuchFileException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.StringTokenizer; import java.util.stream.Collectors; import java.util.stream.Stream; diff --git a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileRepositorySessionFactory.java b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileRepositorySessionFactory.java index fadd4e7d3..e471cc6af 100644 --- a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileRepositorySessionFactory.java +++ b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileRepositorySessionFactory.java @@ -19,14 +19,17 @@ package org.apache.archiva.metadata.repository.file; * under the License. */ +import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.metadata.model.MetadataFacetFactory; -import org.apache.archiva.metadata.repository.*; +import org.apache.archiva.metadata.repository.AbstractRepositorySessionFactory; +import org.apache.archiva.metadata.repository.MetadataRepository; +import org.apache.archiva.metadata.repository.MetadataResolver; +import org.apache.archiva.metadata.repository.RepositorySession; +import org.apache.archiva.metadata.repository.RepositorySessionFactory; import org.apache.commons.lang.StringUtils; -import org.apache.archiva.configuration.ArchivaConfiguration; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Service; -import javax.annotation.PostConstruct; import javax.inject.Inject; import javax.inject.Named; import java.util.HashMap; diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java index 6a4d793fa..53a7d6171 100644 --- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java +++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java @@ -20,7 +20,13 @@ package org.apache.archiva.metadata.repository.jcr; */ import org.apache.archiva.metadata.model.MetadataFacetFactory; -import org.apache.archiva.metadata.repository.*; +import org.apache.archiva.metadata.repository.AbstractRepositorySessionFactory; +import org.apache.archiva.metadata.repository.MetadataRepository; +import org.apache.archiva.metadata.repository.MetadataRepositoryException; +import org.apache.archiva.metadata.repository.MetadataResolver; +import org.apache.archiva.metadata.repository.RepositorySession; +import org.apache.archiva.metadata.repository.RepositorySessionFactory; +import org.apache.archiva.metadata.repository.RepositorySessionFactoryBean; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.time.StopWatch; import org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException; diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/RepositoryFactory.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/RepositoryFactory.java index b2c6c0c43..1e823b425 100644 --- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/RepositoryFactory.java +++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/RepositoryFactory.java @@ -26,7 +26,11 @@ import org.apache.jackrabbit.oak.Oak; import org.apache.jackrabbit.oak.api.Type; import org.apache.jackrabbit.oak.jcr.Jcr; import org.apache.jackrabbit.oak.plugins.index.IndexUtils; -import org.apache.jackrabbit.oak.plugins.index.lucene.*; +import org.apache.jackrabbit.oak.plugins.index.lucene.ExtractedTextCache; +import org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier; +import org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditorProvider; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProvider; import org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.DocumentQueue; import org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.LocalIndexObserver; import org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.NRTIndexFactory; diff --git a/archiva-modules/plugins/metadata-store-jcr/src/test/java/org/apache/archiva/metadata/repository/stats/JcrRepositoryStatisticsGatheringTest.java b/archiva-modules/plugins/metadata-store-jcr/src/test/java/org/apache/archiva/metadata/repository/stats/JcrRepositoryStatisticsGatheringTest.java index aa6658ad8..4978a0c91 100644 --- a/archiva-modules/plugins/metadata-store-jcr/src/test/java/org/apache/archiva/metadata/repository/stats/JcrRepositoryStatisticsGatheringTest.java +++ b/archiva-modules/plugins/metadata-store-jcr/src/test/java/org/apache/archiva/metadata/repository/stats/JcrRepositoryStatisticsGatheringTest.java @@ -40,7 +40,11 @@ import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; import javax.inject.Inject; -import javax.jcr.*; +import javax.jcr.ImportUUIDBehavior; +import javax.jcr.Node; +import javax.jcr.Repository; +import javax.jcr.RepositoryException; +import javax.jcr.Session; import javax.jcr.nodetype.NodeTypeManager; import javax.jcr.nodetype.NodeTypeTemplate; import java.io.IOException; diff --git a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java index ae684b613..ea8e06315 100644 --- a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java +++ b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java @@ -49,7 +49,11 @@ import javax.inject.Named; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.List; /** * Search the artifact repository of known SHA1 Checksums for potential duplicate artifacts. diff --git a/archiva-modules/plugins/problem-reports/src/test/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumerTest.java b/archiva-modules/plugins/problem-reports/src/test/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumerTest.java index 40f1f8331..5781dc579 100644 --- a/archiva-modules/plugins/problem-reports/src/test/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumerTest.java +++ b/archiva-modules/plugins/problem-reports/src/test/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumerTest.java @@ -23,13 +23,12 @@ import junit.framework.TestCase; import org.apache.archiva.consumers.ConsumerException; import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.model.MetadataFacet; +import org.apache.archiva.metadata.model.facets.RepositoryProblemFacet; import org.apache.archiva.metadata.repository.MetadataRepository; import org.apache.archiva.metadata.repository.RepositorySession; import org.apache.archiva.metadata.repository.RepositorySessionFactory; import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator; -import org.apache.archiva.metadata.model.facets.RepositoryProblemFacet; import org.apache.archiva.repository.BasicManagedRepository; -import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.junit.Before; import org.junit.Test; @@ -46,7 +45,6 @@ import java.nio.file.NoSuchFileException; import java.nio.file.Paths; import java.util.Arrays; import java.util.Date; -import java.util.Locale; import static org.mockito.Mockito.*; diff --git a/archiva-modules/plugins/problem-reports/src/test/resources/spring-context.xml b/archiva-modules/plugins/problem-reports/src/test/resources/spring-context.xml index 7f17bb2fb..6a4fa4501 100644 --- a/archiva-modules/plugins/problem-reports/src/test/resources/spring-context.xml +++ b/archiva-modules/plugins/problem-reports/src/test/resources/spring-context.xml @@ -20,11 +20,8 @@ --> diff --git a/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java b/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java index 4f0d75141..b0cf465a2 100644 --- a/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java +++ b/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java @@ -48,7 +48,12 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.text.DateFormat; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.TimeZone; import java.util.regex.Pattern; /** -- 2.39.5