Please check that inclusion/exclusion patterns produce disjoint sets for main and test files -> [Hel

SonarQube is used in the pipeline of the azure devops Java project, and the additionalProperties parameter is used in the SonarQube properties. However, when running the pipeline to “Run SonarQube analysis”, an error “[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven” is still reported. -plugin:3.11.0.3922:sonar (default-cli) on project payoneer: File payoneer-admin/src/test/java/com/payoneer/PayoMerInfoControllerTest.java can’t be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files → [Help 1]”
This is the pipeline configuration:

Please help me solve this error, thank you!

Hi,

Since you’re analyzing with Maven, you shouldn’t need to specify sonar.java.binaries. Additionally, your exclusion pattern isn’t correct. I believe you want **/test/**/*.

If that doesn’t work, can you provide your full analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann

1 Like

Thank you, it works fine now

1 Like