]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1327] set JCR as default repository
authorBrett Porter <brett@apache.org>
Thu, 20 Jan 2011 04:48:01 +0000 (04:48 +0000)
committerBrett Porter <brett@apache.org>
Thu, 20 Jan 2011 04:48:01 +0000 (04:48 +0000)
Merged from: r1053790, 1053808

git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1327-jcr-backend-default@1061123 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/pom.xml
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml

index 778230519f9f7a86d499efed8682c7cf80595ff9..3899dfb7cfd1cfd0145a6cdb87eeed8227d2c3ce 100644 (file)
     </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
-      <artifactId>metadata-repository-file</artifactId>
+      <artifactId>metadata-store-jcr</artifactId>
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-core</artifactId>
+      <version>${jackrabbit.version}</version>
+      <scope>runtime</scope>
+      <!-- FIXME: exclude dependencies that aren't needed -->
+    </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
       <!--  FIXME: temporary coupling to plugin, should be runtime -->
index 6cf66939ea4394f37788de9019fdb0ea32affaef..aabbe9be70c89b2d11b9075e6863e96c4f1b065c 100644 (file)
@@ -7,7 +7,15 @@
   <bean id="loggerManager" class="org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager"
         init-method="initialize"/>
 
-  <alias name="repositorySessionFactory#file" alias="repositorySessionFactory"/>
+  <alias name="repositorySessionFactory#jcr" alias="repositorySessionFactory"/>
+  <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">
+    <!-- FIXME: better arguments needed? -->
+    <constructor-arg value="${appserver.base}/conf/repository.xml"/>
+    <constructor-arg value="${appserver.base}/data/jcr"/>
+  </bean>
 
   <bean name="wagon#http" class="org.apache.maven.wagon.providers.http.LightweightHttpWagon" scope="prototype">
     <property name="httpHeaders">