diff options
-rw-r--r-- | archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/AbstractDefaultRepositoryContentTestCase.java | 2 | ||||
-rwxr-xr-x | archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/conf/MockConfiguration.java (renamed from archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/MockConfiguration.java) | 3 | ||||
-rw-r--r-- | archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/AbstractRepositoryLayerTestCase.java | 2 | ||||
-rw-r--r-- | archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/metadata/MetadataToolsTest.java | 2 | ||||
-rw-r--r-- | archiva-modules/plugins/maven2-repository/src/test/resources/spring-context-metadata-tools-test.xml | 2 | ||||
-rw-r--r-- | archiva-modules/plugins/maven2-repository/src/test/resources/spring-context-no-mock-conf.xml | 6 |
6 files changed, 9 insertions, 8 deletions
diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/AbstractDefaultRepositoryContentTestCase.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/AbstractDefaultRepositoryContentTestCase.java index cf998b63e..fb425badc 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/AbstractDefaultRepositoryContentTestCase.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/AbstractDefaultRepositoryContentTestCase.java @@ -33,8 +33,6 @@ import static org.junit.Assert.*; /** * AbstractDefaultRepositoryContentTestCase */ -@RunWith ( ArchivaSpringJUnit4ClassRunner.class ) -@ContextConfiguration ( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-no-mock-conf.xml" } ) public abstract class AbstractDefaultRepositoryContentTestCase extends AbstractRepositoryLayerTestCase { diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/MockConfiguration.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/conf/MockConfiguration.java index 5137f2ed6..db6285207 100755 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/MockConfiguration.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/conf/MockConfiguration.java @@ -1,4 +1,4 @@ -package org.apache.archiva.repository; +package org.apache.archiva.metadata.repository.storage.maven2.conf; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -40,6 +40,7 @@ import java.util.Set; public class MockConfiguration implements ArchivaConfiguration { + private Configuration configuration = new Configuration(); private Set<RegistryListener> registryListeners = new HashSet<RegistryListener>(); 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 ee0606c88..ec52fb4be 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 @@ -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.xml" } ) +@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-no-mock-conf.xml" } ) public abstract class AbstractRepositoryLayerTestCase { @Rule 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 e33f2daac..baa103946 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 @@ -30,7 +30,7 @@ import org.apache.archiva.policies.ReleasesPolicy; import org.apache.archiva.policies.SnapshotsPolicy; import org.apache.archiva.repository.AbstractRepositoryLayerTestCase; import org.apache.archiva.repository.ManagedRepositoryContent; -import org.apache.archiva.repository.MockConfiguration; +import org.apache.archiva.metadata.repository.storage.maven2.conf.MockConfiguration; import org.apache.archiva.repository.RemoteRepositoryContent; import org.apache.archiva.repository.layout.LayoutException; import org.apache.commons.io.FileUtils; 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 90b8da13e..60989a3d7 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 @@ -27,7 +27,7 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd" default-lazy-init="true"> - <bean name="archivaConfiguration#mock" class="org.apache.archiva.repository.MockConfiguration"/> + <bean name="archivaConfiguration#mock" class="org.apache.archiva.metadata.repository.storage.maven2.conf.MockConfiguration"/> <alias name="archivaConfiguration#mock" alias="archivaConfiguration#default"/> <bean name="metadataTools#test" class="org.apache.archiva.repository.metadata.MetadataTools"> <property name="configuration" ref="archivaConfiguration#mock"/> diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/spring-context-no-mock-conf.xml b/archiva-modules/plugins/maven2-repository/src/test/resources/spring-context-no-mock-conf.xml index 98df63617..f4d78908d 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/resources/spring-context-no-mock-conf.xml +++ b/archiva-modules/plugins/maven2-repository/src/test/resources/spring-context-no-mock-conf.xml @@ -25,6 +25,8 @@ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> - <alias name="archivaConfiguration#mock" alias="archivaConfiguration#default"/> - <alias name="archivaConfiguration#mock" alias="archivaConfiguration#test"/> + + <context:annotation-config/> + <context:component-scan base-package="org.apache.archiva.metadata.repository.storage.maven2.conf"/> + </beans>
\ No newline at end of file |