You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by kw...@apache.org on 2023/07/03 18:33:09 UTC
[jackrabbit-oak] 01/01: OAK-9837 Update to individual OSGi R7 dependencies
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch feature/update-osgi-r7
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit 6f2f05bdc7bc76f969998e7f4a3cd07cf9720c11
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Jul 3 20:33:01 2023 +0200
OAK-9837 Update to individual OSGi R7 dependencies
Update annotations to R7 as well
---
oak-api/pom.xml | 12 +------
oak-auth-external/pom.xml | 8 ++---
oak-authorization-cug/pom.xml | 9 ++---
oak-authorization-principalbased/pom.xml | 9 ++---
oak-blob-cloud-azure/pom.xml | 9 +++--
oak-blob-cloud/pom.xml | 9 +++--
oak-blob-plugins/pom.xml | 17 ++++-----
oak-blob/pom.xml | 6 ++--
oak-commons/pom.xml | 2 +-
oak-core-spi/pom.xml | 6 ++--
.../apache/jackrabbit/oak/osgi/OsgiWhiteboard.java | 6 ++--
.../jackrabbit/oak/osgi/OsgiWhiteboardTest.java | 4 +--
oak-core/pom.xml | 6 ++--
.../plugins/metric/StatisticsProviderFactory.java | 6 ++--
oak-exercise/pom.xml | 12 +++----
oak-http/pom.xml | 12 -------
oak-jcr/pom.xml | 10 ++----
.../jackrabbit/oak/jcr/osgi/RepositoryManager.java | 12 +++----
oak-lucene/pom.xml | 9 ++---
oak-parent/pom.xml | 40 +++++++++++++++-------
oak-query-spi/pom.xml | 3 +-
oak-search-elastic/pom.xml | 9 ++---
oak-search-mt/pom.xml | 15 --------
oak-search/pom.xml | 12 +------
oak-security-spi/pom.xml | 9 ++---
oak-segment-aws/pom.xml | 9 ++---
.../oak/segment/aws/AwsSegmentStoreService.java | 6 ++--
oak-segment-azure/pom.xml | 9 ++---
.../segment/azure/AzureSegmentStoreService.java | 3 +-
oak-segment-remote/pom.xml | 6 ++--
.../RemotePersistentCacheService.java | 3 +-
oak-segment-tar/pom.xml | 9 +++--
.../segment/standby/store/StandbyStoreService.java | 4 +--
oak-shaded-guava/pom.xml | 5 ---
oak-solr-core/pom.xml | 5 ++-
oak-solr-osgi/pom.xml | 9 +----
oak-store-composite/pom.xml | 7 ++--
.../composite/MountInfoProviderServiceTest.java | 4 ++-
oak-store-document/pom.xml | 7 ++--
oak-store-spi/pom.xml | 7 +---
40 files changed, 137 insertions(+), 208 deletions(-)
diff --git a/oak-api/pom.xml b/oak-api/pom.xml
index 37ea9a91d3..9e0c8c79fa 100644
--- a/oak-api/pom.xml
+++ b/oak-api/pom.xml
@@ -61,17 +61,7 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
diff --git a/oak-auth-external/pom.xml b/oak-auth-external/pom.xml
index 9c5b3def59..8820b1ebf2 100644
--- a/oak-auth-external/pom.xml
+++ b/oak-auth-external/pom.xml
@@ -61,12 +61,12 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@@ -81,8 +81,8 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
- <scope>provided</scope>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
+ <scope>provided</scope>
</dependency>
<!-- Jackrabbit dependencies -->
diff --git a/oak-authorization-cug/pom.xml b/oak-authorization-cug/pom.xml
index 4321115db6..9ef85283b7 100644
--- a/oak-authorization-cug/pom.xml
+++ b/oak-authorization-cug/pom.xml
@@ -117,17 +117,12 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-authorization-principalbased/pom.xml b/oak-authorization-principalbased/pom.xml
index db29754887..adef1c42d9 100644
--- a/oak-authorization-principalbased/pom.xml
+++ b/oak-authorization-principalbased/pom.xml
@@ -59,17 +59,12 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-blob-cloud-azure/pom.xml b/oak-blob-cloud-azure/pom.xml
index fa1e23d62c..f65dc654d2 100644
--- a/oak-blob-cloud-azure/pom.xml
+++ b/oak-blob-cloud-azure/pom.xml
@@ -58,12 +58,17 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>osgi.core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-blob-cloud/pom.xml b/oak-blob-cloud/pom.xml
index f97e1e4565..e83009b9ae 100644
--- a/oak-blob-cloud/pom.xml
+++ b/oak-blob-cloud/pom.xml
@@ -57,12 +57,17 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>osgi.core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-blob-plugins/pom.xml b/oak-blob-plugins/pom.xml
index 6f608bcf5d..05b2948457 100644
--- a/oak-blob-plugins/pom.xml
+++ b/oak-blob-plugins/pom.xml
@@ -50,17 +50,22 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.scr.annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.scr.annotations</artifactId>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
@@ -196,10 +201,6 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
- </dependency>
</dependencies>
</project>
diff --git a/oak-blob/pom.xml b/oak-blob/pom.xml
index fb69c2e0f7..26ff309c95 100644
--- a/oak-blob/pom.xml
+++ b/oak-blob/pom.xml
@@ -52,17 +52,17 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-commons/pom.xml b/oak-commons/pom.xml
index 622a39d610..8b49c568b6 100644
--- a/oak-commons/pom.xml
+++ b/oak-commons/pom.xml
@@ -75,7 +75,7 @@
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
diff --git a/oak-core-spi/pom.xml b/oak-core-spi/pom.xml
index a3ab8330dc..bf2180fa39 100644
--- a/oak-core-spi/pom.xml
+++ b/oak-core-spi/pom.xml
@@ -85,17 +85,17 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
diff --git a/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/osgi/OsgiWhiteboard.java b/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/osgi/OsgiWhiteboard.java
index bba5d22649..14aef03df7 100644
--- a/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/osgi/OsgiWhiteboard.java
+++ b/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/osgi/OsgiWhiteboard.java
@@ -69,13 +69,13 @@ public class OsgiWhiteboard implements Whiteboard {
Objects.requireNonNull(properties);
checkArgument(type.isInstance(service));
- Dictionary<Object, Object> dictionary = new Hashtable<Object, Object>();
+ Dictionary<String, Object> dictionary = new Hashtable<>();
for (Map.Entry<?, ?> entry : properties.entrySet()) {
- dictionary.put(entry.getKey(), entry.getValue());
+ dictionary.put((String)entry.getKey(), entry.getValue());
}
final ServiceRegistration registration =
- context.registerService(type.getName(), service, dictionary);
+ context.registerService(type, service, dictionary);
return new Registration() {
private volatile boolean unregistered;
@Override
diff --git a/oak-core-spi/src/test/java/org/apache/jackrabbit/oak/osgi/OsgiWhiteboardTest.java b/oak-core-spi/src/test/java/org/apache/jackrabbit/oak/osgi/OsgiWhiteboardTest.java
index ffef1290ad..469806ca84 100644
--- a/oak-core-spi/src/test/java/org/apache/jackrabbit/oak/osgi/OsgiWhiteboardTest.java
+++ b/oak-core-spi/src/test/java/org/apache/jackrabbit/oak/osgi/OsgiWhiteboardTest.java
@@ -72,8 +72,8 @@ public class OsgiWhiteboardTest {
};
when(
- bundleContext.registerService(Runnable.class.getName(), r,
- new Hashtable<Object, Object>())).thenReturn(sr);
+ bundleContext.registerService(Runnable.class, r,
+ new Hashtable<String, Object>())).thenReturn(sr);
Registration reg = w.register(Runnable.class, r,
new HashMap<String, Object>());
reg.unregister();
diff --git a/oak-core/pom.xml b/oak-core/pom.xml
index b2bd9a024f..bcfd11f751 100644
--- a/oak-core/pom.xml
+++ b/oak-core/pom.xml
@@ -214,17 +214,17 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/metric/StatisticsProviderFactory.java b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/metric/StatisticsProviderFactory.java
index 6d04f0b814..d686d2bb6f 100644
--- a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/metric/StatisticsProviderFactory.java
+++ b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/metric/StatisticsProviderFactory.java
@@ -47,6 +47,8 @@ import org.osgi.service.metatype.annotations.Option;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.codahale.metrics.MetricRegistry;
+
/**
* Factory to create StatisticsProvider depending on setup. It detects if the
* <a href="http://metrics.dropwizard.io">Metrics</a> library is present or not. If present
@@ -146,9 +148,9 @@ public class StatisticsProviderFactory {
private StatisticsProvider createMetricsProvider(ScheduledExecutorService executor) {
org.apache.jackrabbit.oak.plugins.metric.MetricStatisticsProvider metricProvider =
new org.apache.jackrabbit.oak.plugins.metric.MetricStatisticsProvider(server, executor);
- Dictionary<Object, Object> dictionary = new Hashtable<Object, Object>();
+ Dictionary<String, Object> dictionary = new Hashtable<>();
dictionary.put("name", "oak");
- regs.add(bundleContext.registerService("com.codahale.metrics.MetricRegistry",
+ regs.add(bundleContext.registerService(MetricRegistry.class,
metricProvider.getRegistry(), dictionary));
return metricProvider;
}
diff --git a/oak-exercise/pom.xml b/oak-exercise/pom.xml
index 29bc21afe4..7c9868ae73 100644
--- a/oak-exercise/pom.xml
+++ b/oak-exercise/pom.xml
@@ -143,7 +143,12 @@
<!-- OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@@ -159,11 +164,6 @@
<artifactId>org.apache.felix.jaas</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.slf4j</groupId>
diff --git a/oak-http/pom.xml b/oak-http/pom.xml
index e233ceb46d..5472789045 100644
--- a/oak-http/pom.xml
+++ b/oak-http/pom.xml
@@ -48,18 +48,6 @@
</build>
<dependencies>
- <!-- Optional OSGi dependencies, used only when running within OSGi -->
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
-
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>oak-shaded-guava</artifactId>
diff --git a/oak-jcr/pom.xml b/oak-jcr/pom.xml
index 6dc306c066..8461fa14ee 100644
--- a/oak-jcr/pom.xml
+++ b/oak-jcr/pom.xml
@@ -189,22 +189,16 @@
</build>
<dependencies>
- <!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
- <scope>provided</scope>
- </dependency>
<dependency>
<!-- somehow the 1.6.0_65 compiler crashes on osx without this. -->
<groupId>org.apache.felix</groupId>
diff --git a/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/osgi/RepositoryManager.java b/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/osgi/RepositoryManager.java
index 5e3daf3f55..e7f3101153 100644
--- a/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/osgi/RepositoryManager.java
+++ b/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/osgi/RepositoryManager.java
@@ -18,8 +18,8 @@
*/
package org.apache.jackrabbit.oak.jcr.osgi;
+import java.util.Hashtable;
import java.util.Map;
-import java.util.Properties;
import javax.jcr.Repository;
@@ -31,23 +31,23 @@ import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceStrategy;
import org.apache.felix.scr.annotations.References;
+import org.apache.jackrabbit.oak.InitialContent;
import org.apache.jackrabbit.oak.Oak;
import org.apache.jackrabbit.oak.commons.PropertiesUtil;
import org.apache.jackrabbit.oak.osgi.OsgiWhiteboard;
import org.apache.jackrabbit.oak.plugins.commit.JcrConflictHandler;
import org.apache.jackrabbit.oak.plugins.index.IndexEditorProvider;
-import org.apache.jackrabbit.oak.InitialContent;
+import org.apache.jackrabbit.oak.plugins.index.WhiteboardIndexEditorProvider;
import org.apache.jackrabbit.oak.plugins.observation.CommitRateLimiter;
import org.apache.jackrabbit.oak.plugins.version.VersionHook;
import org.apache.jackrabbit.oak.spi.commit.BackgroundObserver;
+import org.apache.jackrabbit.oak.spi.commit.WhiteboardEditorProvider;
import org.apache.jackrabbit.oak.spi.lifecycle.RepositoryInitializer;
+import org.apache.jackrabbit.oak.spi.query.WhiteboardIndexProvider;
import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
import org.apache.jackrabbit.oak.spi.state.NodeStore;
import org.apache.jackrabbit.oak.spi.whiteboard.Tracker;
import org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard;
-import org.apache.jackrabbit.oak.spi.commit.WhiteboardEditorProvider;
-import org.apache.jackrabbit.oak.plugins.index.WhiteboardIndexEditorProvider;
-import org.apache.jackrabbit.oak.spi.query.WhiteboardIndexProvider;
import org.apache.jackrabbit.oak.stats.StatisticsProvider;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
@@ -206,6 +206,6 @@ public class RepositoryManager {
fastQueryResultSize
);
- return bundleContext.registerService(Repository.class.getName(), repository, new Properties());
+ return bundleContext.registerService(Repository.class, repository, new Hashtable<String, Object>());
}
}
diff --git a/oak-lucene/pom.xml b/oak-lucene/pom.xml
index 2a0eaefb20..dddc297f6e 100644
--- a/oak-lucene/pom.xml
+++ b/oak-lucene/pom.xml
@@ -152,17 +152,12 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-parent/pom.xml b/oak-parent/pom.xml
index 29c16cc1c5..8953449112 100644
--- a/oak-parent/pom.xml
+++ b/oak-parent/pom.xml
@@ -486,34 +486,50 @@
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>4.2.0</version>
+ <artifactId>osgi.core</artifactId>
+ <version>7.0.0</version>
</dependency>
+ <!-- OSGi R7 Compendium Specs -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <version>4.2.0</version>
+ <artifactId>org.osgi.service.component</artifactId>
+ <version>1.4.0</version>
</dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.metatype</artifactId>
+ <version>1.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.cm</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <!-- OSGi R7 annotations -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.component.annotations</artifactId>
- <version>1.3.0</version>
+ <version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.metatype.annotations</artifactId>
- <version>1.3.0</version>
+ <version>1.4.0</version>
</dependency>
-
<dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.scr.annotations</artifactId>
- <version>1.9.6</version>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.annotation.bundle</artifactId>
+ <version>1.0.0</version><!-- R7 version, https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/bundle/package-summary.html -->
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
- <version>6.0.0</version>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
+ <version>1.1.2</version><!-- R7 version, https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/package-summary.html -->
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.scr.annotations</artifactId>
+ <version>1.9.6</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
diff --git a/oak-query-spi/pom.xml b/oak-query-spi/pom.xml
index 78f72a3bc5..b003198e9a 100644
--- a/oak-query-spi/pom.xml
+++ b/oak-query-spi/pom.xml
@@ -60,10 +60,9 @@
</build>
<dependencies>
- <!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
diff --git a/oak-search-elastic/pom.xml b/oak-search-elastic/pom.xml
index ffc9c76424..93c6a5227a 100644
--- a/oak-search-elastic/pom.xml
+++ b/oak-search-elastic/pom.xml
@@ -94,17 +94,12 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-search-mt/pom.xml b/oak-search-mt/pom.xml
index ff1b1e1c7a..263ae634ae 100644
--- a/oak-search-mt/pom.xml
+++ b/oak-search-mt/pom.xml
@@ -83,21 +83,6 @@
<dependencies>
<!-- Optional OSGi dependencies, used only when running within OSGi -->
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
diff --git a/oak-search/pom.xml b/oak-search/pom.xml
index 0705670f92..cf692f7ef1 100644
--- a/oak-search/pom.xml
+++ b/oak-search/pom.xml
@@ -80,17 +80,7 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
diff --git a/oak-security-spi/pom.xml b/oak-security-spi/pom.xml
index 12a317b574..ae1042e035 100644
--- a/oak-security-spi/pom.xml
+++ b/oak-security-spi/pom.xml
@@ -73,17 +73,12 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-segment-aws/pom.xml b/oak-segment-aws/pom.xml
index 8b5fb41b03..5eff19f390 100644
--- a/oak-segment-aws/pom.xml
+++ b/oak-segment-aws/pom.xml
@@ -149,17 +149,12 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-segment-aws/src/main/java/org/apache/jackrabbit/oak/segment/aws/AwsSegmentStoreService.java b/oak-segment-aws/src/main/java/org/apache/jackrabbit/oak/segment/aws/AwsSegmentStoreService.java
index 9efe03af46..66b859de58 100644
--- a/oak-segment-aws/src/main/java/org/apache/jackrabbit/oak/segment/aws/AwsSegmentStoreService.java
+++ b/oak-segment-aws/src/main/java/org/apache/jackrabbit/oak/segment/aws/AwsSegmentStoreService.java
@@ -19,7 +19,7 @@
package org.apache.jackrabbit.oak.segment.aws;
import java.io.IOException;
-import java.util.Properties;
+import java.util.Hashtable;
import org.apache.jackrabbit.oak.segment.spi.persistence.SegmentNodeStorePersistence;
import org.osgi.framework.ServiceRegistration;
@@ -47,8 +47,8 @@ public class AwsSegmentStoreService {
@Activate
public void activate(ComponentContext context, Configuration config) throws IOException {
persistence = createAwsPersistence(config);
- registration = context.getBundleContext().registerService(SegmentNodeStorePersistence.class.getName(),
- persistence, new Properties());
+ registration = context.getBundleContext().registerService(SegmentNodeStorePersistence.class,
+ persistence, new Hashtable<String, Object>());
}
@Deactivate
diff --git a/oak-segment-azure/pom.xml b/oak-segment-azure/pom.xml
index e0005d6705..11a688f6eb 100644
--- a/oak-segment-azure/pom.xml
+++ b/oak-segment-azure/pom.xml
@@ -101,17 +101,12 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureSegmentStoreService.java b/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureSegmentStoreService.java
index 0ccf7fe475..e76372f99c 100644
--- a/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureSegmentStoreService.java
+++ b/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureSegmentStoreService.java
@@ -39,6 +39,7 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.URISyntaxException;
import java.security.InvalidKeyException;
+import java.util.Hashtable;
import java.util.Objects;
import java.util.Properties;
@@ -63,7 +64,7 @@ public class AzureSegmentStoreService {
public void activate(ComponentContext context, Configuration config) throws IOException {
AzurePersistence persistence = createAzurePersistenceFrom(config);
registration = context.getBundleContext()
- .registerService(SegmentNodeStorePersistence.class.getName(), persistence, new Properties() {{
+ .registerService(SegmentNodeStorePersistence.class, persistence, new Hashtable<String, Object>() {{
put(SERVICE_PID, String.format("%s(%s, %s)", AzurePersistence.class.getName(), config.accountName(), config.rootPath()));
if (!Objects.equals(config.role(), "")) {
put("role", config.role());
diff --git a/oak-segment-remote/pom.xml b/oak-segment-remote/pom.xml
index eddd97e546..7f71c2ad1b 100644
--- a/oak-segment-remote/pom.xml
+++ b/oak-segment-remote/pom.xml
@@ -78,17 +78,17 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-segment-remote/src/main/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/RemotePersistentCacheService.java b/oak-segment-remote/src/main/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/RemotePersistentCacheService.java
index c4c82f2521..a9fdd2988a 100644
--- a/oak-segment-remote/src/main/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/RemotePersistentCacheService.java
+++ b/oak-segment-remote/src/main/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/RemotePersistentCacheService.java
@@ -39,6 +39,7 @@ import org.osgi.service.component.annotations.Reference;
import java.io.File;
import java.io.IOException;
+import java.util.Hashtable;
import java.util.Properties;
@Component(
@@ -61,7 +62,7 @@ public class RemotePersistentCacheService {
osgiWhiteboard = new OsgiWhiteboard(context.getBundleContext());
persistentCache = createPersistentCache(config, closer);
if (persistentCache != null) {
- registration = context.getBundleContext().registerService(PersistentCache.class.getName(), persistentCache, new Properties());
+ registration = context.getBundleContext().registerService(PersistentCache.class, persistentCache, new Hashtable<String, Object>());
}
}
diff --git a/oak-segment-tar/pom.xml b/oak-segment-tar/pom.xml
index 5f96e2a4d2..47aa935bd3 100644
--- a/oak-segment-tar/pom.xml
+++ b/oak-segment-tar/pom.xml
@@ -265,12 +265,17 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/store/StandbyStoreService.java b/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/store/StandbyStoreService.java
index 20698bf801..371aa1fa59 100644
--- a/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/store/StandbyStoreService.java
+++ b/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/store/StandbyStoreService.java
@@ -238,10 +238,10 @@ public class StandbyStoreService {
StandbyClientSync standbyClientSync = builder.build();
closer.register(standbyClientSync);
- Dictionary<Object, Object> dictionary = new Hashtable<Object, Object>();
+ Dictionary<String, Object> dictionary = new Hashtable<>();
dictionary.put("scheduler.period", config.interval());
dictionary.put("scheduler.concurrent", false);
- ServiceRegistration registration = context.getBundleContext().registerService(Runnable.class.getName(), standbyClientSync, dictionary);
+ ServiceRegistration registration = context.getBundleContext().registerService(Runnable.class, standbyClientSync, dictionary);
closer.register(registration::unregister);
log.info("Started standby on port {} with {}s sync frequency", config.port(), config.interval());
diff --git a/oak-shaded-guava/pom.xml b/oak-shaded-guava/pom.xml
index d169ed49cb..6a9a28022e 100644
--- a/oak-shaded-guava/pom.xml
+++ b/oak-shaded-guava/pom.xml
@@ -116,11 +116,6 @@
<artifactId>guava</artifactId>
<version>${shaded.guava.version}</version>
</dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
diff --git a/oak-solr-core/pom.xml b/oak-solr-core/pom.xml
index f33447b0f2..14ff3d1be6 100644
--- a/oak-solr-core/pom.xml
+++ b/oak-solr-core/pom.xml
@@ -216,17 +216,16 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
-
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
diff --git a/oak-solr-osgi/pom.xml b/oak-solr-osgi/pom.xml
index 6d71ee820b..e6b036018f 100644
--- a/oak-solr-osgi/pom.xml
+++ b/oak-solr-osgi/pom.xml
@@ -89,15 +89,8 @@
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- <optional>true</optional>
</dependency>
<dependency>
diff --git a/oak-store-composite/pom.xml b/oak-store-composite/pom.xml
index df01935981..b833748d4b 100644
--- a/oak-store-composite/pom.xml
+++ b/oak-store-composite/pom.xml
@@ -77,20 +77,19 @@
</build>
<dependencies>
- <!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/MountInfoProviderServiceTest.java b/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/MountInfoProviderServiceTest.java
index 12da8a04e5..8a2e3cc371 100644
--- a/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/MountInfoProviderServiceTest.java
+++ b/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/MountInfoProviderServiceTest.java
@@ -20,6 +20,8 @@
package org.apache.jackrabbit.oak.composite;
import org.apache.jackrabbit.guava.common.collect.ImmutableMap;
+
+import java.util.Hashtable;
import java.util.Properties;
import org.apache.jackrabbit.oak.spi.mount.Mount;
import org.apache.jackrabbit.oak.spi.mount.MountInfoProvider;
@@ -185,7 +187,7 @@ public class MountInfoProviderServiceTest {
private void registerActivateMountInfoConfig(MountInfoConfig.Props mountInfoProps) {
MountInfoConfig mountInfoConfig = new MountInfoConfig();
- context.bundleContext().registerService(MountInfoConfig.class.getName(), mountInfoConfig, new Properties());
+ context.bundleContext().registerService(MountInfoConfig.class, mountInfoConfig, new Hashtable<String, Object>());
mountInfoConfig.activate(context.bundleContext(), mountInfoProps);
}
diff --git a/oak-store-document/pom.xml b/oak-store-document/pom.xml
index c681406338..e25fe1dec5 100644
--- a/oak-store-document/pom.xml
+++ b/oak-store-document/pom.xml
@@ -78,20 +78,19 @@
</profiles>
<dependencies>
- <!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation</artifactId>
+ <artifactId>org.osgi.service.cm</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/oak-store-spi/pom.xml b/oak-store-spi/pom.xml
index 02c60af701..351d1c78c2 100644
--- a/oak-store-spi/pom.xml
+++ b/oak-store-spi/pom.xml
@@ -69,12 +69,7 @@
<!-- Optional OSGi dependencies, used only when running within OSGi -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>