java - Sonar-runner execution failure causing cast exception -
after configure sonar tools (sonarqube, mysql database , sonar-runner) perform analysis on android project without problem. after install android plugin sonar , repeat analysis, 1 fails getting next error:
info - preview mode load batch settings user cache: /home/user/.sonar/cache info - install plugins info - exclude plugins: devcockpit, jira, pdfreport, views, report, buildstability, scmactivity, buildbreaker info - create jdbc datasource jdbc:h2:/home/user/workspace/myandroidproject/.sonar/.sonartmp/preview1394469024394-0 info - initializing hibernate info - load project settings info - apply project exclusions info - ------------- scan myandroidproject info - load module settings info - language forced java info - loading technical debt model... info - loading technical debt model done: 424 ms info - configure maven plugins info - base dir: /home/user/workspace/myandroidproject info - working dir: /home/user/workspace/myandroidproject/.sonar info - source dirs: /home/user/workspace/myadnroidproject/src info - source encoding: utf-8, default locale: en_en info - index files info - included sources: info - src/** info - 116 files indexed warn - accessing filesystem before sensor phase deprecated , not supported in future. please update plugin. info - index files info - included sources: info - src/** info - 116 files indexed warn - accessing filesystem before sensor phase deprecated , not supported in future. please update plugin. info - index files info - included sources: info - src/** info - 116 files indexed info - quality profile java: sonar way info - sensor javasourceimporter... info - sensor javasourceimporter done: 49 ms info - sensor javasquidsensor... info - java ast scan... info - 116 source files analyzed info - 116/116 source files analyzed info - java ast scan done: 6693 ms warn - java bytecode has not been made available analyzer. depth of inheritance tree (dit) metric, response class (rfc) metric, number of children (noc) metric, lack of cohesion (lcom4) metric, deperecated dependencies metrics, unusedprivatemethod rule, redundantthrowsdeclarationcheck rule, s1160 rule, s1217 rule disabled. info: ------------------------------------------------------------------------ info: execution failure info: ------------------------------------------------------------------------ total time: 18.440s final memory: 12m/357m info: ------------------------------------------------------------------------ error: error during sonar runner execution error: unable execute sonar error: caused by: org.sonar.api.resources.directory cannot cast org.sonar.api.resources.javapackage
my sonar-project.properties file enxt:
#required metadata sonar.projectkey=mkey sonar.projectname=myandroidproject sonar.projectversion=1.0 # paths source directories. # paths relative sonar-project.properties file. replace "\" "/" on windows. # not put "sonar-project.properties" file in same directory source code. # (i.e. never set "sonar.sources" property ".") sonar.sources=src # value of property must key of language. sonar.language=java # encoding of source code sonar.sourceencoding=utf-8 # analysis mode sonar.analysis.mode=preview #enables lint profile analyze code using lint rules. #sonar.profile=android lint
i'm using next environment:
- sonarqube 4.2 rc1
- sonar-runner 2.3
- database: mysql
- ubuntu 12.04 lts
- java 1.7
i tryed uninstalling android plugin problem persists. unique way i've found solve deleting database , user , create them again.
as stated on http://docs.codehaus.org/pages/viewpage.action?pageid=236224987, android plugin not yet compatible sonarqube 4.2-rc1. see http://jira.codehaus.org/browse/sonarplugins-3483.
Comments
Post a Comment