mirror of https://github.com/apache/archiva.git
start fixing spring configuration for unit test in archiva-webdav
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1133115 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9c55823b96
commit
9b142e861d
|
@ -150,4 +150,17 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<appserver.base>${project.build.outputDirectory}</appserver.base>
|
||||||
|
</systemPropertyVariables>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -28,18 +28,15 @@
|
||||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
|
|
||||||
<context-param>
|
|
||||||
<param-name>contextClass</param-name>
|
|
||||||
<param-value>org.codehaus.plexus.spring.PlexusWebApplicationContext</param-value>
|
|
||||||
</context-param>
|
|
||||||
|
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>contextConfigLocation</param-name>
|
<param-name>contextConfigLocation</param-name>
|
||||||
<param-value>
|
<param-value>
|
||||||
classpath*:/META-INF/plexus/components.xml
|
|
||||||
classpath*:/META-INF/spring-context.xml
|
classpath*:/META-INF/spring-context.xml
|
||||||
target/test-classes/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.xml
|
|
||||||
</param-value>
|
</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
target/test-classes/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.xml
|
||||||
|
-->
|
||||||
</web-app>
|
</web-app>
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||||
default-lazy-init="true">
|
default-lazy-init="true">
|
||||||
|
|
||||||
|
<context:property-placeholder system-properties-mode="OVERRIDE"/>
|
||||||
|
|
||||||
<context:annotation-config/>
|
<context:annotation-config/>
|
||||||
<context:component-scan base-package="org.apache.maven.archiva.webdav,org.apache.archiva.metadata.repository"/>
|
<context:component-scan base-package="org.apache.maven.archiva.webdav,org.apache.archiva.metadata.repository"/>
|
||||||
|
|
||||||
|
@ -42,4 +44,27 @@
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean name="servletAuthenticator" class="org.apache.maven.archiva.webdav.MockServletAuthenticator"/>
|
||||||
|
|
||||||
|
<bean name="archivaConfiguration#default" class="org.apache.maven.archiva.configuration.DefaultArchivaConfiguration">
|
||||||
|
<property name="registry" ref="registry#default"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<alias name="archivaConfiguration#default" alias="archivaConfiguration"/>
|
||||||
|
|
||||||
|
<bean name="registry#default" class="org.codehaus.redback.components.registry.commons.CommonsConfigurationRegistry">
|
||||||
|
<property name="properties">
|
||||||
|
<value>
|
||||||
|
<![CDATA[
|
||||||
|
<configuration>
|
||||||
|
<system/>
|
||||||
|
<xml fileName="${appserver.base}/conf/archiva.xml" config-forceCreate="true"
|
||||||
|
config-optional="true"
|
||||||
|
config-name="org.apache.maven.archiva.base" config-at="org.apache.maven.archiva"/>
|
||||||
|
</configuration>
|
||||||
|
]]>
|
||||||
|
</value>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
Loading…
Reference in New Issue