【问题标题】:Unable to run analysis on SonarQube 5.1无法在 SonarQube 5.1 上运行分析
【发布时间】:2015-07-01 06:14:51
【问题描述】:

当我为我的项目运行 mvn sonar:sonar 时,我不断收到此错误:

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project prova: SonarQube 5.1 does not support Maven 3
[ERROR] -> [Help 1]

SonarQube 日志(位于 /opt/sonar/logs 中的日志)清晰且不显示任何错误。

我想这是一个配置错误,但我不知道如何解决它。 我在 Ubuntu 14.04 64bit 上运行 SonarQube 5.1 64bit、maven 3.1.1 和 java1.8.0_45-b14

[编辑:] 我已经从安装了 maven 3.1.1 的 windows pc 上运行 mvn -V sonar:sonar 并得到了同样的错误:

Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 17:22:2
2+0200)
Maven home: F:\DARKFOX\maven
Java version: 1.8.0_31, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_31\jre
Default locale: it_IT, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building prova 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:2.5:sonar (default-cli) @ prova ---
[INFO] SonarQube version: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset/
/EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv='content-type' content='text/html; charset=UTF-8'>
<meta name="VERSION" content="">
<meta name="DATA" content="fwdnode2.registrar-servers.com (98.142.221.8)">
<link href=" " rel="shortcut icon" type="image/x-icon">
<title></title>
</head>
<frameset rows='100%, *' frameborder=no framespacing=0 border=0>
<frame src="http://server1.darkfoxdev.com:9000/sonar/api/server/version" name=ma
inwindow frameborder=no framespacing=0 marginheight=0 marginwidth=0></frame>
</frameset>
<noframes><h2>Your browser does not support frames. We recommend upgrading your
browser.</h2><br><br>
<center>Click <a href="http://server1.darkfoxdev.com:9000/sonar/api/server/versi
on" >here</a> to enter the site.</center>
</noframes>
</html>


[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.078s
[INFO] Finished at: Fri Apr 24 09:21:17 CEST 2015
[INFO] Final Memory: 9M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (d
efault-cli) on project prova: SonarQube <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
[ERROR] <html>
[ERROR] <head>
[ERROR] <meta http-equiv='content-type' content='text/html; charset=UTF-8'>
[ERROR] <meta name="VERSION" content="">
[ERROR] <meta name="DATA" content="fwdnode2.registrar-servers.com (98.142.221.8)
">
[ERROR] <link href=" " rel="shortcut icon" type="image/x-icon">
[ERROR] <title></title>
[ERROR] </head>
[ERROR] <frameset rows='100%, *' frameborder=no framespacing=0 border=0>
[ERROR] <frame src="http://server1.darkfoxdev.com:9000/sonar/api/server/version"
 name=mainwindow frameborder=no framespacing=0 marginheight=0 marginwidth=0></fr
ame>
[ERROR] </frameset>
[ERROR] <noframes><h2>Your browser does not support frames. We recommend upgradi
ng your browser.</h2><br><br>
[ERROR] <center>Click <a href="http://server1.darkfoxdev.com:9000/sonar/api/serv
er/version" >here</a> to enter the site.</center>
[ERROR] </noframes>
[ERROR] </html>
[ERROR]
[ERROR] does not support Maven 3
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception

[编辑 2] 在同一个 vps 上,我安装了 sonarqube-4.5.4,对于 5.1 版,当我运行 mvn sonar:sonar 时,我得到了同样的错误。 问题可能出在 sonar-maven-plugin 上吗?

【问题讨论】:

  • 你能把 -V 添加到你的 mvn 命令行并发送完整的日志吗?
  • 请不要在多个支持渠道上交叉发布您的问题。见sonarqube.15.x6.nabble.com/…
  • 我用 mvn -V sonar:sonar 的输出编辑了我的问题。抱歉,我没有意识到交叉帖子

标签: maven sonarqube


【解决方案1】:

最后我解决了这个问题,它是 webhost 属性的配置问题。 在我的 dns 配置中,我有一个指向我的声纳地址的 urlFrame 记录,如果我将网络主机属性设置为声纳 url 而不是 urlFrame ,那么一切正常。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-09-13
    • 2018-02-19
    • 1970-01-01
    • 2022-08-08
    • 1970-01-01
    • 2021-05-06
    • 2019-11-26
    相关资源
    最近更新 更多