fix webapp unit tests with commenting a spring which is not used and override the good one

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1159691 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-08-19 17:15:41 +00:00
parent 23cceb8c62
commit 94faa497ae
7 changed files with 46 additions and 97 deletions

View File

@ -1,63 +0,0 @@
<?xml version="1.0" ?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<component-set>
<components>
<!--
|
| Repository Scanning Task Queue / Executor
|
-->
<component>
<role>org.codehaus.plexus.taskqueue.TaskQueue</role>
<role-hint>repository-scanning</role-hint>
<implementation>org.codehaus.plexus.taskqueue.DefaultTaskQueue</implementation>
<lifecycle-handler>plexus-configurable</lifecycle-handler>
<configuration>
<task-entry-evaluators>
</task-entry-evaluators>
<task-exit-evaluators>
</task-exit-evaluators>
<task-viability-evaluators>
</task-viability-evaluators>
</configuration>
</component>
<component>
<role>org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor</role>
<role-hint>repository-scanning</role-hint>
<implementation>org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor</implementation>
<instantiation-strategy>singleton</instantiation-strategy>
<requirements>
<requirement>
<role>org.codehaus.plexus.taskqueue.execution.TaskExecutor</role>
<role-hint>repository-scanning</role-hint>
</requirement>
<requirement>
<role>org.codehaus.plexus.taskqueue.TaskQueue</role>
<role-hint>repository-scanning</role-hint>
</requirement>
</requirements>
<configuration>
<name>repository-scanning</name>
</configuration>
</component>
</components>
</component-set>

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Licensed to the Apache Software Foundation (ASF) under one ~ Licensed to the Apache Software Foundation (ASF) under one
@ -41,6 +41,10 @@
</bean> </bean>
<alias name="archivaTaskScheduler#repository" alias="scheduler#repository"/> <alias name="archivaTaskScheduler#repository" alias="scheduler#repository"/>
<!--
olamy we can use this if one day we move away from the old plexus stuff :-)
btw comment this as it breaks unit tests in web as depending on classloader loading
it override beans with same name but with type org.codehaus.redback.components.scheduler.DefaultScheduler
<task:scheduler id="scheduler" pool-size="10"/> <task:scheduler id="scheduler" pool-size="10"/>
-->
</beans> </beans>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Licensed to the Apache Software Foundation (ASF) under one ~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file ~ or more contributor license agreements. See the NOTICE file

View File

@ -40,32 +40,6 @@
<alias name="repositoryStatisticsManager#test" alias="repositoryStatisticsManager#default"/> <alias name="repositoryStatisticsManager#test" alias="repositoryStatisticsManager#default"/>
<!--
<component>
<role>org.codehaus.plexus.taskqueue.execution.TaskExecutor</role>
<role-hint>test-repository-scanning</role-hint>
<implementation>org.apache.archiva.scheduler.repository.ArchivaRepositoryScanningTaskExecutor
</implementation>
<requirements>
<requirement>
<role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role>
<field-name>archivaConfiguration</field-name>
<role-hint>test-repository-scanning</role-hint>
</requirement>
<requirement>
<role>org.apache.archiva.repository.scanner.RepositoryScanner</role>
<field-name>repoScanner</field-name>
</requirement>
<requirement>
<role>org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager</role>
</requirement>
<requirement>
<role>org.apache.archiva.metadata.repository.RepositorySessionFactory</role>
</requirement>
</requirements>
</component>
-->
<bean name="archivaConfiguration#test-repository-scanning" class="org.apache.maven.archiva.configuration.DefaultArchivaConfiguration"> <bean name="archivaConfiguration#test-repository-scanning" class="org.apache.maven.archiva.configuration.DefaultArchivaConfiguration">
<property name="registry" ref="registry#test-configured"/> <property name="registry" ref="registry#test-configured"/>
</bean> </bean>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean name="scheduler" class="org.codehaus.redback.components.scheduler.DefaultScheduler">
<property name="properties">
<props>
<prop key="org.quartz.scheduler.instanceName">scheduler1</prop>
<prop key="org.quartz.threadPool.class">org.quartz.simpl.SimpleThreadPool</prop>
<prop key="org.quartz.threadPool.threadCount">2</prop>
<prop key="org.quartz.threadPool.threadPriority">4</prop>
<prop key="org.quartz.jobStore.class">org.quartz.simpl.RAMJobStore</prop>
</props>
</property>
</bean>
</beans>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Licensed to the Apache Software Foundation (ASF) under one ~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file ~ or more contributor license agreements. See the NOTICE file

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Licensed to the Apache Software Foundation (ASF) under one ~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file ~ or more contributor license agreements. See the NOTICE file
@ -40,7 +40,4 @@
</param-value> </param-value>
</context-param> </context-param>
<!--
target/test-classes/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.xml
-->
</web-app> </web-app>