Hi TL;DR - updating the build of "org.apache.sling.scripting.jsp" to work with Java 17 and beyond requires bumping exported the version of the exported package "org.apache.sling.scripting.jsp.jasper.runtime" from 2.5.0 to 3.0.0. Is this acceptable?
Whenever I build the module org.apache.sling.scripting.jsp with Java 17, I get a ConcurrentModificationException from within the (ancient version of) the bnd-maven-plugin. Therefore, I have been looking at increasing the sling-bundle-parent version of org.apache.sling.scripting.jsp from 35 to 60, in order to implicitly bump the version of bnd used under the hood, and because that's where we want our modules to get to. To complicate matters, there is a bnd warning "Export org.apache.sling.scripting.jsp.jasper.runtime, has 2, private references [org.apache.sling.scripting.jsp.jasper, org.apache.sling.scripting.jsp.jasper.el]". This warning is turned into an error when I update the parent and fails the build. In order to resolve the warning/error, I looked at moving some classes from the "runtime" package to other (not exported) packages. This worked well and allowed me to leave the classes required by generated JSPs to remain in the exported package without any changes to their API. However, because I remove several classes from the package, I need to bump its major version. I explored exporting the referenced packages as well, but soon dismissed that option, because it leads to nearly all classes in the bundle being exported. The bundle currently exports version 2.5.0 of the package "org.apache.sling.scripting.jsp.jasper.runtime", which AFAIU is used by compiled JSP scripts, as can be seen in the class Generator[1], which converts JSPs to java source files. I am wondering if we can assume that "only" compiled JSPs use this package? Does anyone have opinions on how to proceed? Is it acceptable to bump the export version of "org.apache.sling.scripting.jsp.jasper.runtime" from 2.5.0 to 3.0.0 in order to get Java 17+ support in the build? Or should we leave the bundle alone and only ever build it with Java 11? Thanks Julian [1] https://github.com/apache/sling-org-apache-sling-scripting-jsp/blob/6fe463b0b538fb177ad93acee7590b3ff702bac8/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/Generator.java