Hello all,
I’m evaluating SonarQube to check if it suits my company’s need, but I cannot scan our project.
I’m scanning with:
mvn sonar:sonar
-Dsonar.projectKey=…
-Dsonar.host.url=http://localhost:9000
-Dsonar.login=…
If I run this command with a project from github, it works; with this internal project, it doesn’t work.
It fails with an error:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar (default-cli) on project _______ Unable to execute SonarQube: Fail to download libraries from server -> [Help 1]
But I have no idea why, because mvn can build normally.
Interestingly, this stacktrace shows:
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute SonarQube
at org.sonarsource.scanner.maven.bootstrap.ExceptionHandling.handle (ExceptionHandling.java:36)
at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:81)
at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:112)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
…
Caused by: org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run (IsolatedLauncherFactory.java:84)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run (IsolatedLauncherFactory.java:71)
…
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
at org.sonarsource.scanner.api.internal.Jars.downloadFiles (Jars.java:93)
at org.sonarsource.scanner.api.internal.Jars.download (Jars.java:70)
at org.sonarsource.scanner.api.internal.JarDownloader.download (JarDownloader.java:39)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run (IsolatedLauncherFactory.java:75)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run (IsolatedLauncherFactory.java:71)
…
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at org.sonarsource.scanner.api.internal.Jars.downloadFiles (Jars.java:87)
at org.sonarsource.scanner.api.internal.Jars.download (Jars.java:70)
at org.sonarsource.scanner.api.internal.JarDownloader.download (JarDownloader.java:39)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run (IsolatedLauncherFactory.java:75)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run (IsolatedLauncherFactory.java:71)
at java.security.AccessController.doPrivileged (Native Method)
My project is a multi-modules java application, built with maven. Our dependencies are managed by an internal artifact repository.
I’m running Sonar server (community edition - version 8.2 build 32929) through docker and using Java 1.8.0_221-b11.
Unfortunately, I got no extra information when tried to set flags like sonar.log.level/sonar.verbose.
Any help would be appreciated! :]
BR