Compiling to Java 11

  Written by The Jahia Team
   Estimated reading time:

Jahia 8 modules can be compiled to Java 11. To enable this, you will need to update your pom.xml as indicated below.

First, specify the desired compilation target by adding the following entry:


Then, upgrade the maven-jahia-plugin to use the latest version:


And finally, upgrade the versions of both the maven-bundle-plugin and bndlib that are inherited from the jahia-module pom, to use ones that do support Java 11. This can be accomplished by adding the following entry:

Warning: Please be aware that modules relying on OSGI blueprint or Spring should not be compiled to Java 11. While compilation would succeed, those modules may not function properly once deployed in Jahia.