This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git
commit 534acf494c33475722de183816b17aac961610f6 Author: Robert Munteanu <[email protected]> AuthorDate: Wed Sep 18 17:57:53 2019 +0200 SLING-8627 - Update sling-jcr-repoinit to Oak 1.16.0 and Jackrabbit 2.18.2 Update the compile and IT dependencies to the latest Oak and Jackrabbit versions. To make sure we get the right dependencies, we now include all the oak artefacts in a custom oak.txt provisioning file. We also changed the name of the main feature to Sling, to make sure overrides are working. --- README.md | 20 +++++++++ pom.xml | 6 +-- src/test/provisioning/oak.txt | 51 +++++++++++++++++++++++ src/test/provisioning/{it-model.txt => sling.txt} | 9 +++- 4 files changed, 82 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 264db4a..f60a107 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,23 @@ This module is part of the [Apache Sling](https://sling.apache.org) project. This module implements [Repository Initalization](https://sling.apache.org/documentation/bundles/repository-initialization.html) operations for the Sling _repoinit_ modules, operations that can initialize content, service users and privileges in a JCR content repository. + +## Updating to a newer version of Jackrabbit Oak + +The Oak version (and the associated Jackrabbit version) must be maintained in two locations: + +- pom.xml for build and unit testing +- src/test/features for integration testing + +Since the integration tests rely on the Sling Starter to provide the the base instance values, it +happens that the Oak version used by repoinit is more recent than the one provided in the starter. + +We should not depend on SNAPSHOT starter versions, since this bundle is released more often than +the Starter. Therefore the recommended approach is to override the needed bundles in the following +manner: + +* in src/test/provisioning/sling.txt - all bundles from the Sling Starter part of the 'sling.txt' feature +* in src/test/provisioning/oak.txt - all bundles from the Sling Starter part of the 'oak.txt' feature + +For a more concrete example, see [SLING-8627 - Update sling-jcr-repoinit to Oak 1.16.0 and Jackrabbit 2.18](https://issues.apache.org/jira/browse/SLING-8627) +and associated commits. diff --git a/pom.xml b/pom.xml index 5b4a697..db46ebd 100644 --- a/pom.xml +++ b/pom.xml @@ -37,8 +37,8 @@ </description> <properties> - <jackrabbit.version>2.10.0</jackrabbit.version> - <oak.version>1.6.1</oak.version> + <jackrabbit.version>2.18.2</jackrabbit.version> + <oak.version>1.16.0</oak.version> <http.host>localhost</http.host> <sling.default.vm.options>-Xmx1024m -XX:MaxPermSize=256m -Djava.awt.headless=true</sling.default.vm.options> </properties> @@ -204,7 +204,7 @@ <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.testing.sling-mock-oak</artifactId> - <version>2.0.2</version> + <version>2.1.7-1.6.0-SNAPSHOT</version> <scope>test</scope> </dependency> <dependency> diff --git a/src/test/provisioning/oak.txt b/src/test/provisioning/oak.txt new file mode 100644 index 0000000..74d5537 --- /dev/null +++ b/src/test/provisioning/oak.txt @@ -0,0 +1,51 @@ +# +# 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. +# + +[feature name=oak] + +[variables] + oak.version=1.16.0 + +[artifacts startLevel=15] + org.apache.jackrabbit/oak-api/${oak.version} + org.apache.jackrabbit/oak-blob/${oak.version} + org.apache.jackrabbit/oak-blob-plugins/${oak.version} + org.apache.jackrabbit/oak-commons/${oak.version} + org.apache.jackrabbit/oak-core/${oak.version} + org.apache.jackrabbit/oak-core-spi/${oak.version} + org.apache.jackrabbit/oak-lucene/${oak.version} + org.apache.jackrabbit/oak-jcr/${oak.version} + org.apache.jackrabbit/oak-query-spi/${oak.version} + org.apache.jackrabbit/oak-security-spi/${oak.version} + org.apache.jackrabbit/oak-store-composite/${oak.version} + # OAK-7263 - oak-store-document should be in oak_mongo runmode + org.apache.jackrabbit/oak-store-document/${oak.version} + org.apache.jackrabbit/oak-store-spi/${oak.version} + +[artifacts startLevel=15 runModes=oak_tar] + org.apache.jackrabbit/oak-segment-tar/${oak.version} + +[artifacts startLevel=15 runModes=oak_mongo] + org.mongodb/mongo-java-driver/3.8.2 + com.h2database/h2-mvstore/1.4.194 + +# start the Oak server instance after all components have been configured +# and started to avoid restarting that component ( see SLING-4556 ) +[artifacts startLevel=16] + org.apache.sling/org.apache.sling.jcr.oak.server/1.2.2 diff --git a/src/test/provisioning/it-model.txt b/src/test/provisioning/sling.txt similarity index 84% rename from src/test/provisioning/it-model.txt rename to src/test/provisioning/sling.txt index ce43c3e..fad19c0 100644 --- a/src/test/provisioning/it-model.txt +++ b/src/test/provisioning/sling.txt @@ -17,12 +17,19 @@ # under the License. # -[feature name=jcr-repoinit-it] +[feature name=sling] + +[variables] + jackrabbit.version=2.18.2 # Dependencies [artifacts] org.apache.sling/org.apache.sling.starter/11/slingstart org.apache.sling/org.apache.sling.junit.core/1.0.26 + # various dependency bumps for Oak + commons-codec/commons-codec/1.13 + org.apache.tika/tika-core/1.22 + org.apache.tika/tika-parsers/1.22 # additional configuration for testing [configurations]
