[ 
https://issues.apache.org/jira/browse/FELIX-6875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on FELIX-6875 started by Paul Rütter.
------------------------------------------
> Modules not built by CI fail to build or test on JDK 21 and 25
> --------------------------------------------------------------
>
>                 Key: FELIX-6875
>                 URL: https://issues.apache.org/jira/browse/FELIX-6875
>             Project: Felix
>          Issue Type: Task
>          Components: Bundle Repository (OBR), Configuration Admin, 
> Coordinator Service, Declarative Services (SCR), Features, File Install, 
> Health Checks, Inventory, Metatype Service, Web Console
>            Reporter: Paul Rütter
>            Assignee: Paul Rütter
>            Priority: Major
>
> h2. Problem
> CI builds 17 of the repository's 34 top-level modules. The other modules are 
> never built, so they have drifted: the Dependabot bumps merged into them were 
> merged without a build.
> Building the unbuilt modules that have been maintained recently (or only need 
> a trivial change) with {{mvn clean verify}} on JDK 21 and JDK 25 shows that 
> 21 of the 22 build units fail on master. Only {{main.distribution}} passes. 
> The two JDKs fail the same way. None of the failures is caused by source code 
> using a JDK construct that was removed; they come from tooling and test 
> infrastructure:
> ||Cause||Modules||
> |{{--release 7}} is no longer accepted (JDK 21), through felix-parent 
> 5/6|metatype, coordinator, healthcheck/api, healthcheck/annotation|
> |felix-parent 3 runs a JavaScript Ant task; Nashorn was removed in JDK 
> 15|scr-ext-anno|
> |felix-parent 7 uses ianal-maven-plugin 1.0-alpha-1, which cannot open 
> {{java.io.File}} on JDK 17+|inventory, features, webconsole-plugins (5), 
> healthcheck/webconsoleplugin|
> |Mockito 1.x defines classes through cglib, which JDK 17+ refuses; Mockito 
> 5.17 and earlier cannot mock on JVM 25|configadmin-plugins/interpolation, 
> healthcheck/generalchecks, healthcheck/core, healthcheck/webconsoleplugin|
> |Integration tests pinned to an old framework release|healthcheck/core|
> |{{bnd-maven-plugin}} 4.1.0 throws a 
> ConcurrentModificationException|healthcheck/api|
> |Depends on a SNAPSHOT of its own module that no longer exists, and compiles 
> to Java 1.5|bundlerepository.osgi-ct|
> |A test that sets {{java.io.tmpdir}} at runtime, which JDK 12+ reads only 
> once at startup|fileinstall|
> h2. Change
>  * Move the affected modules from felix-parent 2.1-7 to felix-parent 9, as 
> the other modules already were.
>  * Use mockito-core 5.18.0 and rename the {{org.mockito.Matchers}} imports 
> (removed in Mockito 4) to {{{}ArgumentMatchers{}}}. Keep a {{null}} argument 
> matching with {{nullable(...)}} in HttpRequestsCheckTest.
>  * Run healthcheck/core's integration tests on framework 8.0.0.
>  * Use bnd-maven-plugin 7.1.0 in healthcheck/api.
>  * Point osgi-ct at the released bundlerepository 2.0.10.
>  * Make fileinstall's testInvalidTempDir configure the temp directory through 
> {{{}felix.fileinstall.tmpdir{}}}.
>  * Adding these modules to the CI workflow, so that they cannot drift again.
> h2. Impact
>  * *Java level:* bundles that were compiled for Java 1.5 to 7 are now 
> compiled for Java 8 (felix-parent 9). The next release of each of those 
> bundles will therefore require Java 8, and its {{Require-Capability: 
> osgi.ee}} changes accordingly. Released artifacts are not affected.
>  * No change to the bundles' code or runtime behaviour. Everything else is 
> build configuration and tests.
> h2. Out of scope
>  * eventadmin, systemready and rootcause: not released since 2021/2022 and 
> not maintained, so they are left as they are.
> h2. Related
>  * FELIX-6807 (Java 25 LTS support)
>  * FELIX-6870 (tests run against released bundles instead of the code being 
> built)



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to