Code Quality Pipleine build failure | Community
Skip to main content
sachithak792023
September 24, 2024

Code Quality Pipleine build failure

  • September 24, 2024
  • 3 replies
  • 885 views

Has anyone faced an issue where the build is failing in the pipeline for test cases but working fine in the local build? The error is not consistent either. I need some help. Please see below the dependency used in pom file.

 

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>

</plugin>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit-addons</groupId>
<artifactId>junit-addons</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-imaging</artifactId>
<version>1.0-R1534292</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>3.2.17.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.jcr-mock</artifactId>
<version>1.4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.junit.core</artifactId>
<version>${core.wcm.components.version}</version>
<scope>test</scope>
</dependency>

 

<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.testing.aem-mock.junit5</artifactId>
<version>5.1.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.scripting.api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.sling-mock.junit5</artifactId>
<version>3.4.2</version>
<scope>test</scope>
</dependency>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

h_kataria
Community Advisor
Community Advisor
September 24, 2024

Cloud manager runs different checks as part of code quality pipeline, you can refer following table to understand when it will cause failure 
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-manager/content/using/code-quality-testing#code-quality-testing-step 
So, there can be multiple reasons as to why it fails. You can download and check the logs (and share if possible) for the pipeline which should give more idea. 

Mahedi_Sabuj
Community Advisor
Community Advisor
September 24, 2024

Hi @sachithak792023, We had to remove maven-surefire-plugin from pom.xml.

Mahedi Sabuj
sachithak792023
September 26, 2024

We made the changes in the POM file and ran the code quality pipeline. It worked once, but we encountered an issue when we reran the branch

 

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<dependencies>
<!--dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.1.0</version>
</dependency-->


<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.5.2</version>
</dependency>
</dependencies>
Mahedi_Sabuj
Community Advisor
Community Advisor
September 26, 2024

Hi @sachithak792023, Can you share the log here?

Mahedi Sabuj
kautuk_sahni
Community Manager
Community Manager
October 16, 2024

@sachithak792023 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni