sonar通过maven进行代码扫描时出现异常处理
Not authorized. Please check the user token in the property ‘sonar.token’ or the credentials in the properties ‘sonar.login’ and ‘sonar.password’.
可尝试通过在maven中增加一下配置
增加的 <sonar.login></sonar.login> 配置,值为sonar产生的 **-Dsonar.token=**的值
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.host.url>#{sonarHost}</sonar.host.url>
<sonar.login>#{sonarToken}</sonar.login>
</properties>
</profile>
</profiles>