Skip to content

Update Jetty to 12.1.15 and 12.0.41, and update minor/patch dependencies - #562

Merged
copybara-service[bot] merged 2 commits into
mainfrom
update-to-jetty-12.1.15
Nov 12, 2026
Merged

copybara-service[bot] merged 2 commits into
mainfrom
update-to-jetty-12.1.15

Conversation

@ludoch

@ludoch ludoch commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Unifies Jetty version upgrades with #560 and #561, and adapts the SDK to Jetty 12.1.15's restructured directory layout.

Upgrades Summary


Jetty 12.1.15 Directory & File Structure Changes

Jetty 12.1.15 reorganized ${jetty.home}/lib/ from a flat layout with prefixed subdirectory names into structured, environment-isolated directories:

Component / Library Previous Layout (Jetty <= 12.1.14) New Layout (Jetty 12.1.15+)
Core Server Jars lib/ lib/ (unchanged)
Shared Support Jars (ASM, SLF4J, ECJ) lib/ / flat lib/support/
EE8 Jars (jetty-ee8-*.jar) lib/ lib/ee8/
EE8 Support Jars (Apache JSP/EL, JSTL, Annotations API) lib/ee8-annotations/, lib/ee8-apache-jsp/, lib/ee8-glassfish-jstl/ lib/ee8/support/
EE8 Servlet API (jetty-servlet-api-4.0.9.jar) lib/ lib/ee8/
EE11 Jars (jetty-ee11-*.jar) lib/ lib/ee11/
EE11 Support Jars (Apache JSP/EL, JSTL, WaSP, Jakarta EL/Annotations APIs) lib/ee11-annotations/, lib/ee11-apache-jsp/, lib/ee11-glassfish-jstl/ lib/ee11/support/
EE11 Servlet API (jakarta.servlet-api-6.1.0.jar) lib/ lib/ee11/support/
AppEngine nolog JSP Jars lib/ee8-apache-jsp/, lib/ee11-apache-jsp/ lib/ee8-apache-jsp/, lib/ee11-apache-jsp/ (preserved in assembly)

Migration & SDK Adaptation

To ensure backward compatibility while supporting the new layout in Jetty121EE8Sdk.java and Jetty121EE11Sdk.java:

  1. Graceful Subdirectory Discovery (getJetty121Jars):

    • Replaced IllegalArgumentException on missing subdirectories with Collections.emptyList().
    • Allows the SDK to query legacy directories (ee8-annotations, ee11-glassfish-jstl) on older releases while seamlessly loading ee8, ee8/support, ee11, ee11/support, and support in 12.1.15+.
    • Filtered out non-nolog apache-jsp from lib/ee8/ and lib/ee11/ to prevent ServiceLoader instantiation conflicts with SLF4J at runtime.
  2. Recursive Jar Search (getJetty121Jar):

    • Updated getJetty121Jar(fileNamePattern) to check root lib/ and recursively search subdirectories (ee8/, ee11/, support/, etc.).
    • Transparently locates relocated dependencies such as jetty-servlet-api-4.0.9.jar and jakarta.servlet-api-6.1.0.jar.
  3. QuickStart Classpath Assembly (getQuickStartClasspath):

    • Detected lib/eeX/ presence to dynamically switch between legacy and 12.1.15 layouts.
    • For 12.1.15, includes container jars from lib/eeX/, required annotation/auth APIs from lib/eeX/support/, and ASM/SLF4J from lib/support/.
    • Excluded JSP/WaSP jars from the QuickStart generator classpath so that non-JSP applications do not register unwanted ContainerInitializer entries (e.g. TldScanner).
  4. JSP Compilation & User Libraries (getJetty121JspJars):

    • In 12.1.15, loads glassfish-jstl from lib/eeX/, support libraries (apache-el, apache-jsp, jstl, jsp-api, jakarta.el, and wasp) from lib/eeX/support/, and the custom AppEngine nolog jar from lib/eeX-apache-jsp/.
    • Added jakarta.el.jakarta.el-api-6.0.1.jar into EE11 JSP libraries, fixing RecordELResolver NoClassDefFoundError during runtime JSP compilation.
    • Ensured wasp-4.0.4.jar is copied to WEB-INF/lib when compiling JSPs so TldScanner is available when JSPs are present.
  5. Runtime Classpath (getImplLibFiles):

    • Updated getImplLibFiles() to include ee8, ee8/support, ee11, ee11/support, and support.
    • Used LinkedHashSet to deduplicate jars while maintaining deterministic classpath ordering.

Closes #560
Closes #561

- Update Jetty to 12.1.15 and 12.0.41
- Bump actions/setup-java from 6.1.0 to 6.2.0 (#560)
- Bump com.google.guava:guava and guava-testlib from 33.7.2-jre to 33.8.0-jre (#561)
- Bump com.google.errorprone:error_prone_annotations from 2.51.0 to 2.52.0 (#561)
- Bump org.jsoup:jsoup from 1.23.2 to 1.24.1 (#561)
- Bump joda-time:joda-time from 2.15.0 to 2.15.1 (#561)
@copybara-service
copybara-service Bot merged commit cc260c3 into main Nov 12, 2026
14 checks passed
@copybara-service
copybara-service Bot deleted the update-to-jetty-12.1.15 branch November 12, 2026 06:08
@lachlan-roberts

Copy link
Copy Markdown
Collaborator

@ludoch I ran Claude over this and it says there is one thing this PR missed, is the ContainerIncludeJarPattern set in DevAppEngineWebAppContext under runtime/local_jetty121_ee11 no longer matches the servlet api jar.

12.1.15 renamed it to ee11/support/jakarta.servlet.jakarta.servlet-api-6.1.0.jar and the regex is anchored on /jakarta.servlet-api-. The jstl half still matches, so only the servlet api jar drops out of the container scan, and nothing in CI covers the dev server with spring boot which is what this was added for.

So I think we should drop the / anchor so it reads .*jakarta.servlet-api-[^/]*\.jar$, which matches both the old and the new name.

@ludoch

ludoch commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Thank you @lachlan-roberts! Addressed in follow-up PR #563.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants