also introduce a new dependency to support aem-mock/sling-mock based unit tests:
<!-- Update to latest Sling JSON Content Parser 2.x for unit tests for compatibility with Johnzon 2.0 (switch from javax.json to jakarta.json) -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.contentparser.json</artifactId>
<version>2.1.0</version>
</dependency>
normally, the version of this dependency is managed by the sling-mock/aem-mock release. but in this case we need a different version based on the johnzon version that is defined by the aem-cloud-dependency/aem-depenency POM.
for AEM 6.5 org.apache.sling.contentparser.json 2.0.0 needs to be used (and is defined as transitive dependency) as it relies on javax.json (same as johnzon 1.x)
for AEMaaCS 2024.4.15787.20240404T134829Z-231200 and upwards johnzon 2.x is included, and this requires org.apache.sling.contentparser.json 2.1.0 which relies on jakarta.json
if manged via this POM, this switch works automatically for all projects updating to latest AEMaaCS version and relying on this dependencies POM.
also introduce a new dependency to support aem-mock/sling-mock based unit tests:
normally, the version of this dependency is managed by the sling-mock/aem-mock release. but in this case we need a different version based on the johnzon version that is defined by the aem-cloud-dependency/aem-depenency POM.
org.apache.sling.contentparser.json
2.0.0 needs to be used (and is defined as transitive dependency) as it relies on javax.json (same as johnzon 1.x)org.apache.sling.contentparser.json
2.1.0 which relies on jakarta.jsonif manged via this POM, this switch works automatically for all projects updating to latest AEMaaCS version and relying on this dependencies POM.