Recently , my build was failing with the same error
Maven must be executed with a Java 11 JRE or higher
This blog https://www.theaemmaven.com/post/aem-as-a-cloud-service-java-11-pipelines was useful in understnading the issue. To know how to create the file refer https://www.tothenew.com/blog/resol...