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/12/15 15:38:40 UTC

[sling-org-apache-sling-commons-log-webconsole] 02/02: SLING-11007 - commons.log.webconsole: upgrade to parent pom 46

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

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

commit 42fb382622734790a73247c7c140c62bf61b5fa3
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Dec 15 16:32:35 2021 +0100

    SLING-11007 - commons.log.webconsole: upgrade to parent pom 46
    
    - update to the latest parent pom
    - switch to the bnd-maven-plugin
    - update to the latest felix framework
---
 bnd.bnd                                            |  4 +++
 pom.xml                                            | 36 +++++-----------------
 .../commons/log/webconsole/internal/Activator.java |  3 ++
 3 files changed, 15 insertions(+), 28 deletions(-)

diff --git a/bnd.bnd b/bnd.bnd
new file mode 100644
index 0000000..e2688a2
--- /dev/null
+++ b/bnd.bnd
@@ -0,0 +1,4 @@
+Bundle-DocURL: http://sling.apache.org/site/logging.html
+Import-Package: javax.servlet; \
+              javax.servlet.http;version=2.3, \
+              *
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 571c152..007a733 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,14 +22,13 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.sling</groupId>
-    <artifactId>sling</artifactId>
-    <version>30</version>
+    <artifactId>sling-bundle-parent</artifactId>
+    <version>46</version>
     <relativePath />
   </parent>
 
   <artifactId>org.apache.sling.commons.log.webconsole</artifactId>
   <version>1.0.1-SNAPSHOT</version>
-  <packaging>bundle</packaging>
 
   <name>Apache Sling Log WebConsole</name>
   <description>
@@ -45,6 +44,7 @@
   <properties>
     <slf4j.version>1.7.21</slf4j.version>
     <pax-exam.version>4.13.3</pax-exam.version>
+    <project.build.outputTimestamp>10</project.build.outputTimestamp>
 
     <bundle.build.dir>
       ${basedir}/target
@@ -56,30 +56,6 @@
 
   <build>
     <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <instructions>
-            <Bundle-Activator>
-              org.apache.sling.commons.log.webconsole.internal.Activator
-            </Bundle-Activator>
-            <Bundle-DocURL>
-              http://sling.apache.org/site/logging.html
-            </Bundle-DocURL>
-            <Embed-Dependency>
-              org.apache.sling.commons.osgi;inline=
-              org/apache/sling/commons/osgi/PropertiesUtil*.class
-            </Embed-Dependency>
-            <Import-Package>
-              javax.servlet;
-              javax.servlet.http;version=2.3,
-              *
-            </Import-Package>
-          </instructions>
-        </configuration>
-      </plugin>
       <!-- Required for pax exam-->
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
@@ -214,6 +190,10 @@
       <artifactId>osgi.core</artifactId>
     </dependency>
     <dependency>
+        <groupId>org.osgi</groupId>
+        <artifactId>org.osgi.annotation.bundle</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.apache.felix</groupId>
       <artifactId>org.apache.felix.webconsole</artifactId>
       <version>4.3.0</version>
@@ -243,7 +223,7 @@
     <dependency>
       <groupId>org.apache.felix</groupId>
       <artifactId>org.apache.felix.framework</artifactId>
-      <version>5.6.0</version>
+      <version>7.0.1</version>
       <scope>test</scope>
     </dependency>
 
diff --git a/src/main/java/org/apache/sling/commons/log/webconsole/internal/Activator.java b/src/main/java/org/apache/sling/commons/log/webconsole/internal/Activator.java
index dd8c2f6..c776cd6 100644
--- a/src/main/java/org/apache/sling/commons/log/webconsole/internal/Activator.java
+++ b/src/main/java/org/apache/sling/commons/log/webconsole/internal/Activator.java
@@ -20,11 +20,14 @@
 package org.apache.sling.commons.log.webconsole.internal;
 
 import org.apache.sling.commons.log.logback.webconsole.LogPanel;
+import org.osgi.annotation.bundle.Header;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
 import org.osgi.util.tracker.ServiceTracker;
 
+@Header(name = Constants.BUNDLE_ACTIVATOR, value = "${@class}")
 public class Activator implements BundleActivator {
     private ServiceTracker<LogPanel, LogWebConsolePlugin> panelTracker;