Bitbucket pipeline error while executing Sonar Qube and the project uses JFrog Artifactory server.

Daniel Fuentes November 29, 2023
  1. I have a Maven project in Bitbucket (Cloud). In the POM file, I have configured the following dependency:

    f9n5AXi32V.png
  2. I have a bitbucket pipeline configured that runs the SonarQube code analysis. But it was running ok a few days ago. Until the JFrog server was created a newer version of this dependency "0.0.1-20231117.235019-16"
  3. Now my pipeline is failing, and in the logs, I'm seeing that the step of calling the Sonar Qube analysis is downloading the newest dependency.

    Ce5r2CPp1X.png
  4. In the logs I see that maven downloaded the maven-metadata.xml file from the JFrog repository and in that file has the newest version configured.
  5. This is my bitbucket-pipeline.yml file.
    YASolpzrzY.png

Does anyone has any idea what can I do in order to fix this?

1 answer

1 vote
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 30, 2023

Hello @Daniel Fuentes and thank you for reaching out to the Community!

I see from your pipeline YML that you are using maven caches. It might be the case that maven is getting that version from a previous cache that was generated in your pipeline.

To check if this is the issue, you can try manually clearing the cache by following the below steps:

  • Navigate to Pipelines page
  • Click on the Caches button on the top right side of the page
  • Delete any maven cache using the trash icon right after the cache name.

Once the cache is deleted, you can try to run your build again and see how it goes.

If the error persists, it's also possible that one of your other dependencies required the new version of Jfrog, which is making Maven download it. I found this thread in Stackoverflow which suggests the command below to check the dependency tree for any other dependency that requires jFrog : 

mvn -Dverbose=true dependency:tree

Hope that helps!

Thank you, @Daniel Fuentes !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events