`[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:126.96.36.1994:sonar (default-cli) on project TDDFramework: Project not found. Please check the ‘sonar.projectKey’ and ‘sonar.organization’ properties, the ‘SONAR_TOKEN’ environment variable, or contact the project administrator.
Did you set sonar.organization? Did you set sonar.projectKey? Does it correspond to the key of a project that exists on SonarCloud? If ‘yes’ to all these things, then it’s time to double-check your SONAR_TOKEN env var.
I re-imported the project, set the organization key, project key and the environment variables correctly. Its working fine now. But then its passing the pipeline in the Bitbucket. But still shows as build failure and produces this error in bitbucket.
Also, the Project is working on Java 11.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project TDDFramework: There are test failures.
We don’t run your tests for you. This error is happening before you ever get to analysis, and it’s not a process failure but a failure in your project. You need to look into why your tests are failing.