Can’t build sonarlint-intellij from source

The following steps when trying to build SonarLint from source lead to an error:
$ git clone GitHub - SonarSource/sonarlint-intellij: SonarLint for IntelliJ
$ cd sonarlint-intellij
$ ./gradlew build

This is the error one runs in to:


* Where:
Build file '/Users/zhenyuqiao/IdeaProjects/sonarlint-intellij/build.gradle.kts' line: 334

* What went wrong:
Could not create task ':cyclonedxBom'.
> A problem occurred configuring project ':common'.
   > Failed to calculate the value of task ':common:compileJava' property 'javaCompiler'.
      > No matching toolchains found for requested specification: {languageVersion=17, vendor=any, implementation=vendor-specific} for MAC_OS on aarch64.
         > No locally installed toolchains match and toolchain download repositories have not been configured.

Has anyone encountered this problem and how to solve it?

Hey there.

Did you follow the instructions of how to build?

I try again using buinding command “./gradlew buildPlugin”

it doesn’t work, the below is the error :

 ./gradlew buildPlugin
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':prepareSandbox'.
> Could not resolve all files for configuration ':runtimeClasspath'.
   > Could not resolve org.sonarsource.sonarlint.core:sonarlint-java-client-legacy:10.0.0.77144.
     Required by:
         project :
      > Could not resolve org.sonarsource.sonarlint.core:sonarlint-java-client-legacy:10.0.0.77144.
         > Could not get resource 'https://repox.jfrog.io/repox/sonarsource/org/sonarsource/sonarlint/core/sonarlint-java-client-legacy/10.0.0.77144/sonarlint-java-client-legacy-10.0.0.77144.pom'.
            > Could not GET 'https://repox.jfrog.io/repox/sonarsource/org/sonarsource/sonarlint/core/sonarlint-java-client-legacy/10.0.0.77144/sonarlint-java-client-legacy-10.0.0.77144.pom'. Received status code 401 from server: 
   > Could not resolve org.sonarsource.sonarlint.core:sonarlint-java-client-utils:10.0.0.77144.
     Required by:
         project :
      > Could not resolve org.sonarsource.sonarlint.core:sonarlint-java-client-utils:10.0.0.77144.
         > Could not get resource 'https://repox.jfrog.io/repox/sonarsource/org/sonarsource/sonarlint/core/sonarlint-java-client-utils/10.0.0.77144/sonarlint-java-client-utils-10.0.0.77144.pom'.
            > Could not GET 'https://repox.jfrog.io/repox/sonarsource/org/sonarsource/sonarlint/core/sonarlint-java-client-utils/10.0.0.77144/sonarlint-java-client-utils-10.0.0.77144.pom'. Received status code 401 from server: 
   > Could not resolve org.sonarsource.sonarlint.core:sonarlint-rpc-java-client:10.0.0.77144.
     Required by:
         project :
      > Could not resolve org.sonarsource.sonarlint.core:sonarlint-rpc-java-client:10.0.0.77144.
         > Could not get resource 'https://repox.jfrog.io/repox/sonarsource/org/sonarsource/sonarlint/core/sonarlint-rpc-java-client/10.0.0.77144/sonarlint-rpc-java-client-10.0.0.77144.pom'.
            > Could not GET 'https://repox.jfrog.io/repox/sonarsource/org/sonarsource/sonarlint/core/sonarlint-rpc-java-client/10.0.0.77144/sonarlint-rpc-java-client-10.0.0.77144.pom'. Received status code 401 from server:

Thanks. It looks like you’re facing this issue:

You can follow along on the linked ticket, or check out the thread for another user’s workaround.

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