AEM Cloud Manager build error bad class file
I get the following erroe when building via cloud manager.
23:53:20,440 [main] [ERROR] COMPILATION ERROR :
23:53:20,441 [main] [INFO] -------------------------------------------------------------
23:53:20,442 [main] [ERROR] /build_root/build/clientnameservicesincprogram-p28904/ui.apps/target/generated-sources/htl/org/apache/sling/scripting/sightly/apps/clientname/components/form/container/container_html.java:[45,88] cannot access com.day.cq.wcm.foundation.model.responsivegrid.ResponsiveGrid
bad class file: /root/.m2/repository/com/adobe/aem/aem-sdk-api/2021.1.4738.20210107T143101Z-201217/aem-sdk-api-2021.1.4738.20210107T143101Z-201217.jar(com/day/cq/wcm/foundation/model/responsivegrid/ResponsiveGrid.class)
class file has wrong version 55.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.This is a very basic AEM implementation. In this case, we've overlayed just the container.html file of the Core Form Container component but have not modified the call to the ResponsiveGrid. This build fine locally. The AEM API SDK version matches what is being used on our AEMaaCS instance.
How do we get the correct class file version?
Here is the HTML from container.html file
<form data-sly-use.container="com.adobe.cq.wcm.core.components.models.form.Container"
data-sly-use.grid="com.day.cq.wcm.foundation.model.responsivegrid.ResponsiveGrid"
method="${container.method}" action="${container.action}" id="${container.id}" name="${container.name}"
enctype="${container.enctype}"
class="cmp-form ${grid.cssClass}">