summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-05-27 08:59:03 +0000
committerOlivier Lamy <olamy@apache.org>2011-05-27 08:59:03 +0000
commit63af39fba079e8a761209242f4aa7a7f53fb583d (patch)
tree77e213391612462f8b0808e66cbbcc063f568c24 /archiva-modules
parent998a5ac24ed29559ba8526e28dd027bf589b5c12 (diff)
downloadarchiva-63af39fba079e8a761209242f4aa7a7f53fb583d.tar.gz
archiva-63af39fba079e8a761209242f4aa7a7f53fb583d.zip
fix unit tests spring configuration in archiva-scheduler-repository
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1128204 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/pom.xml4
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml23
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutor.java4
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryArchivaTaskScheduler.java3
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java1
-rwxr-xr-xarchiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml3
6 files changed, 13 insertions, 25 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
index 28da53f5a..a3b5a2c66 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
@@ -30,6 +30,10 @@
<name>Archiva Repository Interface Layer</name>
<dependencies>
<dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-model</artifactId>
</dependency>
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
index 37c6e0e87..34756a585 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
@@ -51,27 +51,4 @@
<scope>test</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-metadata</artifactId>
- <executions>
- <execution>
- <id>merge</id>
- <phase>process-resources</phase>
- <goals>
- <goal>merge-metadata</goal>
- </goals>
- <configuration>
- <descriptors>
- <descriptor>${basedir}/src/main/components-fragment.xml</descriptor>
- <descriptor>${project.build.outputDirectory}/META-INF/plexus/components.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
</project>
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 ba02ba324..5096ff2c2 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
@@ -44,13 +44,14 @@ import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
+import javax.inject.Named;
import java.util.Date;
/**
* ArchivaRepositoryScanningTaskExecutor
*
* @version $Id$
- * @plexus.component role="org.codehaus.plexus.taskqueue.execution.TaskExecutor"
+ * plexus.component role="org.codehaus.plexus.taskqueue.execution.TaskExecutor"
* role-hint="repository-scanning"
*/
@Service("taskExecutor#repository-scanning")
@@ -63,6 +64,7 @@ public class ArchivaRepositoryScanningTaskExecutor
* plexus.requirement
*/
@Inject
+ @Named(value="archivaConfiguration#default")
private ArchivaConfiguration archivaConfiguration;
/**
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryArchivaTaskScheduler.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryArchivaTaskScheduler.java
index 3d2ca43bf..08ed231dc 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryArchivaTaskScheduler.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryArchivaTaskScheduler.java
@@ -57,7 +57,7 @@ import java.util.Set;
/**
* Default implementation of a scheduling component for archiva.
*
- * @plexus.component role="org.apache.archiva.scheduler.ArchivaTaskScheduler" role-hint="repository"
+ * plexus.component role="org.apache.archiva.scheduler.ArchivaTaskScheduler" role-hint="repository"
*/
@Service("archivaTaskScheduler#repository")
public class RepositoryArchivaTaskScheduler
@@ -87,6 +87,7 @@ public class RepositoryArchivaTaskScheduler
* plexus.requirement
*/
@Inject
+ @Named(value = "repositoryStatisticsManager#default")
private RepositoryStatisticsManager repositoryStatisticsManager;
/**
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java
index 11fc932ec..cb4a94356 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java
@@ -65,6 +65,7 @@ public class ArchivaRepositoryScanningTaskExecutorTest
private ArchivaConfiguration archivaConfig;
@Inject
+ @Named(value = "repositoryStatisticsManager#test")
private RepositoryStatisticsManager repositoryStatisticsManager;
@Inject
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml
index dbff90ffd..35596bb60 100755
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml
@@ -38,6 +38,8 @@
<property name="archivaConfiguration" ref="archivaConfiguration#test-repository-scanning"/>
</bean>
+ <alias name="repositoryStatisticsManager#test" alias="repositoryStatisticsManager#default"/>
+
<!--
<component>
<role>org.codehaus.plexus.taskqueue.execution.TaskExecutor</role>
@@ -81,5 +83,6 @@
</value>
</property>
</bean>
+ <alias name="archivaConfiguration#test-repository-scanning" alias="archivaConfiguration#default"/>
</beans> \ No newline at end of file