Error with mockito-core in cloud manager
Hello,
We have upgrade all the junit versions in pom.xml and it worked absolutely fine in local server but when deployed in cloud manager with latest (2023.1) version, the build fails with below error:
15:31:46,075 [main] [ERROR] COMPILATION ERROR :
15:31:46,076 [main] [INFO] -------------------------------------------------------------
15:31:46,080 [main] [ERROR] /build_root/build/underarmourcloudservice-p35450/ua-assetshare/core/src/test/java/com/ua/assetshare/collections/models/impl/UAHeaderImplTest.java:[17,19] cannot access org.mockito.Mock
bad class file: /root/.m2/repository/org/mockito/mockito-core/5.0.0/mockito-core-5.0.0.jar(org/mockito/Mock.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.
15:31:46,081 [main] [INFO] 1 error
pom.xml
----------
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.9.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit-addons</groupId>
<artifactId>junit-addons</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.testing.aem-mock.junit5</artifactId>
<!-- Prefer the latest version of AEM Mock Junit5 dependency -->
<version>5.1.2</version>
<scope>test</scope>
</dependency>
If we change the "mockito-core" version to 3.12.4, it builds fine.

