Can't build sonar-scanner-gradle plugin from source locally

I’m trying to build sonar-scanner-gradle from source.
But got an error:

Could not resolve: com.google.code.findbugs:jsr305:3.0.2
Could not resolve: org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21
Could not resolve: org.sonarsource.scanner.lib:sonar-scanner-java-library:3.1.1.261
Could not resolve: org.assertj:assertj-core:3.26.0
Could not resolve: org.junit.jupiter:junit-jupiter-engine:5.10.2
Could not resolve: org.hamcrest:hamcrest-all:1.3
Could not resolve: org.mockito:mockito-core:5.12.0
Could not resolve: org.spockframework:spock-core:2.3-groovy-3.0

Further investigation led me to this log:

Execution failed for task ':sonar-scanner-gradle:compileJava'.
Could not resolve all files for configuration ':sonar-scanner-gradle:compileClasspath'.
Could not resolve com.google.code.findbugs:jsr305:3.0.2.
Required by:
    project :sonar-scanner-gradle
Could not resolve com.google.code.findbugs:jsr305:3.0.2.
Could not get resource 'https://repox.jfrog.io/repox/sonarsource/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.pom'.
Could not HEAD 'https://repox.jfrog.io/repox/sonarsource/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.pom'. Received status code 401 from server: 

As I understand I should provide artifactoryUsername and artifactoryPassword properties for https://repox.jfrog.io/repox/sonarsource maven repository. But it is private if I got correctly from other topics and your jira

Is it possible to build sonar-scanner-gradle without accessing private repositories?

Hi Grigoriy,
You are right, the build is broken for external contributor, I created this Jira SCANGRADLE-192 that will be fixed soon with this PR #275.
Thanks for your feedback,
Alban

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.