Sonar-runner由于缺少cxx语言插件而失败,尽管已安装

时间:2013-05-28 14:12:46

标签: sonarqube sonar-runner

我是Sonar的新手,也是我设置第一个服务器/项目的过程。

环境:

  • 操作系统:Windows Server 2008 R2 / amd64 / 6.1
  • App Server:Tomcat / 7.0.40I,部署了Sonar WAR文件(3.5.1)。
  • DB:MySQL 5.6.11

(相关)插件:

  • Sonar C ++社区插件(0.2)

该插件在常规设置下可见 - > Sonar C ++社区插件

sonar-project.properties

# Required metadata
sonar.projectKey=test:pmc
sonar.projectName=PMC
sonar.projectVersion=1.0
sonar.language=c++

# Comma-separated paths to directories with sources (required)
sonar.sources=c:/SVN/Development/test/PMC/trunk/AppServer,c:/SVN/Development/test/PMC/trunk/PmcShared,c:/SVN/Development/test/PMC/trunk/WebServer,c:/SVN/Development/test/PMC/trunk/Tools

# Optional path to the CppCheck program required to activate some CppCheck rules
sonar.cpp.cppcheck.path=C:/Program Files (x86)/Cppcheck/cppcheck.exe

# Encoding of the source files
sonar.sourceEncoding=UTF-8

我不明白的是它无法找到支持'cxx'语言的插件:

C:\Users\Administrator\Documents\sonar-projects\PMC>sonar-runner
C:\Users\Administrator\Documents\sonar-runner-2.2.1
Sonar Runner 2.2.1
Java 1.7.0_21 Oracle Corporation (64-bit)
Windows Server 2008 R2 6.1 amd64
INFO: Runner configuration file: C:\Users\Administrator\Documents\sonar-runner-2.2.1\conf\sonar-runner.properties
INFO: Project configuration file: C:\Users\Administrator\Documents\sonar-projects\PMC\sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: C:\Users\Administrator\Documents\sonar-projects\PMC\.sonar
INFO: Sonar Server 3.5.1
15:20:54.231 INFO  - Load batch settings
15:20:54.794 INFO  - User cache: C:\Users\Administrator\.sonar\cache
15:20:54.797 INFO  - Install plugins
15:20:55.742 INFO  - -------------  Executing Project Scan
15:20:56.482 INFO  - Install JDBC driver
15:20:56.487 INFO  - Apply project exclusions
15:20:56.493 INFO  - Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
15:20:56.771 INFO  - Initializing Hibernate
15:20:59.229 INFO  - -------------  Inspecting PMC
15:20:59.229 INFO  - Load module settings
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 6.162s
Final Memory: 13M/221M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: You must install a plugin that supports the language 'cxx'
ERROR:
ERROR: To see the full stack trace of the errors, re-run Sonar Runner with the -e switch.
ERROR: Re-run Sonar Runner using the -X switch to enable full debug logging.

我确实安装了Sonar C ++社区插件,所以我想我错过了明显的...有人可以帮助我开始吗?

4 个答案:

答案 0 :(得分:1)

我似乎在配置文件中犯了一个错误。我重新创建它,现在工作正在运行!此问题已关闭,上述配置将起作用。

答案 1 :(得分:1)

我在C#插件中遇到了类似的错误: 错误:引起:您必须安装支持“cs”语言的插件 请注意'cs' 很长一段时间后,我发现额外的''后'cs'。删除配置文件中的额外空间时,它可以正常工作。似乎声纳跑步者不使用“修剪”。

答案 2 :(得分:0)

对于新用户,如果仍然出现此错误(SonarQube 4+)启动服务器,请转到“设置”。 (右上角)然后搜索更新中心'在那里添加缺少的模块,下次重启服务器。它应该工作 资料来源:Link from official project website

答案 3 :(得分:0)

要查找激活任何指定SonarQube语言插件所需的字符串,请转到“设置” - > “系统” - > “更新中心”。对于每个插件,短名称将位于人类可读名称右侧的方括号中。

C / C++ / Objective-C [cpp]

在此示例中,“cpp”是您在sonar-project.properties中的sonar.language属性中使用的名称。