Bitbucket integration with private nexus artifact repository

  • ALM used ( Bitbucket Cloud )
  • CI system used (Bitbucket Cloud)
  • Languages of the repository - Java

I am trying to analyze our private bitbucket repo with sonar cloud. Followed the instruction given.
We have private nexus repository where the artifacts are stored and its not exposed to outside world.

We have multiple repo and they add dependency via private nexus.
When I try to analyze one repo. Sonar is trying to fetch the dependency and failing since it is not able to access our nexus.

What is the workaround in this case? Any Help

Hi,

Welcome to the community!

It’s not clear to me why SonarQube would be trying to fetch dependencies; presumably it’s your build that wants those. Could you share your analysis log?

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

This guide will help you find them.

 
Ann

1 Like

You are correct , in my bitbucket pipeline yaml , i have added mvn -B verify sonar:sonar
mvn verify tries to pull dependencies which are stored in our private nexus.

Just to be clear I followed this

https://bitbucket.org/sonarsource/sample-maven-project/pull-requests/17

My question was how other people circumvent this. In the meantime I will also find and attach the analysis log.