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-commons-log.git
The following commit(s) were added to refs/heads/master by this push:
new 592d852 SLING-12240 - Upgrade to parent pom 52 and Java 11
592d852 is described below
commit 592d852e3044559e9b267548c59e18b47bea9e0d
Author: Robert Munteanu <[email protected]>
AuthorDate: Wed Jan 24 15:40:04 2024 +0100
SLING-12240 - Upgrade to parent pom 52 and Java 11
---
pom.xml | 52 +++++++++++-----------
.../logback/integration/PackagingDataTestUtil.java | 8 ++--
2 files changed, 31 insertions(+), 29 deletions(-)
diff --git a/pom.xml b/pom.xml
index 7651294..f5649b0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling-bundle-parent</artifactId>
- <version>46</version>
+ <version>52</version>
<relativePath />
</parent>
@@ -49,7 +49,7 @@
<logback.version>1.2.13</logback.version>
<!-- Higher versions of pax exam cause class loading errors -->
<pax-exam.version>4.13.2</pax-exam.version>
- <sling.java.version>8</sling.java.version>
+ <sling.java.version>11</sling.java.version>
<project.build.outputTimestamp>1</project.build.outputTimestamp>
<bundle.build.dir>
${basedir}/target
@@ -60,24 +60,6 @@
</properties>
<build>
- <pluginManagement>
- <plugins>
- <!--
- Unfortunately the <ignores> sections do not seem to
- properly work, so the sniffer is disabled by default
- if the project is built with Java 8.
- -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>animal-sniffer-maven-plugin</artifactId>
- <version>1.8</version>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
-
<plugins>
<plugin>
<groupId>biz.aQute.bnd</groupId>
@@ -201,22 +183,39 @@
<!-- OSGi Libraries not included here -->
<dependency>
- <groupId>org.osgi</groupId>
- <artifactId>osgi.core</artifactId>
- <scope>provided</scope>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.framework</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.osgi</groupId>
- <artifactId>osgi.cmpn</artifactId>
- <scope>provided</scope>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.cm</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.event</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.util.tracker</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.resource</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.versioning</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.bundle</artifactId>
+ <scope>provided</scope>
</dependency>
<!-- OSGi Command Line Shell support -->
@@ -231,6 +230,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
diff --git
a/src/test/java/org/apache/sling/commons/log/logback/integration/PackagingDataTestUtil.java
b/src/test/java/org/apache/sling/commons/log/logback/integration/PackagingDataTestUtil.java
index 8e9b0da..d599380 100644
---
a/src/test/java/org/apache/sling/commons/log/logback/integration/PackagingDataTestUtil.java
+++
b/src/test/java/org/apache/sling/commons/log/logback/integration/PackagingDataTestUtil.java
@@ -19,15 +19,15 @@
package org.apache.sling.commons.log.logback.integration;
+import static org.ops4j.pax.tinybundles.core.TinyBundles.bundle;
+import static org.ops4j.pax.tinybundles.core.TinyBundles.withBnd;
+
import java.io.InputStream;
import java.net.URL;
import org.ops4j.pax.tinybundles.core.TinyBundle;
import org.osgi.framework.Constants;
-import static org.ops4j.pax.tinybundles.core.TinyBundles.bundle;
-import static org.ops4j.pax.tinybundles.core.TinyBundles.withBnd;
-
/**
* Have to use a separate class due to TinyBundles having issue and recommends
put bundle
* creation logic in separate class
@@ -41,8 +41,10 @@ public class PackagingDataTestUtil {
//Avoid referring to test bundle classes otherwise they get loaded in
2 bundles i.e.
//pax exam probe bundle and our packagedatatest. So we refer only by
class name strings
String activatorClassName =
"org.apache.sling.commons.log.logback.integration.bundle.PackageDataActivator";
+ // not needed and causes problems when running with Java 11 since the
version of bndlib is too old
TinyBundle tb = bundle()
.set(Constants.BUNDLE_ACTIVATOR, activatorClassName)
+ .set("-noee", Boolean.TRUE.toString())
.set(Constants.BUNDLE_SYMBOLICNAME, TEST_BUNDLE_NAME)
.set(Constants.BUNDLE_VERSION, TEST_BUNDLE_VERSION);
add(tb,
"org.apache.sling.commons.log.logback.integration.bundle.TestRunnable");