我使用的是sonar4.1 版本,mysql5.6
报错信息如下:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project practise: Unable to execute SonarQube: Fail to parse entry in bootstrap index: plexus-utils-1.5.15.jar,h2-1.3.172.jar,hibernate-commons-annotations-3.1.0.GA.jar,hibernate-core-3.3.2.GA.jar,ejb3-persistence-1.0.2.GA.jar,sonar-colorizer-4.1.2.jar,commons-dbutils-1.5.jar,picocontainer-2.14.3.jar,logback-classic-1.0.13.jar,commons-io-2.4.jar,geronimo-spec-jta-1.0-M1.jar,maven-plugin-registry-2.2.0.jar,commons-pool-1.5.4.jar,sonar-java-api-4.1.2.jar,sonar-check-api-4.1.2.jar,antlr-2.7.6.jar,commons-lang-2.6.jar,maven-project-2.2.0.jar,slf4j-api-1.7.5.jar,sonar-graph-4.1.2.jar,maven-profile-2.2.0.jar,hibernate-entitymanager-3.4.0.GA.jar,sonar-core-4.1.2.jar,stax2-api-3.0.1.jar,log4j-over-slf4j-1.7.5.jar,sonar-markdown-4.1.2.jar,staxmate-2.0.0.jar,woodstox-core-lgpl-4.0.4.jar,maven-artifact-2.2.0.jar,sonar-batch-4.1.2.jar,dom4j-1.6.1.jar,sonar-deprecated-4.1.2.jar,sonar-squid-4.1.2.jar,commons-beanutils-1.8.3.jar,jcommon-1.0.12.jar,mybatis-3.2.2.jar,commons-configuration-1.6.jar,sonar-home-4.1.2.jar,guava-10.0.1.jar,commons-codec-1.8.jar,blueprints-core-2.2.0.jar,javassist-3.4.GA.jar,commons-collections-3.2.1.jar,logback-core-1.0.13.jar,sonar-channel-4.1.2.jar,jcl-over-slf4j-1.7.5.jar,json-simple-1.1.1.jar,sonar-plugin-api-4.1.2.jar,plexus-classworlds-2.2.3.jar,gson-2.2.4.jar,commons-dbcp-1.4.jar,xpp3-1.1.3.3.jar,maven-settings-2.2.0.jar,maven-model-2.2.0.jar,akiban-persistit-3.2.7.jar,hibernate-annotations-3.4.0.GA.jar,sonar-batch-maven-compat-4.1.2.jar,xstream-1.3.1.jar,sonar-duplications-4.1.2.jar,sonar-update-center-common-1.8.jar -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project practise: Unable to execute SonarQube
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
通过查询各种文档,终于在该网站找到结果:
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven
If using Maven prior to 3.0, you should use maven-sonar-plugin 3.0.2.
意思是:我的sonar版本过低,sonar-maven-plugin:3.4.0.905插件不支持,重新下载了一个6.0版本的sonar,问题解决
也尝试过显试的在maven的pom.xml中配置maven-sonar-plugin 3.3.0.603版本的插件,未能解决.
需要注意的是:启动新版本的sonar要删除掉mysql数据库中之前的sonar数据库中的表