jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r377682 - in /incubator/jackrabbit/trunk/contrib/tck-candidate: ./ resources/ resources/testdata/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/jackrabbit/ src/main/java/org/apache/jackr...
Date Tue, 14 Feb 2006 10:18:34 GMT
Author: mreutegg
Date: Tue Feb 14 02:18:30 2006
New Revision: 377682

URL: http://svn.apache.org/viewcvs?rev=377682&view=rev
Log:
Jackrabbit web application that can be deployed and run in TCK with zero-config.

Added:
    incubator/jackrabbit/trunk/contrib/tck-candidate/   (with props)
    incubator/jackrabbit/trunk/contrib/tck-candidate/README.txt   (with props)
    incubator/jackrabbit/trunk/contrib/tck-candidate/maven.xml   (with props)
    incubator/jackrabbit/trunk/contrib/tck-candidate/project.properties   (with props)
    incubator/jackrabbit/trunk/contrib/tck-candidate/project.xml   (with props)
    incubator/jackrabbit/trunk/contrib/tck-candidate/resources/   (with props)
    incubator/jackrabbit/trunk/contrib/tck-candidate/resources/testdata/
    incubator/jackrabbit/trunk/contrib/tck-candidate/resources/testdata/testdata.xml   (with props)
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/RepositorySetup.java   (with props)
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/RepositoryStartupServlet.java   (with props)
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/log4j.properties   (with props)
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/repository.xml   (with props)
    incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/web.xml   (with props)

Propchange: incubator/jackrabbit/trunk/contrib/tck-candidate/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Feb 14 02:18:30 2006
@@ -0,0 +1,4 @@
+*.iml
+*.ipr
+*.iws
+target

Added: incubator/jackrabbit/trunk/contrib/tck-candidate/README.txt
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-candidate/README.txt?rev=377682&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-candidate/README.txt (added)
+++ incubator/jackrabbit/trunk/contrib/tck-candidate/README.txt Tue Feb 14 02:18:30 2006
@@ -0,0 +1,13 @@
+This contribution builds a Web Application that starts a
+Jackrabbit repository and registers it in JNDI.
+
+On startup the repository is initialized with namespaces,
+node types and test content that is required to run the
+JSR-170 TCK on Jackrabbit.
+
+In order to run the TCK with this war file follow these steps:
+
+1) delete folder <tck-install>/bin/tck-webapp/jackrabbit
+2) delete folder <tck-install>/bin/tck-webapp/webapps/test-candidate
+3) copy target/tck-candidate.war to <tck-install>/bin/tck-webapp/webapps
+4) start <tck-install>/bin/tck-webapp/server.bat
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/tck-candidate/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-candidate/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-candidate/maven.xml?rev=377682&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-candidate/maven.xml (added)
+++ incubator/jackrabbit/trunk/contrib/tck-candidate/maven.xml Tue Feb 14 02:18:30 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!--
+   Copyright 2004-2005 The Apache Software Foundation or its licensors,
+                       as applicable.
+
+   Licensed 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.
+  -->
+<project 
+        default="war:war" 
+        xmlns:m="jelly:maven"
+        xmlns:ant="jelly:ant"
+        xmlns:j="jelly:core">
+
+     <postGoal name="war:webapp">
+         <ant:copy file="resources/nodetypes/custom_nodetypes.xml" todir="target/${pom.artifactId}/WEB-INF/classes" />
+         <ant:copy file="resources/testdata/testdata.xml" todir="target/${pom.artifactId}/WEB-INF/classes" />
+     </postGoal>
+</project>

Propchange: incubator/jackrabbit/trunk/contrib/tck-candidate/maven.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-candidate/project.properties
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-candidate/project.properties?rev=377682&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-candidate/project.properties (added)
+++ incubator/jackrabbit/trunk/contrib/tck-candidate/project.properties Tue Feb 14 02:18:30 2006
@@ -0,0 +1,7 @@
+# ------------------------------------------------------------------------
+maven.repo.remote = http://www.ibiblio.org/maven/,http://www.day.com/maven/
+maven.test.skip = true
+
+# force to compile for java 1.4
+maven.compile.source=1.4
+maven.compile.target=1.4

Propchange: incubator/jackrabbit/trunk/contrib/tck-candidate/project.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-candidate/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-candidate/project.xml?rev=377682&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-candidate/project.xml (added)
+++ incubator/jackrabbit/trunk/contrib/tck-candidate/project.xml Tue Feb 14 02:18:30 2006
@@ -0,0 +1,134 @@
+<?xml version="1.0"?>
+<!--
+   Copyright 2004-2006 The Apache Software Foundation or its licensors,
+                       as applicable.
+
+   Licensed 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.
+  -->
+<project>
+    <!-- ====================================================================== -->
+    <!-- P R O J E C T  D E S C R I P T I O N                                   -->
+    <!-- ====================================================================== -->
+    <id>tck-candidate</id>
+    <name>Jackrabbit TCK test candidate Web Application</name>
+    <currentVersion>1.0-SNAPSHOT</currentVersion>
+
+
+    <!-- ====================================================================== -->
+    <!-- D E P E N D E N C I E S                                                -->
+    <!-- ====================================================================== -->
+    <dependencies>
+
+        <!-- dependencies from jackrabbit that we want to bundle -->
+        <dependency>
+            <groupId>concurrent</groupId>
+            <artifactId>concurrent</artifactId>
+            <version>1.3.4</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+        <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+            <version>3.1</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+        <dependency>
+            <groupId>lucene</groupId>
+            <artifactId>lucene</artifactId>
+            <version>1.4.3</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+        <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>2.6.2</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>3.8.1</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.8</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+
+        <!-- jcr -->    
+        <dependency>
+            <groupId>jsr170</groupId>
+            <artifactId>jcr</artifactId>
+            <version>1.0</version>
+        </dependency>
+        <!-- dependencies from jcr that we want to bundle -->
+        <dependency>
+            <groupId>org.apache.jackrabbit</groupId>
+            <artifactId>jackrabbit</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derby</artifactId>
+            <version>10.1.1.0</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+
+    
+        <!-- own dependencies (build only) -->
+        <dependency>
+            <groupId>servletapi</groupId>
+            <artifactId>servletapi</artifactId>
+            <version>2.3</version>
+        </dependency>
+    
+     </dependencies>
+
+    <!-- ====================================================================== -->
+    <!-- B U I L D  D E S C R I P T I O N                                       -->
+    <!-- ====================================================================== -->
+    <build>
+        <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
+        <resources>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*.xml</include>
+                    <include>**/*.txt</include>
+                    <include>**/*.xsd</include>
+                    <include>**/*.properties</include>
+                    <include>**/*.dtd</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+</project>

Propchange: incubator/jackrabbit/trunk/contrib/tck-candidate/project.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/tck-candidate/resources/
------------------------------------------------------------------------------
--- svn:externals (added)
+++ svn:externals Tue Feb 14 02:18:30 2006
@@ -0,0 +1 @@
+nodetypes https://svn.apache.org/repos/asf/incubator/jackrabbit/trunk/jackrabbit/applications/test/repository/nodetypes

Added: incubator/jackrabbit/trunk/contrib/tck-candidate/resources/testdata/testdata.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-candidate/resources/testdata/testdata.xml?rev=377682&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-candidate/resources/testdata/testdata.xml (added)
+++ incubator/jackrabbit/trunk/contrib/tck-candidate/resources/testdata/testdata.xml Tue Feb 14 02:18:30 2006
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sv:node sv:name="testdata" xmlns:docview012="www.apache.org/jackrabbit/test/namespaceImportTest012" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:docview01="www.apache.org/jackrabbit/test/namespaceImportTest01" xmlns:crx="http://www.day.com/crx/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:rep="internal" xmlns:test="http://www.apache.org/jackrabbit/test" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:docview0="www.apache.org/jackrabbit/test/namespaceImportTest0" xmlns:docview="www.apache.org/jackrabbit/test/namespaceImportTest" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2004/10/xpath-functions" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns="" xmlns:tst="www.apache.org/jackrabbit/test/namespaceRegistryTest"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:node sv:name="query"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><s
 v:node sv:name="node1"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="prop1" sv:type="String"><sv:value>You can have it good, cheap, or fast. Any two.</sv:value></sv:property></sv:node><sv:node sv:name="node1"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="prop1" sv:type="String"><sv:value>foo bar</sv:value></sv:property></sv:node><sv:node sv:name="node1"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="prop1" sv:type="String"><sv:value>Hello world!</sv:value></sv:property></sv:node><sv:node sv:name="node2"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="prop1" sv:type="String"><sv:value>Apache Jackrabbit</sv:value></sv:property></sv:node></sv:node><sv:node sv:name="n
 ode"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:node sv:name="myResource"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:resource</sv:value></sv:property><sv:property sv:name="jcr:uuid" sv:type="String"><sv:value>2cdd6e03-cdd2-4d02-a7a7-c29ef60298e3</sv:value></sv:property><sv:property sv:name="jcr:encoding" sv:type="String"><sv:value>UTF-8</sv:value></sv:property><sv:property sv:name="jcr:data" sv:type="Binary"><sv:value>SGVsbG8gd8O2cmxkLg==</sv:value></sv:property><sv:property sv:name="jcr:mimeType" sv:type="String"><sv:value>text/plain</sv:value></sv:property><sv:property sv:name="jcr:lastModified" sv:type="Date"><sv:value>2005-05-17T12:13:50.238+02:00</sv:value></sv:property></sv:node><sv:node sv:name="reference"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="jcr:mixinTypes" sv:type="Name"><sv:value>mix:refere
 nceable</sv:value></sv:property><sv:property sv:name="jcr:uuid" sv:type="String"><sv:value>e5621200-46b4-4c6f-969b-8ffccca9cae2</sv:value></sv:property><sv:property sv:name="ref" sv:type="Reference"><sv:value>2cdd6e03-cdd2-4d02-a7a7-c29ef60298e3</sv:value></sv:property></sv:node><sv:node sv:name="multiReference"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="ref" sv:type="Reference"><sv:value>2cdd6e03-cdd2-4d02-a7a7-c29ef60298e3</sv:value><sv:value>e5621200-46b4-4c6f-969b-8ffccca9cae2</sv:value></sv:property></sv:node></sv:node><sv:node sv:name="property"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="long" sv:type="Long"><sv:value>90834953485278298</sv:value></sv:property><sv:property sv:name="calendar" sv:type="Date"><sv:value>2005-07-18T17:30:50.368+02:00</sv:value></sv:property><sv:property sv:name="double" sv:type=
 "Double"><sv:value>3.141592653589793</sv:value></sv:property><sv:property sv:name="boolean" sv:type="Boolean"><sv:value>true</sv:value></sv:property><sv:property sv:name="path" sv:type="Path"><sv:value>/</sv:value></sv:property><sv:property sv:name="multi" sv:type="String"><sv:value>one</sv:value><sv:value>two</sv:value><sv:value>three</sv:value></sv:property></sv:node><sv:node sv:name="docViewTest"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:node sv:name="invalidXmlName"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="propName" sv:type="String"><sv:value>some text</sv:value></sv:property></sv:node><sv:node sv:name="jcr:xmltext"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="jcr:xmlcharacters" sv:type="String"><sv:value>A text without any special character.<
 /sv:value></sv:property></sv:node><sv:node sv:name="some-element"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property></sv:node><sv:node sv:name="jcr:xmltext"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="jcr:xmlcharacters" sv:type="String"><sv:value> The entity reference characters: &lt;, ', ,&amp;, &gt;,  " should be escaped in xml export. </sv:value></sv:property></sv:node><sv:node sv:name="some-element"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property></sv:node><sv:node sv:name="jcr:xmltext"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="jcr:xmlcharacters" sv:type="String"><sv:value>A text without any special character.</sv:value></sv:property></sv:node><sv:node sv:name="bigNode"><sv:property sv:name="jcr:prim
 aryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="propName3" sv:type="String"><sv:value>text 1</sv:value></sv:property><sv:property sv:name="propName1" sv:type="String"><sv:value>text 1</sv:value></sv:property><sv:property sv:name="propName2" sv:type="String"><sv:value>multival text 1</sv:value><sv:value>multival text 2</sv:value><sv:value>multival text 3</sv:value></sv:property><sv:property sv:name="propName0" sv:type="Binary"><sv:value>U0dWc2JHOGdkOE8yY214a0xnPT0=</sv:value><sv:value>U0dWc2JHOGdkOE8yY214a0xnPT0=</sv:value></sv:property></sv:node><sv:node sv:name="validNames"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:node sv:name="validMultiNoBin"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="propName" sv:type="String"><sv:value>multival text 1</sv:value><sv:value>multival text 2</sv:v
 alue><sv:value>multival text 3</sv:value></sv:property></sv:node><sv:node sv:name="validMultiBin"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="jcrData" sv:type="Binary"><sv:value>U0dWc2JHOGdkOE8yY214a0xnPT0=</sv:value><sv:value>U0dWc2JHOGdkOE8yY214a0xnPT0=</sv:value></sv:property><sv:property sv:name="jcr:encoding" sv:type="String"><sv:value>UTF-8</sv:value></sv:property><sv:property sv:name="jcr:mimeType" sv:type="String"><sv:value>text/plain</sv:value></sv:property><sv:property sv:name="jcr:lastModified" sv:type="Date"><sv:value>2005-05-17T12:13:50.458+02:00</sv:value></sv:property></sv:node><sv:node sv:name="validNoBin"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="propName" sv:type="String"><sv:value>text 1</sv:value></sv:property></sv:node><sv:node sv:name="validBin"><sv:property sv:name="jcr:primaryType" sv:typ
 e="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="jcrData" sv:type="Binary"><sv:value>SGVsbG8gd8O2cmxkLg==</sv:value></sv:property><sv:property sv:name="jcr:encoding" sv:type="String"><sv:value>UTF-8</sv:value></sv:property><sv:property sv:name="jcr:mimeType" sv:type="String"><sv:value>text/plain</sv:value></sv:property><sv:property sv:name="jcr:lastModified" sv:type="Date"><sv:value>2005-05-17T12:13:50.458+02:00</sv:value></sv:property></sv:node></sv:node><sv:node sv:name="invalidNames"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:node sv:name="invalidMultiNoBin"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="Prop&lt;>prop" sv:type="String"><sv:value>multival text 1</sv:value><sv:value>multival text 2</sv:value><sv:value>multival text 3</sv:value></sv:property></sv:node><sv:node sv:name="invalidMultiBin"
 ><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="Prop&lt;>prop" sv:type="Binary"><sv:value>U0dWc2JHOGdkOE8yY214a0xnPT0=</sv:value><sv:value>U0dWc2JHOGdkOE8yY214a0xnPT0=</sv:value></sv:property><sv:property sv:name="jcr:encoding" sv:type="String"><sv:value>UTF-8</sv:value></sv:property><sv:property sv:name="jcr:mimeType" sv:type="String"><sv:value>text/plain</sv:value></sv:property><sv:property sv:name="jcr:lastModified" sv:type="Date"><sv:value>2005-05-17T12:13:50.468+02:00</sv:value></sv:property></sv:node><sv:node sv:name="invalidNoBin"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="Prop&lt;>prop" sv:type="String"><sv:value>text 1</sv:value></sv:property></sv:node><sv:node sv:name="invalidBin"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:property sv:name="P
 rop&lt;>prop" sv:type="Binary"><sv:value>SGVsbG8gd8O2cmxkLg==</sv:value></sv:property><sv:property sv:name="jcr:encoding" sv:type="String"><sv:value>UTF-8</sv:value></sv:property><sv:property sv:name="jcr:mimeType" sv:type="String"><sv:value>text/plain</sv:value></sv:property><sv:property sv:name="jcr:lastModified" sv:type="Date"><sv:value>2005-05-17T12:13:50.468+02:00</sv:value></sv:property></sv:node></sv:node></sv:node><sv:node sv:name="serialization"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property></sv:node><sv:node sv:name="custom sample nodes"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>nt:unstructured</sv:value></sv:property><sv:node sv:name="test:versionable"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>test:versionable</sv:value></sv:property><sv:property sv:name="jcr:uuid" sv:type="String"><sv:value>fbeb8e11-ca39-48d4-adb6-63e72e7a9c3d</sv:value></sv:property><sv:property
  sv:name="jcr:isCheckedOut" sv:type="Boolean"><sv:value>true</sv:value></sv:property><sv:property sv:name="jcr:versionHistory" sv:type="Reference"><sv:value>e4bdb989-f237-412c-8873-73bf9ccc56e3</sv:value></sv:property><sv:property sv:name="jcr:baseVersion" sv:type="Reference"><sv:value>c991ead4-69b7-40cf-b1c4-aa79f1b184da</sv:value></sv:property><sv:property sv:name="jcr:predecessors" sv:type="Reference"><sv:value>c991ead4-69b7-40cf-b1c4-aa79f1b184da</sv:value></sv:property></sv:node><sv:node sv:name="test:refTargetNode"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>test:refTargetNode</sv:value></sv:property><sv:property sv:name="jcr:uuid" sv:type="String"><sv:value>6bd9fd75-77db-470a-99d9-94a22f3c280a</sv:value></sv:property><sv:property sv:name="jcr:versionHistory" sv:type="Reference"><sv:value>ece49f64-9f32-4455-80db-23fdd1f50ebc</sv:value></sv:property><sv:property sv:name="jcr:isCheckedOut" sv:type="Boolean"><sv:value>true</sv:value></sv:property><sv:p
 roperty sv:name="jcr:baseVersion" sv:type="Reference"><sv:value>ef97cc5f-3442-4852-ae28-5d3fba31bbf5</sv:value></sv:property><sv:property sv:name="jcr:predecessors" sv:type="Reference"><sv:value>ef97cc5f-3442-4852-ae28-5d3fba31bbf5</sv:value></sv:property></sv:node><sv:node sv:name="test:canSetProperty"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>test:canSetProperty</sv:value></sv:property></sv:node><sv:node sv:name="test:canAddChildNode"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>test:canAddChildNode</sv:value></sv:property></sv:node><sv:node sv:name="test:setProperty"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>test:setProperty</sv:value></sv:property><sv:property sv:name="jcr:uuid" sv:type="String"><sv:value>3ad78700-df4d-416a-b0f6-1bfb5acd360f</sv:value></sv:property></sv:node><sv:node sv:name="test:setPropertyAssumingType"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>test:setPropertyAssuming
 Type</sv:value></sv:property></sv:node><sv:node sv:name="test:sameNameSibsFalseChildNodeDefinition"><sv:property sv:name="jcr:primaryType" sv:type="Name"><sv:value>test:sameNameSibsFalseChildNodeDefinition</sv:value></sv:property></sv:node></sv:node></sv:node>
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/tck-candidate/resources/testdata/testdata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/RepositorySetup.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/RepositorySetup.java?rev=377682&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/RepositorySetup.java (added)
+++ incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/RepositorySetup.java Tue Feb 14 02:18:30 2006
@@ -0,0 +1,260 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+package org.apache.jackrabbit.server;
+
+import org.apache.jackrabbit.core.SessionImpl;
+import org.apache.jackrabbit.core.WorkspaceImpl;
+import org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader;
+import org.apache.jackrabbit.core.nodetype.NodeTypeDef;
+import org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl;
+import org.apache.jackrabbit.BaseException;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.NamespaceRegistry;
+import javax.jcr.ImportUUIDBehavior;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import java.io.InputStream;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * <code>RepositorySetup</code> initializes the test candidate with required
+ * namespaces, node types and test content.
+ */
+public class RepositorySetup {
+
+    private static final String NAMESPACES_RESOURCE = "namespaces.properties";
+
+    private static final String NODETYPES_RESOURCE = "custom_nodetypes.xml";
+
+    private static final String TEST_CONTENT_RESOURCE = "testdata.xml";
+
+    private static final String TEST_WORKSPACE_NAME = "test";
+
+    /**
+     * The setup tasks to run.
+     */
+    private final Task[] TASKS = {
+        new RegisterNamespaces(),
+        new RegisterNodeTypes(),
+        new ImportTestContent(),
+        new CreateTestWorkspace()
+    };
+
+    /**
+     * The session to the repository to setup.
+     */
+    private final SessionImpl session;
+
+    /**
+     * Private constructor.
+     */
+    private RepositorySetup(SessionImpl session) {
+        this.session = session;
+    }
+
+    /**
+     * Executes the repository setup tasks.
+     *
+     * @throws RepositoryException if an error occurs while running the tasks.
+     */
+    private void execute() throws RepositoryException {
+        for (int i = 0; i < TASKS.length; i++) {
+            TASKS[i].execute();
+        }
+    }
+
+    /**
+     * Runs the repository setup.
+     *
+     * @param session the session of the repository to setup.
+     * @throws RepositoryException      if an error occurs while running the
+     *                                  tasks.
+     * @throws IllegalArgumentException if <code>session</code> is not a jackrabbit
+     *                                  session.
+     */
+    public static void run(Session session) throws RepositoryException {
+        if (session instanceof SessionImpl) {
+            new RepositorySetup((SessionImpl) session).execute();
+        } else {
+            throw new IllegalArgumentException("not a Jackrabbit session");
+        }
+    }
+
+    /**
+     * Returns an input stream for reading the specified resource.
+     *
+     * @param name the resource name.
+     * @return An input stream for reading the resource, or <code>null</code> if
+     *         the resource could not be found
+     */
+    private static InputStream getResource(String name) {
+        return RepositorySetup.class.getClassLoader().getResourceAsStream(name);
+    }
+
+    /**
+     * Registers the <code>namespaces</code>.
+     *
+     * @param namespaces the namespaces to register.
+     * @param session the session to register the namespaces.
+     */
+    private static void registerNamespaces(Properties namespaces,
+                                           Session session)
+            throws RepositoryException {
+        NamespaceRegistry nsReg = session.getWorkspace().getNamespaceRegistry();
+        for (Iterator it = namespaces.keySet().iterator(); it.hasNext();) {
+            String prefix = (String) it.next();
+            String uri = namespaces.getProperty(prefix);
+            try {
+                nsReg.registerNamespace(prefix, uri);
+            } catch (RepositoryException e) {
+                // then this namespace is already registered.
+            }
+        }
+    }
+
+    private interface Task {
+
+        /**
+         * Executes this task.
+         *
+         * @throws RepositoryException if an error occurs while running this
+         *                             tasks.
+         */
+        public void execute() throws RepositoryException;
+    }
+
+    /**
+     * Registers namespaces that are needed to run the test cases.
+     */
+    private final class RegisterNamespaces implements Task {
+
+        /**
+         * @inheritDoc
+         */
+        public void execute() throws RepositoryException {
+            InputStream is = getResource(NAMESPACES_RESOURCE);
+            if (is != null) {
+                try {
+                    Properties namespaces = new Properties();
+                    namespaces.load(is);
+
+                    registerNamespaces(namespaces, session);
+                } catch (IOException e) {
+                    throw new RepositoryException(e.getMessage());
+                } finally {
+                    try {
+                        is.close();
+                    } catch (IOException e1) {
+                        // ignore
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Registers node types that are needed to run the test cases.
+     */
+    private final class RegisterNodeTypes implements Task {
+
+        /**
+         * @inheritDoc
+         */
+        public void execute() throws RepositoryException {
+            InputStream is = getResource(NODETYPES_RESOURCE);
+            if (is != null) {
+                try {
+                    NodeTypeReader ntReader = new NodeTypeReader(is);
+                    registerNamespaces(ntReader.getNamespaces(), session);
+
+                    NodeTypeManagerImpl ntMgr = session.getNodeTypeManager();
+                    NodeTypeDef[] nodeTypes = ntReader.getNodeTypeDefs();
+                    List unregisteredNTs = new ArrayList();
+                    for (int i = 0; i < nodeTypes.length; i++) {
+                        try {
+                            ntMgr.getNodeType(nodeTypes[i].getName());
+                        } catch (NoSuchNodeTypeException e) {
+                            // register the node type
+                            unregisteredNTs.add(nodeTypes[i]);
+                        }
+                    }
+                    ntMgr.getNodeTypeRegistry().registerNodeTypes(unregisteredNTs);
+                } catch (BaseException e) {
+                    throw new RepositoryException(e.getMessage());
+                } catch (IOException e) {
+                    throw new RepositoryException(e.getMessage());
+                } finally {
+                    try {
+                        is.close();
+                    } catch (IOException e1) {
+                        // ignore
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Imports test content into the repository if the repository is empty.
+     */
+    private final class ImportTestContent implements Task {
+
+        /**
+         * @inheritDoc
+         */
+        public void execute() throws RepositoryException {
+            InputStream is = getResource(TEST_CONTENT_RESOURCE);
+            if (is != null) {
+                try {
+                    if (!session.getRootNode().hasNode("testdata")) {
+                        session.getWorkspace().importXML("/", is,
+                                ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING);
+                    }
+                } catch (IOException e) {
+                    throw new RepositoryException(e.getMessage());
+                } finally {
+                    try {
+                        is.close();
+                    } catch (IOException e1) {
+                        // ignore
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Creates a workspace with name 'test' if it is not yet present.
+     */
+    private final class CreateTestWorkspace implements Task {
+
+        /**
+         * @inheritDoc
+         */
+        public void execute() throws RepositoryException {
+            List workspaces = Arrays.asList(session.getWorkspace().getAccessibleWorkspaceNames());
+            if (!workspaces.contains(TEST_WORKSPACE_NAME)) {
+                ((WorkspaceImpl) session.getWorkspace()).createWorkspace(TEST_WORKSPACE_NAME);
+            }
+        }
+    }
+}

Propchange: incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/RepositorySetup.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/RepositoryStartupServlet.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/RepositoryStartupServlet.java?rev=377682&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/RepositoryStartupServlet.java (added)
+++ incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/RepositoryStartupServlet.java Tue Feb 14 02:18:30 2006
@@ -0,0 +1,239 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+package org.apache.jackrabbit.server;
+
+import org.apache.log4j.PropertyConfigurator;
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.core.config.RepositoryConfig;
+import org.apache.jackrabbit.core.RepositoryImpl;
+import org.xml.sax.InputSource;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.ServletException;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jcr.RepositoryException;
+import javax.jcr.SimpleCredentials;
+import java.util.Properties;
+import java.util.Enumeration;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileInputStream;
+
+/**
+ * The RepositoryStartupServlet starts a jackrabbit repository and registers it
+ * to the JNDI environment.
+ */
+public class RepositoryStartupServlet extends HttpServlet {
+
+    /**
+     * the default logger
+     */
+    private static Logger log;
+
+    /**
+     * initial param name for the repository config location
+     */
+    public final static String INIT_PARAM_REPOSITORY_CONFIG = "repository-config";
+
+    /**
+     * initial param name for the repository home directory
+     */
+    public final static String INIT_PARAM_REPOSITORY_HOME = "repository-home";
+
+    /**
+     * initial param name for the repository name
+     */
+    public final static String INIT_PARAM_REPOSITORY_NAME = "repository-name";
+
+    /**
+     * initial param name for the log4j config properties
+     */
+    public final static String INIT_PARAM_LOG4J_CONFIG = "log4j-config";
+
+    /**
+     * the registered repository
+     */
+    private RepositoryImpl repository;
+
+    /**
+     * the name of the repository as configured
+     */
+    private String repositoryName;
+
+    /**
+     * the jndi context, created base on configuration
+     */
+    private InitialContext jndiContext;
+
+    /**
+     * Initializes the servlet
+     *
+     * @throws ServletException
+     */
+    public void init() throws ServletException {
+        super.init();
+        initLog4J();
+        log.info("RepositoryStartupServlet initializing...");
+        initRepository();
+        registerJNDI();
+        log.info("RepositoryStartupServlet initialized.");
+    }
+
+    /**
+     * destroy the servlet
+     */
+    public void destroy() {
+        super.destroy();
+        if (log == null) {
+            log("RepositoryStartupServlet shutting down...");
+        } else {
+            log.info("RepositoryStartupServlet shutting down...");
+        }
+        unregisterJNDI();
+        repository.shutdown();
+        log("RepositoryStartupServlet shut down.");
+    }
+
+    /**
+     * Initializes Log4J
+     *
+     * @throws ServletException
+     */
+    private void initLog4J() throws ServletException {
+        // setup log4j
+        String log4jConfig = getServletConfig().getInitParameter(INIT_PARAM_LOG4J_CONFIG);
+        InputStream in = getServletContext().getResourceAsStream(log4jConfig);
+        if (in == null) {
+            // try normal init
+            PropertyConfigurator.configure(log4jConfig);
+        } else {
+            try {
+                Properties log4jProperties = new Properties();
+                log4jProperties.load(in);
+                in.close();
+                PropertyConfigurator.configure(log4jProperties);
+            } catch (IOException e) {
+                throw new ServletException("Unable to load log4jProperties: " + e.toString());
+            }
+        }
+        log = Logger.getLogger(RepositoryStartupServlet.class);
+    }
+
+    /**
+     * Creates a new Repository based on configuration
+     *
+     * @throws ServletException
+     */
+    private void initRepository() throws ServletException {
+        // setup home directory
+        String repHome = getServletConfig().getInitParameter(INIT_PARAM_REPOSITORY_HOME);
+        if (repHome == null) {
+            log.error(INIT_PARAM_REPOSITORY_HOME + " missing.");
+            throw new ServletException(INIT_PARAM_REPOSITORY_HOME + " missing.");
+        }
+        File repositoryHome;
+        try {
+            repositoryHome = new File(repHome).getCanonicalFile();
+        } catch (IOException e) {
+            log.error(INIT_PARAM_REPOSITORY_HOME + " invalid." + e.toString());
+            throw new ServletException(INIT_PARAM_REPOSITORY_HOME + " invalid." + e.toString());
+        }
+        log.info("  repository-home = " + repositoryHome.getPath());
+
+        // get repository config
+        String repConfig = getServletConfig().getInitParameter(INIT_PARAM_REPOSITORY_CONFIG);
+        if (repConfig == null) {
+            log.error(INIT_PARAM_REPOSITORY_CONFIG + " missing.");
+            throw new ServletException(INIT_PARAM_REPOSITORY_CONFIG + " missing.");
+        }
+        log.info("  repository-config = " + repConfig);
+
+        InputStream in = getServletContext().getResourceAsStream(repConfig);
+        if (in == null) {
+            try {
+                in = new FileInputStream(new File(repositoryHome, repConfig));
+            } catch (FileNotFoundException e) {
+                log.error(INIT_PARAM_REPOSITORY_CONFIG + " invalid." + e.toString());
+                throw new ServletException(INIT_PARAM_REPOSITORY_CONFIG + " invalid." + e.toString());
+            }
+        }
+
+        // get repository name
+        repositoryName = getServletConfig().getInitParameter(INIT_PARAM_REPOSITORY_NAME);
+        if (repositoryName == null) {
+            repositoryName = "default";
+        }
+        log.info("  repository-name = " + repositoryName);
+
+        try {
+            InputSource is = new InputSource(in);
+            RepositoryConfig config = RepositoryConfig.create(is, repositoryHome.getAbsolutePath());
+            repository = RepositoryImpl.create(config);
+        } catch (RepositoryException e) {
+            throw new ServletException("Error while creating repository", e);
+        }
+
+        // setup repository
+        SimpleCredentials cred = new SimpleCredentials("user", "".toCharArray());
+        try {
+            RepositorySetup.run(repository.login(cred));
+        } catch (RepositoryException e) {
+            log("Error while setting up repository", e);
+        }
+    }
+
+    /**
+     * Registers the repository in the JNDI context
+     *
+     * @throws ServletException
+     */
+    private void registerJNDI() throws ServletException {
+        // registering via jndi
+        Properties env = new Properties();
+        Enumeration names = getServletConfig().getInitParameterNames();
+        while (names.hasMoreElements()) {
+            String name = (String) names.nextElement();
+            if (name.startsWith("java.naming.")) {
+                env.put(name, getServletConfig().getInitParameter(name));
+                log.info("  adding property to JNDI environment: " + name + "=" + env.getProperty(name));
+            }
+        }
+        try {
+            jndiContext = new InitialContext(env);
+            jndiContext.bind(repositoryName, repository);
+        } catch (NamingException e) {
+            throw new ServletException(e);
+        }
+        log.info("Repository bound to JNDI with name: " + repositoryName);
+    }
+
+    /**
+     * Unregisters the repository from the JNDI context
+     */
+    private void unregisterJNDI() {
+        if (jndiContext != null) {
+            try {
+                jndiContext.unbind(repositoryName);
+            } catch (NamingException e) {
+                log("Error while unbinding repository from JNDI: " + e);
+            }
+        }
+    }
+
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/tck-candidate/src/main/java/org/apache/jackrabbit/server/RepositoryStartupServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/log4j.properties
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/log4j.properties?rev=377682&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/log4j.properties (added)
+++ incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/log4j.properties Tue Feb 14 02:18:30 2006
@@ -0,0 +1,20 @@
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=INFO, stdout
+#log4j.rootLogger=DEBUG, stdout, file
+#log4j.rootLogger=ERROR, stdout, file
+
+# 'stdout' is set to be a ConsoleAppender.
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+
+# 'stdout' uses PatternLayout
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L)\n
+
+# 'file' is set to be a FileAppender.
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.File=jcr.log
+
+# 'file' uses PatternLayout.
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L)\n
+

Propchange: incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/repository.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/repository.xml?rev=377682&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/repository.xml (added)
+++ incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/repository.xml Tue Feb 14 02:18:30 2006
@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Repository//EN" "file://config.dtd"> -->
+<!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,SearchIndex?)>
+
+    <!--
+        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 -->
+<Repository>
+    <!--
+        virtual file system where the repository stores global state
+        (e.g. registered namespaces, custom node types, etc.)
+    -->
+    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+        <param name="path" value="${rep.home}/repository"/>
+    </FileSystem>
+
+    <!--
+        security configuration
+    -->
+    <Security appName="Jackrabbit">
+        <!--
+            access manager:
+            class: FQN of class implementing the AccessManager interface
+        -->
+        <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager">
+            <!-- <param name="config" value="${rep.home}/access.xml"/> -->
+        </AccessManager>
+
+        <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
+           <!-- anonymous user name ('anonymous' is the default value) -->
+           <param name="anonymousId" value="anonymous"/>
+        </LoginModule>
+    </Security>
+
+    <!--
+        location of workspaces root directory and name of default workspace
+    -->
+    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
+    <!--
+        workspace configuration template:
+        used to create the initial workspace if there's no workspace yet
+    -->
+    <Workspace name="${wsp.name}">
+        <!--
+            virtual file system of the workspace:
+            class: FQN of class implementing the FileSystem interface
+        -->
+        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+            <param name="path" value="${wsp.home}"/>
+        </FileSystem>
+        <!--
+            persistence manager of the workspace:
+            class: FQN of class implementing the PersistenceManager interface
+        -->
+        <!--
+        <PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager"/>
+        -->
+        <!--
+        <PersistenceManager class="org.apache.jackrabbit.core.state.mem.InMemPersistenceManager">
+            <param name="initialCapacity" value="100000"/>
+            <param name="loadFactor" value="0.3"/>
+            <param name="persistent" value="true"/>
+        </PersistenceManager>
+        -->
+        <PersistenceManager class="org.apache.jackrabbit.core.state.db.DerbyPersistenceManager">
+           <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
+           <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+        </PersistenceManager>
+        <!--
+            Search index and the file system it uses.
+            class: FQN of class implementing the QueryHandler interface
+        -->
+        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+            <param name="path" value="${wsp.home}/index"/>
+        </SearchIndex>
+    </Workspace>
+
+    <!--
+        Configures the versioning
+    -->
+    <Versioning rootPath="${rep.home}/version">
+        <!--
+            Configures the filesystem to use for versioning for the respective
+            persistence manager
+        -->
+        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+            <param name="path" value="${rep.home}/version"/>
+        </FileSystem>
+
+        <!--
+            Configures the perisistence 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">
+          <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)
+        
+        The same parameters are supported as in the search index configuration
+        inside the workspace definition element.
+        
+        This element is optional. If omitted, the /jcr:system tree will not be
+        indexed and no results will be returned for that tree!
+    -->
+    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+        <param name="path" value="${rep.home}/repository/index"/>
+    </SearchIndex>
+</Repository>

Propchange: incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/repository/repository.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/web.xml?rev=377682&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/web.xml (added)
+++ incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/web.xml Tue Feb 14 02:18:30 2006
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
+<web-app>
+    <display-name>Jackrabbit TCK candidate web application</display-name>
+
+    <!-- ====================================================================== -->
+    <!-- R E P O S I T O R Y   S T A R T U P  S E R V L E T                     -->
+    <!-- ====================================================================== -->
+    <servlet>
+	<servlet-name>RepositoryStartup</servlet-name>
+        <description>
+	    Repository servlet that starts the repository and registers it to JNDI.
+	    If you already have the repository registered in this appservers JNDI context,
+	    you do not need to use this servlet.
+	</description>
+	<servlet-class>org.apache.jackrabbit.server.RepositoryStartupServlet</servlet-class>
+
+	<init-param>
+	    <param-name>log4j-config</param-name>
+	    <param-value>/WEB-INF/repository/log4j.properties</param-value>
+            <description>initial log4j configuration</description>
+	</init-param>
+
+	<init-param>
+	    <param-name>repository-config</param-name>
+	    <param-value>/WEB-INF/repository/repository.xml</param-value>
+            <description>the repository config location</description>
+	</init-param>
+
+	<init-param>
+	    <param-name>repository-home</param-name>
+	    <param-value>jackrabbit</param-value>
+            <description>the repository home</description>
+	</init-param>
+
+	<init-param>
+	    <param-name>repository-name</param-name>
+	    <param-value>jackrabbit.repository</param-value>
+            <description>Repository Name under which the repository is registered via JNDI</description>
+	</init-param>
+
+	<!--
+	    JNDI environment variables for creating the initial context
+	    (all init parameters starting with java.naming.* will be added to the initial context environment).
+        -->
+	<init-param>
+	    <param-name>java.naming.provider.url</param-name>
+	    <param-value>http://www.apache.org/jackrabbit</param-value>
+	</init-param>
+	<init-param>
+	    <param-name>java.naming.factory.initial</param-name>
+	    <param-value>com.day.crx.jndi.provider.MemoryInitialContextFactory</param-value>
+	</init-param>
+
+	<load-on-startup>1</load-on-startup>
+    </servlet>
+</web-app>
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/tck-candidate/src/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message