Do not package java.xml.bind and java.activation modules in WebSphere Liberty applications

MSAL

The java.xml.bind and java.activation modules were removed in Java 11. WebSphere Liberty provides its own implementation of the modules, which can be used by specifying the jaxb-2.2 feature in the server.xml file. This recipe updates the javax.xml.bind and javax.activation dependencies to use the provided scope to avoid class loading issues.

org.openrewrite.java.migrate.RemovedJaxBModuleProvided
mod run . --recipe=org.openrewrite.java.migrate.RemovedJaxBModuleProvided

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change Maven dependency scope for javax.xml.bind:jaxb-api to provided
  2. Change a Gradle dependency configuration javax.xml.bind:jaxb-api to compileOnly
  3. Change Maven dependency scope for javax.activation:activation to provided
  4. Change a Gradle dependency configuration javax.activation:activation to compileOnly