You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by cl...@apache.org on 2007/08/17 00:03:34 UTC
svn commit: r566871 - in
/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test:
java/org/apache/jackrabbit/ocm/repository/ test-config/
Author: clombart
Date: Thu Aug 16 15:03:33 2007
New Revision: 566871
URL: http://svn.apache.org/viewvc?view=rev&rev=566871
Log:
Use only one repository setting for the unit tests. Use derby as default setting.
Update the derby repository xml config.
Removed:
jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/test-config/repository-bdb.xml
jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/test-config/repository-xml.xml
Modified:
jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/repository/RepositoryUtilTest.java
jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/test-config/repository-derby.xml
Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/repository/RepositoryUtilTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/repository/RepositoryUtilTest.java?view=diff&rev=566871&r1=566870&r2=566871
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/repository/RepositoryUtilTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/repository/RepositoryUtilTest.java Thu Aug 16 15:03:33 2007
@@ -74,7 +74,7 @@
return new TestSetup(suite) {
protected void setUp() throws Exception {
super.setUp();
- RepositoryUtil.registerRepository("repositoryTest", "./src/test/test-config/repository-xml.xml", "target/repository");
+ RepositoryUtil.registerRepository("repositoryTest", "./src/test/test-config/repository-derby.xml", "target/repository");
}
protected void tearDown() throws Exception {
Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/test-config/repository-derby.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/test-config/repository-derby.xml?view=diff&rev=566871&r1=566870&r2=566871
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/test-config/repository-derby.xml (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/test-config/repository-derby.xml Thu Aug 16 15:03:33 2007
@@ -1,130 +1,22 @@
<?xml version="1.0"?>
-<!DOCTYPE Repository [
- <!--
- the Repository element configures a repository instance;
- individual workspaces of the repository are configured through
- separate configuration files called workspace.xml which are
- located in a subfolder of the workspaces root directory
- (see Workspaces element).
-
- it consists of
-
- a FileSystem element (the virtual file system
- used by the repository to persist global state such as
- registered namespaces, custom node types, etc..
-
- a Security element that specifies the name of the app-entry
- in the JAAS config and the access manager
-
- a Workspaces element that specifies to the location of
- workspaces root directory and the name of default workspace
-
- a Workspace element that is used as a workspace configuration
- template; it is used to create the initial workspace if there's
- no workspace yet and for creating additional workspaces through
- the api
-
- a SearchIndex element that is used for configuring per workspace
- Indexing-related settings
-
- a Versioning element that is used for configuring
- versioning-related settings
- -->
- <!ELEMENT Repository (FileSystem,Security,Workspaces,Workspace,Versioning)>
-
- <!--
- a virtual file system
- -->
- <!ELEMENT FileSystem (param*)>
- <!ATTLIST FileSystem
- class CDATA #REQUIRED>
-
- <!--
- the Security element specifies the name (appName attribute)
- of the JAAS configuration app-entry for this repository.
-
- it also specifies the access manager to be used (AccessManager element).
- -->
- <!ELEMENT Security (AccessManager, LoginModule?)>
- <!ATTLIST Security
- appName CDATA #REQUIRED>
-
- <!--
- the AccessManager element configures the access manager to be used by
- this repository instance; the class attribute specifies the FQN of the
- class implementing the AccessManager interface
- -->
- <!ELEMENT AccessManager (param*)>
- <!ATTLIST AccessManager
- class CDATA #REQUIRED>
-
- <!--
- generic parameter (name/value pair)
- -->
- <!ELEMENT param EMPTY>
- <!ATTLIST param
- name CDATA #REQUIRED
- value CDATA #REQUIRED>
-
- <!--
- the LoginModule element optionally specifies a JAAS login module to
- authenticate users. This feature allows the use of Jackrabbit in a
- non-JAAS environment.
- -->
- <!ELEMENT LoginModule (param*)>
- <!ATTLIST LoginModule
- class CDATA #REQUIRED>
-
- <!--
- the Workspaces element specifies the workspaces root directory
- (rootPath attribute) and the name of the default workspace
- (defaultWorkspace attribute).
-
- individual workspaces are configured through individual workspace.xml
- files located in a subfolder each of the workspaces root directory.
- -->
- <!ELEMENT Workspaces EMPTY>
- <!ATTLIST Workspaces
- rootPath CDATA #REQUIRED
- defaultWorkspace CDATA #REQUIRED>
-
- <!--
- the Workspace element serves as a workspace configuration template;
- it is used to create the initial workspace if there's no workspace yet
- and for creating additional workspaces through the api
- -->
- <!ELEMENT Workspace (FileSystem,PersistenceManager,SearchIndex?)>
- <!ATTLIST Workspace
- name CDATA #REQUIRED>
-
- <!--
- the PersistenceManager element configures the persistence manager
- to be used for the workspace; the class attribute specifies the
- FQN of the class implementing the PersistenceManager interface
- -->
- <!ELEMENT PersistenceManager (param*)>
- <!ATTLIST PersistenceManager
- class CDATA #REQUIRED>
-
- <!--
- the SearchIndex element specifies the locaction of the search index
- (used by the QueryHandler); the class attribute specifies the
- FQN of the class implementing the QueryHandler interface.
- -->
- <!ELEMENT SearchIndex (param*,FileSystem?)>
- <!ATTLIST SearchIndex
- class CDATA #REQUIRED>
-
- <!--
- the Versioning element configures the persistence manager
- to be used for persisting version state
- -->
- <!ELEMENT Versioning (FileSystem, PersistenceManager)>
- <!ATTLIST Versioning
- rootPath CDATA #REQUIRED
- >
-]>
-<!-- Example Repository Configuration File -->
+<!--
+ 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.2//EN"
+ "http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
<Repository>
<!--
virtual file system where the repository stores global state
@@ -149,6 +41,11 @@
<LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
<!-- anonymous user name ('anonymous' is the default value) -->
<param name="anonymousId" value="anonymous"/>
+ <!--
+ default user name to be used instead of the anonymous user
+ when no login credentials are provided (unset by default)
+ -->
+ <param name="defaultUserId" value="superuser"/>
</LoginModule>
</Security>
@@ -160,7 +57,7 @@
workspace configuration template:
used to create the initial workspace if there's no workspace yet
-->
- <Workspace name="${wsp.name}">
+ <Workspace name="Jackrabbit Core">
<!--
virtual file system of the workspace:
class: FQN of class implementing the FileSystem interface
@@ -172,9 +69,9 @@
persistence manager of the workspace:
class: FQN of class implementing the PersistenceManager interface
-->
- <PersistenceManager class="org.apache.jackrabbit.core.state.db.DerbyPersistenceManager">
+ <PersistenceManager class="org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager">
<param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
- <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+ <param name="schemaObjectPrefix" value="Jackrabbit Core_"/>
</PersistenceManager>
<!--
Search index and the file system it uses.
@@ -196,17 +93,25 @@
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/version" />
</FileSystem>
-
+
<!--
Configures the persistence manager to be used for persisting version state.
Please note that the current versioning implementation is based on
a 'normal' persistence manager, but this could change in future
implementations.
-->
- <PersistenceManager class="org.apache.jackrabbit.core.state.db.DerbyPersistenceManager">
+ <PersistenceManager class="org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager">
<param name="url" value="jdbc:derby:${rep.home}/version/db;create=true"/>
<param name="schemaObjectPrefix" value="version_"/>
</PersistenceManager>
-
</Versioning>
+
+ <!--
+ Search index for content that is shared repository wide
+ (/jcr:system tree, contains mainly versions)
+ -->
+ <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+ <param name="path" value="${rep.home}/repository/index"/>
+ </SearchIndex>
</Repository>
+