You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2021/09/21 15:39:29 UTC

[sling-org-apache-sling-commons-threads] branch issue/SLING-10836 created (now e41952c)

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

rombert pushed a change to branch issue/SLING-10836
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-threads.git.


      at e41952c  SLING-10836 - Update commons.threads to parent pom 45

This branch includes the following new commits:

     new e41952c  SLING-10836 - Update commons.threads to parent pom 45

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[sling-org-apache-sling-commons-threads] 01/01: SLING-10836 - Update commons.threads to parent pom 45

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch issue/SLING-10836
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-threads.git

commit e41952c045552a8b5462fbb979f607e26c894626
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Sep 21 17:38:52 2021 +0200

    SLING-10836 - Update commons.threads to parent pom 45
---
 bnd.bnd                                            |  2 ++
 pom.xml                                            | 34 +++++++++++-----------
 .../sling/commons/threads/impl/Activator.java      |  2 ++
 3 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/bnd.bnd b/bnd.bnd
new file mode 100644
index 0000000..6ef6ae7
--- /dev/null
+++ b/bnd.bnd
@@ -0,0 +1,2 @@
+Provide-Capability: osgi.service;objectClass=org.apache.sling.commons.threads.ThreadPoolManager,\
+    osgi.service;objectClass=org.apache.sling.commons.threads.jmx.ThreadPoolMBean
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index ae1ce01..a764bff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,13 +22,12 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.sling</groupId>
-        <artifactId>sling</artifactId>
-        <version>32</version>
+        <artifactId>sling-bundle-parent</artifactId>
+        <version>45</version>
         <relativePath />
     </parent>
 
     <artifactId>org.apache.sling.commons.threads</artifactId>
-    <packaging>bundle</packaging>
     <version>3.2.23-SNAPSHOT</version>
 
     <name>Apache Sling Commons Threads</name>
@@ -46,20 +45,8 @@
     <build>
         <plugins>
             <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Activator>
-                            org.apache.sling.commons.threads.impl.Activator
-                        </Bundle-Activator>
-                        <Provide-Capability>
-                            osgi.service;objectClass=org.apache.sling.commons.threads.ThreadPoolManager,
-                            osgi.service;objectClass=org.apache.sling.commons.threads.jmx.ThreadPoolMBean
-                        </Provide-Capability>
-                    </instructions>
-                </configuration>
+                <groupId>biz.aQute.bnd</groupId>
+                <artifactId>bnd-maven-plugin</artifactId>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -82,6 +69,14 @@
             <artifactId>osgi.cmpn</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.annotation.versioning</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.annotation.bundle</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
         </dependency>
@@ -105,4 +100,9 @@
             <version>1.2.6</version>
         </dependency>
     </dependencies>
+
+    <properties>
+        <sling.java.version>8</sling.java.version>
+        <project.build.outputTimestamp>1</project.build.outputTimestamp>
+    </properties>
 </project>
diff --git a/src/main/java/org/apache/sling/commons/threads/impl/Activator.java b/src/main/java/org/apache/sling/commons/threads/impl/Activator.java
index 5bb85fe..34a5d53 100644
--- a/src/main/java/org/apache/sling/commons/threads/impl/Activator.java
+++ b/src/main/java/org/apache/sling/commons/threads/impl/Activator.java
@@ -22,6 +22,7 @@ import java.util.Dictionary;
 import java.util.Hashtable;
 
 import org.apache.sling.commons.threads.ThreadPoolManager;
+import org.osgi.annotation.bundle.Header;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
@@ -31,6 +32,7 @@ import org.osgi.service.cm.ManagedServiceFactory;
 /**
  * This activator registers the thread pool manager.
  */
+@Header(name = Constants.BUNDLE_ACTIVATOR, value = "${@class}")
 public class Activator implements BundleActivator {
 
     /** The service registration for the thread pool manager. */