]> source.dussan.org Git - archiva.git/blob
00b9a6a41e94218ea5462b6c5e913fe284c75ce6
[archiva.git] /
1 <?xml version="1.0"?>
2
3 <!--
4   ~ Licensed to the Apache Software Foundation (ASF) under one
5   ~ or more contributor license agreements.  See the NOTICE file
6   ~ distributed with this work for additional information
7   ~ regarding copyright ownership.  The ASF licenses this file
8   ~ to you under the Apache License, Version 2.0 (the
9   ~ "License"); you may not use this file except in compliance
10   ~ with the License.  You may obtain a copy of the License at
11   ~
12   ~   http://www.apache.org/licenses/LICENSE-2.0
13   ~
14   ~ Unless required by applicable law or agreed to in writing,
15   ~ software distributed under the License is distributed on an
16   ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   ~ KIND, either express or implied.  See the License for the
18   ~ specific language governing permissions and limitations
19   ~ under the License.
20   -->
21 <beans xmlns="http://www.springframework.org/schema/beans"
22        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23        xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
24        xsi:schemaLocation="http://www.springframework.org/schema/beans
25            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
26            http://www.springframework.org/schema/context 
27            http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
28        default-lazy-init="true">
29
30   <context:annotation-config/>
31   <context:component-scan base-package="org.apache.archiva.metadata.repository"/>
32
33   <!-- for testing repo purge using retention count -->
34
35   <bean name="knownRepositoryContentConsumer#repo-purge-consumer-by-retention-count" class="org.apache.archiva.consumers.core.repository.RepositoryPurgeConsumer">
36     <property name="configuration" ref="archivaConfiguration#retention-count"/>
37     <property name="repositoryContentFactory" ref="repositoryContentFactory#retention-count"/>
38     <property name="filetypes" ref="filetypes#retention-count"/>
39   </bean>
40
41   <bean name="archivaConfiguration#retention-count" class="org.apache.archiva.configuration.DefaultArchivaConfiguration">
42     <property name="registry" ref="registry#retention-count"/>
43   </bean>
44
45   <alias name="archivaConfiguration#retention-count" alias="archivaConfiguration"/>
46   <alias name="archivaConfiguration#retention-count" alias="archivaConfiguration#default"/>
47
48   <bean name="repositoryContentFactory#retention-count" class="org.apache.archiva.repository.RepositoryContentFactory">
49     <property name="archivaConfiguration" ref="archivaConfiguration#retention-count"/>
50   </bean>
51
52   <bean name="registry#retention-count" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
53     <property name="initialConfiguration">
54       <value>
55         <![CDATA[
56         <configuration>
57           <xml fileName="${basedir}/src/test/conf/repository-manager.xml"
58                config-name="org.apache.archiva" config-at="org.apache.archiva"/>
59         </configuration>
60         ]]>
61       </value>
62     </property>
63   </bean>
64
65   <bean name="filetypes#retention-count" class="org.apache.archiva.configuration.FileTypes">
66     <property name="archivaConfiguration" ref="archivaConfiguration#retention-count"/>
67   </bean>
68
69   <alias name="filetypes#retention-count" alias="filetypes"/>
70
71   <!-- for testing repo purge by # of days old and delete cleanupSnapshots -->
72   <bean name="knownRepositoryContentConsumer#repo-purge-consumer-by-days-old" class="org.apache.archiva.consumers.core.repository.RepositoryPurgeConsumer">
73     <property name="configuration" ref="archivaConfiguration#days-old"/>
74     <property name="repositoryContentFactory" ref="repositoryContentFactory#days-old"/>
75     <property name="filetypes" ref="filetypes#days-old"/>
76   </bean>
77
78   <bean name="archivaConfiguration#days-old" class="org.apache.archiva.configuration.DefaultArchivaConfiguration">
79     <property name="registry" ref="registry#days-old"/>
80   </bean>
81
82   <bean name="repositoryContentFactory#days-old" class="org.apache.archiva.repository.RepositoryContentFactory">
83     <property name="archivaConfiguration" ref="archivaConfiguration#days-old"/>
84   </bean>
85
86   <bean name="registry#days-old" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
87     <property name="initialConfiguration">
88       <value>
89         <![CDATA[
90         <configuration>
91           <xml fileName="${basedir}/src/test/conf/repository-manager-daysOld.xml"
92                config-name="org.apache.archiva" config-at="org.apache.archiva"/>
93         </configuration>
94         ]]>
95       </value>
96     </property>
97   </bean>
98
99   <bean name="filetypes#days-old" class="org.apache.archiva.configuration.FileTypes">
100     <property name="archivaConfiguration" ref="archivaConfiguration#days-old"/>
101   </bean>
102
103   <bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
104     <property name="initialConfiguration">
105       <value>
106         <![CDATA[
107         <configuration>
108           <system/>
109           <xml fileName="${appserver.base}/conf/archiva.xml" config-forceCreate="true"
110                config-optional="true"
111                config-name="org.apache.archiva.base" config-at="org.apache.archiva"/>
112         </configuration>
113         ]]>
114       </value>
115     </property>
116   </bean>
117
118   <!-- ***
119      JPA settings
120      *** -->
121   <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
122     <property name="jpaVendorAdapter" >
123       <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
124     </property>
125     <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
126     <property name="jpaPropertyMap">
127       <map>
128         <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
129         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
130         <entry key="openjpa.ConnectionUserName" value="sa" />
131         <entry key="openjpa.ConnectionPassword" value="" />
132         <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
133         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
134         <entry key="openjpa.jdbc.MappingDefaults"
135                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
136       </map>
137     </property>
138
139   </bean>
140
141   <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
142     <property name="entityManagerFactory" ref="entityManagerFactory" />
143   </bean>
144
145   <tx:annotation-driven />
146   <!-- ***
147      End of JPA settings
148      *** -->
149
150
151
152 </beans>