I had some progress.
Steps
DOES NOT change anything in sonar /conf/sonar.properties, wrapper.properties, sonar-runner / conf / sonar-runner.properties. DONE so that the host url value is the same in sonar.properties and sonar-runner.properties.
Go to the workspace (where you have the source code installed).
Ran sonar-runner (executable file) - he will show the path / file This gave an error that I needed sonar -project.properties, because I missed some of the variables that Sonar needed.
Link used
Found SCM provider not installed. Used the link: http://jira.codehaus.org/browse/ACT-1714 to solve this problem.
the sonar ran again, everything went well. (NOTE: This command is different from running sonarRunner as this Gradle sonar task).
I went to the SonarQube dashboard and where it is now displayed.
Waiting for tomorrow:
- To the Linux and Jenkins commands below (task gradle tasks). gradle clean build jacocoTestReport sonarRunner
Update:
gradle clean build jacocoTestReport - works
gradle clean build jacocoTestReport sonarRunner - Cannot say src / main / java does not exist
gradle clean build jacocoTestReport sonarRunner -Dsonar.sources = src / java - WORKED
gradle clean build jacocoTestReport sonarRunner -Dsonar.sources = "src / java, test / java, src / java-test" - DOES NOT WORK (Java PermGen error)
gradle clean build jacocoTestReport sonarRunner -Dsonar.sources = "src / java" - DOES NOT WORK (Java PermGen error)
gradle clean build jacocoTestReport sonarRunner -Dsonar.sources = src / java - DOES NOT WORK (Java PermGen error)
gradle sonarRunner -Dsonar.sources = src / java, test / java, src / java-test - DOES NOT WORK (error in encoding cannot be read or imported - UTF-8 encoding or something like setting for sonar.sourceEncoding)
gradle clea build jacocoTestReport - WORKED
then
gradle sonarRunner -Dsonar.sources = "src / java" - WORKED
I tried to set MaxPernGen in sonar / conf / wrapper.properties to various values, such as 128, 512, 1024, 2048, ... up to 8000 m ... did not work when resolving the following error - when starting all Gradle tasks in one command .
:sonarRunner FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':sonarRunner'. > java.lang.OutOfMemoryError: PermGen space * Try: Run with
I wonder why I get this error immediately after starting:
: gradle clean build jacocoTestReport sonarRunner "
OK - the problem with PermGen Memory is resolved.
Actions : 1. In my ~ / .bashrc or ~ / .bash_profile. I created the following variable
GRADLE_OPTS=" -XX:MaxPermSize=512m"
Run "which gradle" or basically find which gradle file (shell or .bat) is used. Go to this path and open the gradle file "/" gradle.bat "(for Windows).
Make the following changes.
DEFAULT_JVM_OPTS="$JAVA_OPTS $GRADLE_OPTS"
Make ". ~ / .Bash_profile" or ". ~ / .Bashrc" .... - Open a new putty session.
Make sure the PATH variable has a Gradle HOME / bin in it (Linux / Windows)
Run the following command (this time did not indicate the PermGen error that I received earlier) from the workspace:
gradle clean build jacocoTestReport sonarRunner
:) Time to go home early today.
Other similar variables: GRADLE_OPTS / JAVA_OPTS / SONAR_RUNNER_OPTS (where -XX: The maximum value can be set) on the server (putty session level) in either the IDE or Jenkins.
Thanks Allyn for the tip.