the repository session factory is now configurable via a sysprops

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1582199 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2014-03-27 06:02:01 +00:00
parent bb79c82aab
commit 1601891042
3 changed files with 30 additions and 11 deletions

View File

@ -19,4 +19,4 @@
user.agent=Apache Archiva/${project.version}
archiva.version=${project.version}
archiva.buildNumber=${buildNumber}
archiva.timestamp=${timestamp}
archiva.timestamp=${timestamp}

View File

@ -42,6 +42,7 @@
<test.useTomcat>false</test.useTomcat>
<archiva.groupIndexTtl>30</archiva.groupIndexTtl>
<archiva.sirona.configuration />
<archiva.repositorySessionFactory.id>jcr</archiva.repositorySessionFactory.id>
</properties>
<dependencies>
@ -124,12 +125,17 @@
<groupId>org.apache.archiva</groupId>
<artifactId>metadata-store-jcr</artifactId>
</dependency>
<!--
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>metadata-store-cassandra</artifactId>
</dependency>
-->
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>metadata-store-file</artifactId>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
@ -1005,6 +1011,7 @@
<archiva.logMissingI18n>${archiva.logMissingI18n}</archiva.logMissingI18n>
<cassandra.host>localhost</cassandra.host>
<cassandra.port>9160</cassandra.port>
<archiva.repositorySessionFactory.id>${archiva.repositorySessionFactory.id}</archiva.repositorySessionFactory.id>
<org.apache.sirona.configuration.sirona.properties>${archiva.sirona.configuration}</org.apache.sirona.configuration.sirona.properties>
</systemProperties>
<additionalClasspathDirs>
@ -1090,4 +1097,13 @@
</plugins>
</build>
<profiles>
<profile>
<id>cassandra</id>
<properties>
<archiva.repositorySessionFactory.id>cassandra</archiva.repositorySessionFactory.id>
</properties>
</profile>
</profiles>
</project>

View File

@ -20,26 +20,29 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:task="http://www.springframework.org/schema/task" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
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
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-3.0.xsd">
http://www.springframework.org/schema/task/spring-task-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<context:property-placeholder location="classpath:application.properties"/>
<context:property-placeholder location="classpath:application.properties" />
<alias name="userConfiguration#archiva" alias="userConfiguration#default" />
<alias name="authorizer#rbac" alias="authorizer#default"/>
<alias name="repositoryStatisticsManager#default" alias="repositoryStatisticsManager"/>
<!-- TODO olamy need to find a more dynamic way if using jcr impl -->
<alias name="repositorySessionFactory#jcr" alias="repositorySessionFactory"/>
<!--
<alias name="repositorySessionFactory#cassandra" alias="repositorySessionFactory"/>
-->
<!-- so can be override with -Darchiva.repositorySessionFactory.id= jcr or cassandra or file -->
<bean name="repositorySessionFactory" class="org.apache.archiva.web.startup.RepositorySessionFactoryBean">
<constructor-arg>
<util:properties location="classpath:archiva-runtime.properties" local-override="true"/>
</constructor-arg>
</bean>
<alias name="environmentCheck#archiva-locked-admin-check" alias="environmentCheck#locked-admin-check"/>
<alias name="userManager#archiva" alias="userManager#default"/>