You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pa...@apache.org on 2026/08/29 21:19:45 UTC

(felix-dev) branch fix-module-builds-modern-jdk created (now 4c15f1bb0e)

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

paulrutter pushed a change to branch fix-module-builds-modern-jdk
in repository https://gitbox.apache.org/repos/asf/felix-dev.git


      at 4c15f1bb0e Make the remaining module builds work on modern JDKs

This branch includes the following new commits:

     new 4c15f1bb0e Make the remaining module builds work on modern JDKs

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.



(felix-dev) 01/01: Make the remaining module builds work on modern JDKs

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

paulrutter pushed a commit to branch fix-module-builds-modern-jdk
in repository https://gitbox.apache.org/repos/asf/felix-dev.git

commit 4c15f1bb0efef03057b5a22ef7a0c5b368802fa1
Author: Paul Rütter <pa...@blueconic.com>
AuthorDate: Sat Aug 29 23:19:34 2026 +0200

    Make the remaining module builds work on modern JDKs
    
    Several modules cannot be built on a current JDK. They declare a felix-parent
    version that does not match the local pom, so the relativePath is ignored and Maven
    silently resolves an old released felix-parent from Maven Central instead. Those
    parents hardcode felix.java.version 6 or 7, and javac rejects release levels below 8
    from JDK 20 onwards:
    
        error: release version 7 not supported
    
    They also pin maven-surefire-plugin 2.x, which cannot parse the JDK 25 version string
    and fails with a NullPointerException before running any test:
    
        Cannot invoke "...JavaVersion.atLeast(...)" because
        "...SystemUtils.JAVA_SPECIFICATION_VERSION_AS_ENUM" is null
    
    Bumping each module to felix-parent 9 fixes both at once, rather than overriding the
    compiler and plugin configuration module by module:
    
        bundlerepository  felix-parent 2.1 -> 9
        connect, log.extension, resolver, utils   felix-parent 5 -> 9
    
    Alongside that:
    
    - source/target levels below 8 are raised to 8 in connect, bundlerepository and the
      three examples/extenderbased modules, since javac no longer accepts them.
    - bundlerepository declares junit and mockito explicitly. felix-parent 2.1 supplied
      them to every module and felix-parent 9 does not. mockito-all 1.x is replaced by
      mockito-core, because the cglib it bundles cannot generate classes for recent class
      file versions.
    - resolver moves from mockito-all 1.10.19 to mockito-core for the same reason.
    
    No production code is changed in any of these modules, so no versions are bumped;
    recording the resulting execution environment change is left to whoever prepares the
    next release of each.
    
    The modules are added to the CI matrix so the builds are actually exercised.
    
    Co-Authored-By: Claude Opus 4.8 <no...@anthropic.com>
---
 .github/workflows/maven-ci.yml          | 42 +++++++++++++++++++++++++++++++++
 bundlerepository/pom.xml                | 21 ++++++++++++++---
 connect/pom.xml                         |  6 ++---
 examples/extenderbased.circle/pom.xml   |  4 ++--
 examples/extenderbased.square/pom.xml   |  4 ++--
 examples/extenderbased.triangle/pom.xml |  4 ++--
 log.extension/pom.xml                   |  6 ++---
 resolver/pom.xml                        |  8 +++----
 utils/pom.xml                           |  7 +++---
 9 files changed, 79 insertions(+), 23 deletions(-)

diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml
index c9599684d1..ff3450b323 100644
--- a/.github/workflows/maven-ci.yml
+++ b/.github/workflows/maven-ci.yml
@@ -11,6 +11,12 @@ on:
       - 'log/**'
       - 'webconsole/**'
       - 'framework/**'
+      - 'utils/**'
+      - 'connect/**'
+      - 'resolver/**'
+      - 'bundlerepository/**'
+      - 'log.extension/**'
+      - 'examples/**'
   pull_request:
     branches: [ "master" ]
     paths:
@@ -22,6 +28,12 @@ on:
       - 'log/**'
       - 'framework/**'
       - 'gogo/**'
+      - 'utils/**'
+      - 'connect/**'
+      - 'resolver/**'
+      - 'bundlerepository/**'
+      - 'log.extension/**'
+      - 'examples/**'
 
 permissions: {}
 
@@ -65,6 +77,18 @@ jobs:
             - 'framework/**'
           gogo:
             - 'gogo/**'
+          utils:
+            - 'utils/**'
+          connect:
+            - 'connect/**'
+          resolver:
+            - 'resolver/**'
+          bundlerepository:
+            - 'bundlerepository/**'
+          log.extension:
+            - 'log.extension/**'
+          examples:
+            - 'examples/**'
 
     - name: Felix SCR
       if: steps.changes.outputs.scr == 'true'
@@ -93,6 +117,24 @@ jobs:
     - name: Felix Gogo Shell
       if: steps.changes.outputs.gogo == 'true'
       run: mvn -B -V -Dstyle.color=always --file gogo/pom.xml clean verify
+    - name: Felix utils
+      if: steps.changes.outputs.utils == 'true'
+      run: mvn -B -V -Dstyle.color=always --file utils/pom.xml clean verify
+    - name: Felix connect
+      if: steps.changes.outputs.connect == 'true'
+      run: mvn -B -V -Dstyle.color=always --file connect/pom.xml clean verify
+    - name: Felix resolver
+      if: steps.changes.outputs.resolver == 'true'
+      run: mvn -B -V -Dstyle.color=always --file resolver/pom.xml clean verify
+    - name: Felix bundlerepository
+      if: steps.changes.outputs.bundlerepository == 'true'
+      run: mvn -B -V -Dstyle.color=always --file bundlerepository/pom.xml clean verify
+    - name: Felix log.extension
+      if: steps.changes.outputs.log.extension == 'true'
+      run: mvn -B -V -Dstyle.color=always --file log.extension/pom.xml clean verify
+    - name: Felix examples
+      if: steps.changes.outputs.examples == 'true'
+      run: mvn -B -V -Dstyle.color=always --file examples/pom.xml clean verify
     - name: Upload Test Results
       if: always()
       uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
diff --git a/bundlerepository/pom.xml b/bundlerepository/pom.xml
index be6c3ebf8a..d030e2e680 100644
--- a/bundlerepository/pom.xml
+++ b/bundlerepository/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.felix</groupId>
     <artifactId>felix-parent</artifactId>
-    <version>2.1</version>
+    <version>9</version>
     <relativePath>../pom/pom.xml</relativePath>
   </parent>
   <modelVersion>4.0.0</modelVersion>
@@ -100,6 +100,21 @@
         <version>3.4</version>
         <scope>test</scope>
     </dependency>
+    <!-- felix-parent 2.1 supplied junit and mockito-all to every module; from
+         felix-parent 9 on they have to be declared here. mockito-all 1.x could not
+         generate classes on JDK 25 anyway, so mockito-core is used instead. -->
+    <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>4.13.2</version>
+        <scope>test</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.mockito</groupId>
+        <artifactId>mockito-core</artifactId>
+        <version>5.18.0</version>
+        <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
@@ -107,8 +122,8 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
-          <target>1.5</target>
-          <source>1.5</source>
+          <target>8</target>
+          <source>8</source>
         </configuration>
       </plugin>
 
diff --git a/connect/pom.xml b/connect/pom.xml
index 8cbf5d093f..a71ec78d29 100644
--- a/connect/pom.xml
+++ b/connect/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>felix-parent</artifactId>
-        <version>5</version>
+        <version>9</version>
         <relativePath>../pom/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -97,8 +97,8 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <target>1.6</target>
-                    <source>1.6</source>
+                    <target>8</target>
+                    <source>8</source>
                 </configuration>
             </plugin>
             <plugin>
diff --git a/examples/extenderbased.circle/pom.xml b/examples/extenderbased.circle/pom.xml
index 1afccaaab2..98ea05d538 100644
--- a/examples/extenderbased.circle/pom.xml
+++ b/examples/extenderbased.circle/pom.xml
@@ -60,8 +60,8 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
+          <source>8</source>
+          <target>8</target>
         </configuration>
       </plugin>
     </plugins>
diff --git a/examples/extenderbased.square/pom.xml b/examples/extenderbased.square/pom.xml
index 02723f4f83..7fb5872664 100644
--- a/examples/extenderbased.square/pom.xml
+++ b/examples/extenderbased.square/pom.xml
@@ -60,8 +60,8 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
+          <source>8</source>
+          <target>8</target>
         </configuration>
       </plugin>
     </plugins>
diff --git a/examples/extenderbased.triangle/pom.xml b/examples/extenderbased.triangle/pom.xml
index b0895a7d8d..78eff1a5f6 100644
--- a/examples/extenderbased.triangle/pom.xml
+++ b/examples/extenderbased.triangle/pom.xml
@@ -60,8 +60,8 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
+          <source>8</source>
+          <target>8</target>
         </configuration>
       </plugin>
     </plugins>
diff --git a/log.extension/pom.xml b/log.extension/pom.xml
index 111884fac8..724c77a38c 100644
--- a/log.extension/pom.xml
+++ b/log.extension/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.felix</groupId>
     <artifactId>felix-parent</artifactId>
-    <version>5</version>
+    <version>9</version>
     <relativePath>../pom/pom.xml</relativePath>
   </parent>
   <modelVersion>4.0.0</modelVersion>
@@ -33,8 +33,8 @@
   <artifactId>org.apache.felix.log.extension</artifactId>
 
   <properties>
-    <maven.compiler.source>1.7</maven.compiler.source>
-    <maven.compiler.target>1.7</maven.compiler.target>
+    <maven.compiler.source>8</maven.compiler.source>
+    <maven.compiler.target>8</maven.compiler.target>
   </properties>
 
   <scm>
diff --git a/resolver/pom.xml b/resolver/pom.xml
index cc2844dfd9..1355825d5a 100644
--- a/resolver/pom.xml
+++ b/resolver/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.felix</groupId>
     <artifactId>felix-parent</artifactId>
-    <version>5</version>
+    <version>9</version>
     <relativePath>../pom/pom.xml</relativePath>
   </parent>
   <modelVersion>4.0.0</modelVersion>
@@ -61,14 +61,14 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <!-- mockito-all 1.x bundles a cglib that cannot generate classes on JDK 25 -->
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
-      <version>1.10.19</version>
+      <artifactId>mockito-core</artifactId>
+      <version>5.18.0</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
   <properties>
-    <felix.java.version>6</felix.java.version>
   </properties>
   <build>
     <plugins>
diff --git a/utils/pom.xml b/utils/pom.xml
index 7b028dbe04..b591157659 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.felix</groupId>
 		<artifactId>felix-parent</artifactId>
-		<version>5</version>
+		<version>9</version>
 		<relativePath />
 	</parent>
 
@@ -38,7 +38,6 @@
   </scm>
 
     <properties>
-        <felix.java.version>7</felix.java.version>
     </properties>
 
     <dependencies>
@@ -83,8 +82,8 @@
             <plugin>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>1.7</source>
-                    <target>1.7</target>
+                    <source>8</source>
+                    <target>8</target>
                 </configuration>
             </plugin>
         </plugins>