Unable to execute SonarQube解决办法

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.5.0.1254:sonar 
(default-cli) on project dotoyo_form_parent: Unable to execute SonarQube: Fail to parse 
entry in bootstrap index: <!DOCTYPE html><html lang="en"><head><meta http-equiv="content-
type" content="text/html; charset=UTF-8" charset="UTF-8"/><meta http-equiv="X-UA-
Compatible" content="IE=edge"><link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png"><link 
rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png"><link rel="apple-
touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png"><link rel="apple-touch-icon" 
sizes="76x76" href="/apple-touch-icon-76x76.png"><link rel="apple-touch-icon" 
sizes="114x114" href="/apple-touch-icon-114x114.png"><link rel="apple-touch-icon" 
sizes="120x120" href="/apple-touch-icon-120x120.png"><link rel="apple-touch-icon" 
sizes="144x144" href="/apple-touch-icon-144x144.png"><link rel="apple-touch-icon" 
sizes="152x152" href="/apple-touch-icon-152x152.png"><link rel="apple-touch-icon" 
sizes="180x180" href="/apple-touch-icon-180x180.png"><link rel="icon" type="image/x-icon" 
href="/favicon.ico"><meta name="application-name" content="SonarQube"/><meta 
name="msapplication-TileColor" content="#FFFFFF"/><meta name="msapplication-TileImage" 
content="/mstile-512x512.png"/><link href="/css/sonar.3398ab84.css" rel="stylesheet">
<title>SonarQube</title></head><body><div id="content"><div class="global-loading"><i 
class="spinner global-loading-spinner"></i> <span class="global-loading-text">Loading...
</span></div></div><script>window.baseUrl=""</script><script src="/js/vendor.c4ad594b.js">
</script><script src="/js/app.3398ab84.js"></script></body></html> -> [Help 1]

 环境:

jdk8+windows7 64 bit + maven3.2 + SonarQube 6.75

现象:通过maven扫描本地代码时,运行 mvn clean install sonar:sonar 时,出现 Fail to parse entry in bootstrap index,非常的绝望,各种找不到解决方法。

解决:

修改maven的 setting.xml中关于SonarQube连接的配置文件;

将 原 <sonar.host.url>http://localhost:9000/sonar</sonar.host.url> 改成

<sonar.host.url>http://localhost:9000</sonar.host.url> 即可!

    <profile>
        <id>sonar</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
        <!-- Example for MySQL-->
            <sonar.jdbc.url>jdbc:mysql://192.168.1.24:3306/sonarqube?useUnicode=true&amp;characterEncoding=utf8</sonar.jdbc.url>
            <sonar.jdbc.username>root</sonar.jdbc.username>
            <sonar.jdbc.password>123456</sonar.jdbc.password>
              
            <sonar.host.url>http://localhost:9000</sonar.host.url>
        </properties>
    </profile>

 

另外执行的时候,还可能遇到其他问题,可能是插件 和 SonarQube 版本不兼容导致的,需要仔细排查;

 

 如下是官方给出的解释:

从maven-sonar-plugin 3.4.0.905中,不再支持SonarQube < 5.6。

如果在5.6之前使用SonarQube实例,应该使用maven-sonar-plugin 3.3.0.603。

Maven -sonar-plugin 3.1不再支持Maven < 3.0。

如果在3.0之前使用Maven,应该使用Maven -sonar-plugin 3.0.2。

 

 

仅供备份!

 

 

 

 

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值