You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2022/06/23 07:10:38 UTC

[sling-org-apache-sling-feature-apiregions] 01/01: SLING-11405 update to Bundle Parent 48

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch feature/use-parent-48
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-apiregions.git

commit 9e7fa21f7ab60a31c3fc002af1ced3a9015c75cf
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Jun 23 09:10:32 2022 +0200

    SLING-11405 update to Bundle Parent 48
    
    Update to OSGi R7
---
 bnd.bnd                                            |  2 +
 pom.xml                                            | 47 +++++++++++-----------
 .../sling/feature/apiregions/impl/Activator.java   |  2 +
 3 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/bnd.bnd b/bnd.bnd
new file mode 100644
index 0000000..5f6c2a1
--- /dev/null
+++ b/bnd.bnd
@@ -0,0 +1,2 @@
+ExtensionBundle-Activator: org.apache.sling.feature.apiregions.impl.Activator</ExtensionBundle-Activator>
+Fragment-Host: system.bundle;extension:=framework
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 7b1f90c..f8f4992 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,14 +16,13 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.sling</groupId>
-        <artifactId>sling</artifactId>
-        <version>41</version>
+        <artifactId>sling-bundle-parent</artifactId>
+        <version>48</version>
         <relativePath />
     </parent>
 
     <artifactId>org.apache.sling.feature.apiregions</artifactId>
     <version>1.1.9-SNAPSHOT</version>
-    <packaging>bundle</packaging>
 
     <name>Apache Sling Feature API Regions Runtime</name>
     <description>
@@ -39,25 +38,11 @@
 
     <properties>
         <sling.java.version>8</sling.java.version>
+        <project.build.outputTimestamp>1</project.build.outputTimestamp>
     </properties>
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <version>5.1.2</version>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <ExtensionBundle-Activator>org.apache.sling.feature.apiregions.impl.Activator</ExtensionBundle-Activator>
-                        <Fragment-Host>system.bundle;extension:=framework</Fragment-Host>
-                    </instructions>
-                
-                    <!--  Skip baselining for 0.x version -->
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.rat</groupId>
                 <artifactId>apache-rat-plugin</artifactId>
@@ -78,10 +63,25 @@
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>osgi.core</artifactId>
-            <version>6.0.0</version>
+            <artifactId>org.osgi.annotation.bundle</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.framework</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.util.tracker</artifactId>
             <scope>provided</scope>
-        </dependency>        
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.resource</artifactId>
+            <version>1.0.1</version>
+            <scope>provided</scope>
+        </dependency>
 
         <!-- Testing -->
         <dependency>
@@ -97,9 +97,8 @@
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>osgi.cmpn</artifactId>
-            <version>6.0.0</version>
+            <artifactId>org.osgi.service.cm</artifactId>
             <scope>test</scope>
-        </dependency>        
+        </dependency>
     </dependencies>
 </project>
diff --git a/src/main/java/org/apache/sling/feature/apiregions/impl/Activator.java b/src/main/java/org/apache/sling/feature/apiregions/impl/Activator.java
index 1bd0aae..36bfd56 100644
--- a/src/main/java/org/apache/sling/feature/apiregions/impl/Activator.java
+++ b/src/main/java/org/apache/sling/feature/apiregions/impl/Activator.java
@@ -30,6 +30,7 @@ import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import org.osgi.annotation.bundle.Header;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
@@ -46,6 +47,7 @@ import org.osgi.resource.Resource;
 import org.osgi.util.tracker.ServiceTracker;
 import org.osgi.util.tracker.ServiceTrackerCustomizer;
 
+@Header(name=Constants.EXTENSION_BUNDLE_ACTIVATOR, value="${@class}")
 public class Activator implements BundleActivator, FrameworkListener {
     static final String CONFIG_ADMIN_PKG_NAME = "org.osgi.service.cm";
     static final String MANAGED_SERVICE_CLASS_NAME = CONFIG_ADMIN_PKG_NAME + ".ManagedService";