Sonar runner Exception - gradle

While running sonarunner in gradle I am getting below exception:
Execution failed for task ':sonarRunner'.
Fail to request server version
I am running below command from command line:
gradle clean build sonarRunner -
Dsonar.host.url=http://srvsentdev01.lhs-systems.com:9000/
-Dsonar.jdbc.url=jdbc:mysql://srvsentdev01.lhs-systems.com/sonarqube -Dsonar.jdbc.driverClassName=com.mysql.jdbc.Driver -Dsonar.jdbc.username=xxxxx -Dsonar.jdbc.password=xxxxxxxx
where I am going wrong?

Related

CI cannot download gradle distribution snapshot

Our CI suddenly fails with the following error message:
$ ./gradlew clean jar --stacktrace -i --no-daemon
Downloading https://services.gradle.org/distributions-snapshots/gradle-6.8-20201019220035+0000-bin.zip
Exception in thread "main" java.io.FileNotFoundException: https://downloads.gradle-dn.com/distributions-snapshots/gradle-6.8-20201019220035+0000-bin.zip
I don't unterstand why the distribution file is not found anymore and how can we fix it? I tried clearing all caches but it fails with the same error.
There was a new gradle release on that day and upgrade the gradle wrapper solved the issue:
./gradlew wrapper --gradle-version 6.8.1
(remember to run this command twice to really update the complete wrapper)

I am getting build failed while running ant sonar. As my sonar server is up

I am getting build failed while doing ant sonar. Now I am working on sonarqube 6.4. I am working in Hybris. I have given my error msg with build.xml part were error I am getting
I have installed new version of Sonarqube but it didn't work for me.
I fetch my whole code again with git but again not work.
Error Message:
BUILD FAILED C:\DukeHybrisNew\hybris\bin\platform\build.xml:82: The following error occurred while executing this line:
C:\DukeHybrisNew\hybris\bin\platform\resources\ant\sonar.xml:89:
java.lang.IllegalStateException: Unable to blame file
src/com/duke/backoffice/service/DukeBackofficeService.java at
org.sonarsource.scm.git.JGitBlameCommand.blame(JGitBlameCommand.java:128) at
org.sonarsource.scm.git.JGitBlameCommand.access$000(JGitBlameCommand.java:44)

Why is Gradle NUnit Plugin failing to execute unit tests?

We're using the NUnit plugin for Gradle "id 'com.ullink.nunit' version '1.8'". When we run the NUnit task that executes our unit tests for the project, we get the following error:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':unitTests'.
Lorg/gradle/logging/ProgressLogger;
Stack trace shows ClassNotFoundException for ProgressLogger.
Why are we getting this error and how can we fix it?
Thanks!
The problem was solved after upgrading the Gradle Nunut plugin to the latest version.

Travis CI Execution failed for task ':compileJava'. > invalid source release: 1.8

I am getting a random error while trying to get Travis to Build my gradle project.
Not sure what I'm doing wrong.
Execution failed for task ':compileJava'.
invalid source release: 1.8
https://travis-ci.org/WPIRoboticsProjects/grip/builds/77586600
You have to explicitly tell travis to use java 1.8.
http://blog.travis-ci.com/2013-11-26-test-your-java-libraries-on-java-8/

Execute a task in gradle just before Test Executor ends

I want to run a ant target which will dump the jacoco coverage data from localhost:6300 (Jacoco is setup as javaagent with options: output=tcpserver,address=*,port=6300). The ant target is a client which will be called after running the tests to dump coverage data to a file. I used the following:
test.finalizedBy(antjacocoReport)
antjacocoReport is the ant target which is executing fine, but since the Gradle Test Executor exits before this task, it is showing
[ant:jacoco:dump] Connecting to localhost/127.0.0.1:6300
[ant:jacoco:dump] Connection refused: connect
and
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':antjacocoReport'.
> Unable to dump coverage data
Anyone has any idea how to accomplish this task before gradle exhaust's the jacoco agent. ?

Resources