summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-rest
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-10-05 10:23:09 +0000
committerOlivier Lamy <olamy@apache.org>2011-10-05 10:23:09 +0000
commitf260414f76029b20ff79b4ea1b62a1d63772ddc5 (patch)
tree756ca39a85cc931492b154b6b5c2a4f172b6fcd5 /archiva-modules/archiva-web/archiva-rest
parent88923754519cfee87c3a5de71c3b3a2503cd230e (diff)
downloadarchiva-f260414f76029b20ff79b4ea1b62a1d63772ddc5.tar.gz
archiva-f260414f76029b20ff79b4ea1b62a1d63772ddc5.zip
[MRM-1327] implement alternative or improve repository metadata storage: jcr is now default storage mode.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1179142 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml14
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/repository.xml49
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml9
3 files changed, 71 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
index 9bb9fcba5..90f06a75b 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
@@ -226,11 +226,23 @@
<dependency>
<groupId>org.apache.archiva</groupId>
- <artifactId>metadata-store-file</artifactId>
+ <artifactId>metadata-store-jcr</artifactId>
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-core</artifactId>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-repository-admin-default</artifactId>
<scope>test</scope>
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/repository.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/repository.xml
new file mode 100644
index 000000000..0be86ebbd
--- /dev/null
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/repository.xml
@@ -0,0 +1,49 @@
+<!--
+ ~ 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.
+ -->
+
+<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.6//EN"
+ "http://jackrabbit.apache.org/dtd/repository-1.6.dtd">
+
+<Repository>
+ <FileSystem class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"/>
+ <!--<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/repository"/>
+</FileSystem> -->
+ <Security appName="Jackrabbit">
+ <SecurityManager class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" workspaceName="security"/>
+ <AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager"/>
+ <LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule"/>
+ </Security>
+ <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
+ <Workspace name="${wsp.name}">
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${wsp.home}"/>
+ </FileSystem>
+ <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.BundleFsPersistenceManager"/>
+ <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+ <param name="path" value="${wsp.home}/index"/>
+ </SearchIndex>
+ </Workspace>
+ <Versioning rootPath="${rep.home}/version">
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/version"/>
+ </FileSystem>
+ <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.BundleFsPersistenceManager"/>
+ </Versioning>
+</Repository>
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
index fe0be3d31..c96d355c2 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
@@ -62,4 +62,13 @@
<property name="executor" ref="taskExecutor#repository-scanning"/>
<property name="queue" ref="taskQueue#repository-scanning"/>
</bean>
+
+ <bean id="repository" class="org.apache.jackrabbit.core.RepositoryImpl" destroy-method="shutdown">
+ <constructor-arg ref="config"/>
+ </bean>
+ <bean id="config" class="org.apache.jackrabbit.core.config.RepositoryConfig" factory-method="create">
+ <constructor-arg value="${basedir}/src/test/repository.xml"/>
+ <constructor-arg value="${appserver.base}/jcr"/>
+ </bean>
+
</beans> \ No newline at end of file