mirror of https://github.com/apache/archiva.git
remove unused package, reduce annotations (value= or locations=)
This commit is contained in:
parent
4e9050691b
commit
fe7e671f3b
|
@ -52,7 +52,7 @@ public class MockRepoAdmin
|
|||
implements RemoteRepositoryAdmin, ManagedRepositoryAdmin, ProxyConnectorAdmin, NetworkProxyAdmin
|
||||
{
|
||||
@Inject
|
||||
@Named (value = "archivaConfiguration#test")
|
||||
@Named ( "archivaConfiguration#test" )
|
||||
private ArchivaConfiguration archivaConfiguration;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -40,12 +40,12 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
|
||||
@RunWith( ArchivaSpringJUnit4ClassRunner.class )
|
||||
@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
||||
@ContextConfiguration( { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
||||
public class DependencyTreeBuilderTestMaven3
|
||||
extends TestCase
|
||||
{
|
||||
@Inject
|
||||
@Named( value = "dependencyTreeBuilder#maven3" )
|
||||
@Named( "dependencyTreeBuilder#maven3" )
|
||||
private Maven3DependencyTreeBuilder builder;
|
||||
|
||||
@Inject
|
||||
|
@ -61,7 +61,7 @@ public class DependencyTreeBuilderTestMaven3
|
|||
|
||||
|
||||
@Inject
|
||||
@Named( value = "archivaConfiguration#test" )
|
||||
@Named( "archivaConfiguration#test" )
|
||||
ArchivaConfiguration config;
|
||||
|
||||
@Before
|
||||
|
|
|
@ -22,11 +22,8 @@ package org.apache.archiva.metadata.repository.storage.maven2;
|
|||
import org.apache.archiva.model.ArtifactReference;
|
||||
import org.apache.archiva.repository.AbstractRepositoryLayerTestCase;
|
||||
import org.apache.archiva.repository.layout.LayoutException;
|
||||
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import static org.junit.Assert.*;
|
|||
* AbstractLegacyRepositoryContentTestCase
|
||||
*/
|
||||
@RunWith ( ArchivaSpringJUnit4ClassRunner.class )
|
||||
@ContextConfiguration ( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-no-mock-conf.xml" } )
|
||||
@ContextConfiguration ( { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-no-mock-conf.xml" } )
|
||||
public abstract class AbstractLegacyRepositoryContentTestCase
|
||||
extends AbstractRepositoryLayerTestCase
|
||||
{
|
||||
|
|
|
@ -29,11 +29,8 @@ import org.apache.archiva.model.ProjectReference;
|
|||
import org.apache.archiva.model.VersionedReference;
|
||||
import org.apache.archiva.repository.ManagedRepositoryContent;
|
||||
import org.apache.archiva.repository.layout.LayoutException;
|
||||
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
@ -54,14 +51,14 @@ public class ManagedDefaultRepositoryContentTest
|
|||
extends AbstractDefaultRepositoryContentTestCase
|
||||
{
|
||||
@Inject
|
||||
@Named ( value = "managedRepositoryContent#default" )
|
||||
@Named ( "managedRepositoryContent#default" )
|
||||
private ManagedRepositoryContent repoContent;
|
||||
|
||||
@Inject
|
||||
FileTypes fileTypes;
|
||||
|
||||
@Inject
|
||||
@Named ( value = "archivaConfiguration#default" )
|
||||
@Named ( "archivaConfiguration#default" )
|
||||
ArchivaConfiguration archivaConfiguration;
|
||||
|
||||
@Before
|
||||
|
|
|
@ -26,11 +26,8 @@ import org.apache.archiva.model.ProjectReference;
|
|||
import org.apache.archiva.model.VersionedReference;
|
||||
import org.apache.archiva.repository.ManagedRepositoryContent;
|
||||
import org.apache.archiva.repository.layout.LayoutException;
|
||||
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
@ -51,7 +48,7 @@ public class ManagedLegacyRepositoryContentTest
|
|||
extends AbstractLegacyRepositoryContentTestCase
|
||||
{
|
||||
@Inject
|
||||
@Named( value = "managedRepositoryContent#legacy" )
|
||||
@Named( "managedRepositoryContent#legacy" )
|
||||
private ManagedRepositoryContent repoContent;
|
||||
|
||||
@Before
|
||||
|
|
|
@ -58,14 +58,14 @@ import static org.mockito.Mockito.when;
|
|||
|
||||
|
||||
@RunWith ( ArchivaSpringJUnit4ClassRunner.class )
|
||||
@ContextConfiguration ( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
||||
@ContextConfiguration ( { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
||||
public class Maven2RepositoryMetadataResolverMRM1411RepoGroupTest
|
||||
extends TestCase
|
||||
{
|
||||
private static final Filter<String> ALL = new AllFilter<String>();
|
||||
|
||||
@Inject
|
||||
@Named (value = "repositoryStorage#maven2")
|
||||
@Named ( "repositoryStorage#maven2")
|
||||
private Maven2RepositoryStorage storage;
|
||||
|
||||
private static final String TEST_REPO_ID = "test";
|
||||
|
@ -93,7 +93,7 @@ public class Maven2RepositoryMetadataResolverMRM1411RepoGroupTest
|
|||
private static final String EMPTY_SHA1 = "da39a3ee5e6b4b0d3255bfef95601890afd80709";
|
||||
|
||||
@Inject
|
||||
@Named (value = "archivaConfiguration#default")
|
||||
@Named ( "archivaConfiguration#default" )
|
||||
private ArchivaConfiguration configuration;
|
||||
|
||||
private WagonFactory wagonFactory;
|
||||
|
|
|
@ -58,14 +58,14 @@ import static org.mockito.Mockito.mock;
|
|||
import static org.mockito.Mockito.when;
|
||||
|
||||
@RunWith ( ArchivaSpringJUnit4ClassRunner.class )
|
||||
@ContextConfiguration ( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
||||
@ContextConfiguration ( { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
||||
public class Maven2RepositoryMetadataResolverMRM1411Test
|
||||
extends TestCase
|
||||
{
|
||||
private static final Filter<String> ALL = new AllFilter<String>();
|
||||
|
||||
@Inject
|
||||
@Named (value = "repositoryStorage#maven2")
|
||||
@Named ( "repositoryStorage#maven2")
|
||||
private Maven2RepositoryStorage storage;
|
||||
|
||||
private static final String TEST_REPO_ID = "test";
|
||||
|
@ -89,7 +89,7 @@ public class Maven2RepositoryMetadataResolverMRM1411Test
|
|||
private static final String EMPTY_SHA1 = "da39a3ee5e6b4b0d3255bfef95601890afd80709";
|
||||
|
||||
@Inject
|
||||
@Named (value = "archivaConfiguration#default")
|
||||
@Named ( "archivaConfiguration#default" )
|
||||
private ArchivaConfiguration configuration;
|
||||
|
||||
private WagonFactory wagonFactory;
|
||||
|
|
|
@ -38,7 +38,7 @@ public class Maven2RepositoryMetadataResolverManagedReleaseTest
|
|||
private static final Filter<String> ALL = new AllFilter<String>();
|
||||
|
||||
@Inject
|
||||
@Named (value = "repositoryStorage#maven2")
|
||||
@Named ( "repositoryStorage#maven2")
|
||||
private Maven2RepositoryStorage storage;
|
||||
|
||||
private static final String TEST_REPO_ID = "test";
|
||||
|
|
|
@ -24,11 +24,8 @@ import org.apache.archiva.metadata.repository.filter.AllFilter;
|
|||
import org.apache.archiva.metadata.repository.filter.Filter;
|
||||
import org.apache.archiva.metadata.repository.storage.ReadMetadataRequest;
|
||||
import org.apache.archiva.metadata.repository.storage.RepositoryStorageRuntimeException;
|
||||
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
@ -39,7 +36,7 @@ public class Maven2RepositoryMetadataResolverManagedSnapshotTest
|
|||
private static final Filter<String> ALL = new AllFilter<String>();
|
||||
|
||||
@Inject
|
||||
@Named (value = "repositoryStorage#maven2")
|
||||
@Named ( "repositoryStorage#maven2")
|
||||
private Maven2RepositoryStorage storage;
|
||||
|
||||
private static final String TEST_REPO_ID = "test";
|
||||
|
|
|
@ -63,14 +63,14 @@ import static org.mockito.Mockito.mock;
|
|||
import static org.mockito.Mockito.when;
|
||||
|
||||
@RunWith ( ArchivaSpringJUnit4ClassRunner.class )
|
||||
@ContextConfiguration ( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
||||
@ContextConfiguration ( { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
||||
public class Maven2RepositoryMetadataResolverTest
|
||||
extends TestCase
|
||||
{
|
||||
private static final Filter<String> ALL = new AllFilter<String>();
|
||||
|
||||
@Inject
|
||||
@Named (value = "repositoryStorage#maven2")
|
||||
@Named ( "repositoryStorage#maven2" )
|
||||
private Maven2RepositoryStorage storage;
|
||||
|
||||
private static final String TEST_REPO_ID = "test";
|
||||
|
@ -94,7 +94,7 @@ public class Maven2RepositoryMetadataResolverTest
|
|||
private static final String EMPTY_SHA1 = "da39a3ee5e6b4b0d3255bfef95601890afd80709";
|
||||
|
||||
@Inject
|
||||
@Named ( value = "archivaConfiguration#default" )
|
||||
@Named ( "archivaConfiguration#default" )
|
||||
protected ArchivaConfiguration configuration;
|
||||
|
||||
private WagonFactory wagonFactory;
|
||||
|
|
|
@ -86,7 +86,7 @@ public class MockWagon
|
|||
}
|
||||
|
||||
@Override
|
||||
public List getFileList( String s )
|
||||
public List<String> getFileList( String s )
|
||||
throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
|
||||
{
|
||||
return null;
|
||||
|
|
|
@ -23,10 +23,7 @@ import org.apache.archiva.admin.model.beans.RemoteRepository;
|
|||
import org.apache.archiva.model.ArtifactReference;
|
||||
import org.apache.archiva.repository.RemoteRepositoryContent;
|
||||
import org.apache.archiva.repository.layout.LayoutException;
|
||||
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
|
||||
import org.junit.Before;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
@ -38,7 +35,7 @@ public class RemoteDefaultRepositoryContentTest
|
|||
extends AbstractDefaultRepositoryContentTestCase
|
||||
{
|
||||
@Inject
|
||||
@Named ( value = "remoteRepositoryContent#default" )
|
||||
@Named ( "remoteRepositoryContent#default" )
|
||||
private RemoteRepositoryContent repoContent;
|
||||
|
||||
@Before
|
||||
|
|
|
@ -37,7 +37,7 @@ public class RemoteLegacyRepositoryContentTest
|
|||
extends AbstractLegacyRepositoryContentTestCase
|
||||
{
|
||||
@Inject
|
||||
@Named( value = "remoteRepositoryContent#legacy" )
|
||||
@Named( "remoteRepositoryContent#legacy" )
|
||||
private RemoteRepositoryContent repoContent;
|
||||
|
||||
@Before
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
|
|||
*
|
||||
*/
|
||||
@RunWith( ArchivaSpringJUnit4ClassRunner.class )
|
||||
@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-no-mock-conf.xml" } )
|
||||
@ContextConfiguration( { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-no-mock-conf.xml" } )
|
||||
public abstract class AbstractRepositoryLayerTestCase
|
||||
{
|
||||
@Rule
|
||||
|
|
|
@ -41,13 +41,13 @@ import static org.junit.Assert.*;
|
|||
*
|
||||
*/
|
||||
@RunWith ( ArchivaSpringJUnit4ClassRunner.class )
|
||||
@ContextConfiguration ( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-no-mock-conf.xml" } )
|
||||
@ContextConfiguration ( { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-no-mock-conf.xml" } )
|
||||
public class LegacyPathParserTest
|
||||
{
|
||||
private LegacyPathParser parser;
|
||||
|
||||
@Inject
|
||||
@Named( value = "archivaConfiguration#default" )
|
||||
@Named( "archivaConfiguration#default" )
|
||||
ArchivaConfiguration config;
|
||||
|
||||
/**
|
||||
|
|
|
@ -40,7 +40,7 @@ import static org.junit.Assert.assertFalse;
|
|||
*
|
||||
*/
|
||||
@RunWith ( ArchivaSpringJUnit4ClassRunner.class )
|
||||
@ContextConfiguration ( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
||||
@ContextConfiguration ( { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
||||
public class ArtifactExtensionMappingTest
|
||||
{
|
||||
private RepositoryPathTranslator pathTranslator = new Maven2RepositoryPathTranslator(
|
||||
|
|
|
@ -38,7 +38,7 @@ import static org.junit.Assert.*;
|
|||
*
|
||||
*/
|
||||
@RunWith ( ArchivaSpringJUnit4ClassRunner.class )
|
||||
@ContextConfiguration ( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
||||
@ContextConfiguration ( { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
||||
public class DefaultPathParserTest
|
||||
{
|
||||
private PathParser parser = new DefaultPathParser();
|
||||
|
|
|
@ -45,7 +45,7 @@ import static org.junit.Assert.*;
|
|||
*/
|
||||
@RunWith ( ArchivaSpringJUnit4ClassRunner.class )
|
||||
@ContextConfiguration (
|
||||
locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-repo-request-test.xml" } )
|
||||
{ "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-repo-request-test.xml" } )
|
||||
public class RepositoryRequestTest
|
||||
{
|
||||
|
||||
|
@ -53,7 +53,7 @@ public class RepositoryRequestTest
|
|||
protected ApplicationContext applicationContext;
|
||||
|
||||
@Inject
|
||||
@Named ( value = "archivaConfiguration#repo-request-test" )
|
||||
@Named ( "archivaConfiguration#repo-request-test" )
|
||||
private ArchivaConfiguration archivaConfiguration;
|
||||
|
||||
private RepositoryRequest repoRequest;
|
||||
|
|
|
@ -34,11 +34,11 @@ import javax.inject.Named;
|
|||
* @author Olivier Lamy
|
||||
*/
|
||||
@RunWith( ArchivaSpringJUnit4ClassRunner.class )
|
||||
@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml" } )
|
||||
@ContextConfiguration( { "classpath*:/META-INF/spring-context.xml" } )
|
||||
public class Maven2RepositoryStorageTest
|
||||
{
|
||||
@Inject
|
||||
@Named( value = "repositoryStorage#maven2" )
|
||||
@Named( "repositoryStorage#maven2" )
|
||||
RepositoryStorage repositoryStorage;
|
||||
|
||||
@Test
|
||||
|
|
|
@ -58,16 +58,16 @@ import static org.junit.Assert.*;
|
|||
* MetadataToolsTest
|
||||
*/
|
||||
@ContextConfiguration (
|
||||
locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-metadata-tools-test.xml" } )
|
||||
{ "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-metadata-tools-test.xml" } )
|
||||
public class MetadataToolsTest
|
||||
extends AbstractRepositoryLayerTestCase
|
||||
{
|
||||
@Inject
|
||||
@Named ( value = "metadataTools#test" )
|
||||
@Named ( "metadataTools#test" )
|
||||
private MetadataTools tools;
|
||||
|
||||
@Inject
|
||||
@Named ( value = "archivaConfiguration#mock" )
|
||||
@Named ( "archivaConfiguration#mock" )
|
||||
protected MockConfiguration config;
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue