grunt-sonar-runner icon indicating copy to clipboard operation
grunt-sonar-runner copied to clipboard

Updates for sonar-runner-2.5

Open Jaff opened this issue 4 years ago • 2 comments

Grabbed sonar-runner-2.5-RC1 from https://repo1.maven.org/maven2/org/sonarsource/sonar-runner/sonar-runner-dist/2.5-RC1/ Added capability to get stack-trace using SONAR_RUNNER_ARGS since SONAR_RUNNER_OPTS was in the wrong position in JAVA_CMD string

Jaff avatar Oct 23 '20 22:10 Jaff

Unfortunately, this will not solve the issue; I rigged up the project to use the newer 2.5-RC1.jar and got a different failure:

Running "sonarRunner:analysis" (sonarRunner) task
Effective Sonar Options
-----------------------
sonar.host.url=<REDACTED>
sonar.host.login=<REDACTED>
sonar.projectKey=<REDACTED>
sonar.projectName=<REDACTED>
sonar.projectDescription=<REDACTED>
sonar.projectVersion=1.0.0
sonar.sources.0=assets
sonar.language=js
sonar.sourceEncoding=UTF-8
Sonar client configured 
sonar-runner exec: java  -jar "/app/node_modules/grunt-sonar-runner/tasks/../sonar-runner-2.5/lib/sonar-runner-dist-2.5-RC1.jar" -Drunner.home="/app/node_modules/grunt-sonar-runner/tasks/../sonar-runner-2.5" -X
INFO: Runner configuration file: /app/node_modules/grunt-sonar-runner/tasks/../sonar-runner-2.5/conf/sonar-runner.properties
INFO: Project configuration file: NONE
INFO: SonarQube Runner 2.5-RC1
INFO: Java 11.0.8 Ubuntu (64-bit)
INFO: Linux 3.10.0-1062.9.1.el7.x86_64 amd64
INFO: Error stacktraces are turned on.
DEBUG: cache: /home/ubuntu/.sonar/ws_cache/https%3A%2F%2F<REDACTED>/global
DEBUG: Create : /home/ubuntu/.sonar/cache
INFO: User cache: /home/ubuntu/.sonar/cache
DEBUG: Create : /home/ubuntu/.sonar/cache/_tmp
DEBUG: Extract sonar-runner-batch in temp...
DEBUG: Get bootstrap index...
DEBUG: Download: https://<REDACTED>/batch_bootstrap/index
DEBUG: Get bootstrap completed
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.796s
INFO: Final Memory: 4M/96M
INFO: ------------------------------------------------------------------------
>> ERROR: Error during Sonar runner execution
>> org.sonar.runner.impl.RunnerException: Unable to execute SonarQube
>> at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:100)
>> 	at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:87)
>> 	at java.base/java.security.AccessController.doPrivileged(Native Method)
>> 	at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:87)
>> 	at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:83)
>> 	at org.sonar.runner.api.EmbeddedRunner.doStart(EmbeddedRunner.java:250)
>> 	at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:188)
>> 	at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:183)
>> 	at org.sonar.runner.cli.Main.execute(Main.java:75)
>> 	at org.sonar.runner.cli.Main.main(Main.java:66)
>> Caused by: java.lang.IllegalStateException: Fail to download libraries from server
>> 	at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:94)
>> 	at org.sonar.runner.impl.Jars.download(Jars.java:71)
>> at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:40)
>> 	at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:91)
>> ... 9 more
>> Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
>> 	at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:88)
>> ... 12 more
>> Return code: 1.
Warning: Task "sonarRunner:analysis" failed. Use --force to continue.

Jaff avatar Oct 24 '20 02:10 Jaff

Moved to Sonar-Scanner 4.5. Please use version ^3.0.2

skhatri avatar Dec 03 '20 13:12 skhatri