adobe / aem-project-archetype

Maven template to create best-practice websites on AEM.
https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetype/overview.html
Apache License 2.0
544 stars 419 forks source link

ASSETS-35923 create .cloudmanager/java-version for cloud projects, min jdk11 #1175

Closed adamcin closed 6 months ago

adamcin commented 6 months ago

Projects created for cloud should be expected to build with a minimum jdk version of 11.

Description

Related Issue

ASSETS-35923 Release 15262 aem-sdk-api breaks the sample unit tests in aem-project-archetype projects when running under JDK8, including new sandbox programs

Motivation and Context

Upstream project dependencies of AEM are gradually moving to Java 11+ targets, which are compatible with the AEM Cloud Service runtime, but not compatible with the default Cloud Manager JDK version 1.8. Until the minimum supported version of AEM on AMS/On-Prem is raised above 1.8, the archetype should extend its conditional logic for cloud vs non-cloud to govern the required JDK version as well, so that cloud projects and the cloud SDK can evolve more cohesively.

How Has This Been Tested?

Executed the archetype locally under jdk 1.8 and jdk 11 to confirm that the tests pass and that the aemVersion=cloud IT projects contain a .cloudmanager/java-version file with the contents 11 and that they fail early if they are built with jdk 1.8.

Screenshots (if appropriate):

Types of changes

Checklist:

adamcin commented 6 months ago

@Buuhuu please track this for review

kwin commented 6 months ago

Usually you use property maven.compiler.release to affect both m-compiler-p and m-javadoc-p at the same time