Java 11 code is failing in cloud manager build

Description description

Environment

AEM Cloud Service

Issue/Symptoms

The code related to java version => 11 is failing in the build process via the cloud manager.

Examples of Java error messages that you may observe:

Example 1:

package java.net.http does not exist

Example 2:

Initialize a static Map using Java 9 Map.of()

error:
symbol: method of(java.lang.String,java.lang.String)
location: interface java.util.Map

Resolution resolution

To resolve the issue, update the Maven project configuration to use Java 11.

Cause

By default, projects are built by the Cloud Manager build process using the Oracle 8 JDK.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f