Hi 

Anyone used sonar-runner in Android studio , when I run command "gradle 
sonarRunner" through terminal it give error as below :
"Can not invoke method public java.lang.Class 
org.sonar.plugins.surefire.SurefireSensor.dependsUponCoverageSensors()"

My Build.gradle file as below:
apply plugin: 'sonar-runner'

sonarRunner {
sonarProperties {
// can be also set on command line like -Dsonar.analysis.mode=incremental
property "sonar.host.url", "http://myserver.com";
property 'sonar.sourceEncoding', 'UTF-8'
property 'sonar.language', 'java'
property 'sonar.projectKey', 'com.projectKey'
//need to replace with your project package name
property 'sonar.projectName', 'projectName' // need to replace with your 
project name
property 'sonar.projectVersion', '1.0'
property 'sonar.sources', 'src/main/java'
}
}

If any one have any solution then please help me I am stuck here.

My Android studio version- 1.3.2
SonarQube Runner 2.3
SonarQube Server 5.3













On Tuesday, December 30, 2014 at 1:25:43 PM UTC+5:30, Neeraj Lad wrote:
>
> Hi All,
>
> I have two questions: 
>
> 1: How to setup -e debugging parameter into Jenkins to see debugging log 
> as mentioned at end of the error
>  
> 2: I am struggling to integrate Sonar into Jenkins. I am getting following 
> error which does not say much details
>
> I have attached Jenkins configuration screenshot for your reference. 
>
> *Note: Same project is running if i run in Sonar server but when it comes 
> to jenkins integration it throw error. *  
>
> Error Details:
>
> Started by user anonymous <http://localhost:8081/jenkins/user/null>
> Building in workspace C:\Users\user\.jenkins\workspace\Try1
>  > git.exe rev-parse --is-inside-work-tree # timeout=10
> Fetching changes from the remote Git repository
>  > git.exe config remote.origin.url https://github.com/imentor/qa.git # 
> timeout=10
> Fetching upstream changes from https://github.com/imentor/qa.git
>  > git.exe --version # timeout=10
> using .gitcredentials to set credentials
>  > git.exe config --local credential.helper store --file=\"F:\Laptop 
> Backup\OpenSource\apache-tomcat-7.0.40\temp\git5891258861841529089.credentials\"
>  # timeout=10
>  > git.exe -c core.askpass=true fetch --tags --progress 
> https://github.com/imentor/qa.git +refs/heads/*:refs/remotes/origin/*
>  > git.exe config --local --remove-section credential # timeout=10
>  > git.exe rev-parse "refs/remotes/origin/dev^{commit}" # timeout=10
>  > git.exe rev-parse "refs/remotes/origin/origin/dev^{commit}" # timeout=10
> Checking out Revision 10fed612086c1696c7beecc52feac924cb6fcf0d 
> (refs/remotes/origin/dev)
>  > git.exe config core.sparsecheckout # timeout=10
>  > git.exe checkout -f 10fed612086c1696c7beecc52feac924cb6fcf0d
>  > git.exe rev-list 10fed612086c1696c7beecc52feac924cb6fcf0d # timeout=10
> [Try1] $ "F:\Laptop 
> Backup\OpenSource\sonarInstallation\sonar-runner-2.4\bin\sonar-runner.bat" 
> SonarRunner_01 -Dsonar.jdbc.driver=com.mysql.jdbc.Driver 
> "-Dsonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?autoReconnect=true&useUnicode=true&characterEncoding=utf8"
>  ******** ******** -Dsonar.host.url=http://localhost:9000 
> -Dsonar.projectBaseDir=C:\Users\user\.jenkins\workspace\Try1 
> "-Dproject.settings=F:/Laptop 
> Backup/OpenSource/sonarInstallation/sonar-runner-2.4/sonar-project.properties"
> F:/Laptop Backup/OpenSource/sonarInstallation/sonar-runner-2.4
> SonarQube Runner 2.4
> Java 1.8.0_25 Oracle Corporation (32-bit)
> Windows 7 6.1 x86
> INFO: Runner configuration file: F:\Laptop 
> Backup\OpenSource\sonarInstallation\sonar-runner-2.4\conf\sonar-runner.properties
> INFO: Project configuration file: F:\Laptop 
> Backup\OpenSource\sonarInstallation\sonar-runner-2.4\sonar-project.properties
> INFO: SonarQube Server 4.5.1
> 13:10:03.029 INFO  - Load global referentials...
> 13:10:03.287 INFO  - Load global referentials done: 258 ms
> 13:10:03.297 INFO  - User cache: C:\Users\user\.sonar\cache
> 13:10:03.307 INFO  - Install plugins
> 13:10:03.359 INFO  - Install JDBC driver
> 13:10:03.376 INFO  - Create JDBC datasource for 
> jdbc:mysql://localhost:3306/sonar?autoReconnect=true&useUnicode=true&characterEncoding=utf8
> 13:10:04.688 INFO  - Initializing Hibernate
> INFO: ------------------------------------------------------------------------
> INFO: EXECUTION FAILURE
> INFO: ------------------------------------------------------------------------
> Total time: 4.091s
> Final Memory: 7M/19M
> INFO: ------------------------------------------------------------------------
> ERROR: Error during Sonar runner execution
> ERROR: Unable to execute Sonar
> ERROR: Caused by: Task SonarRunner_01 does not exist
> ERROR: 
> ERROR: To see the full stack trace of the errors, re-run SonarQube Runner 
> with the -e switch.
> ERROR: Re-run SonarQube Runner using the -X switch to enable full debug 
> logging.
> Build step 'Invoke Standalone Sonar Analysis' marked build as failure
> Finished: FAILURE
>
>
>
> Thanks in advance,
>
> Neeraj
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d90d6653-d5dc-4ad8-9add-3046dd0dfb3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to