[英]SonarQube: Create HTML reports without run sonar:sonar command
In Sonar, we just download the sonar setup and if need, change the db credentials and run the command on maven project sonar:sonar
, our coding stats and bugs are are analyzed by sonar and make the good html reports. 在Sonar中,我们只需下载声纳设置,并在需要时更改db凭证,然后在maven项目sonar:sonar
上运行命令,我们的编码统计信息和错误将通过声纳进行分析,并生成良好的html报告。 But for this we need to run sonar:sonar
command. 但是为此,我们需要运行sonar:sonar
命令。 Like findbugs, its possible to integrate with maven and create reports and time of maven:install
.In this LINK at 4th step explain. 像findbugs一样,它可以与maven集成并创建maven:install
报告和时间。在此LINK的第4步中进行说明。 Is also possible with sonar for make the report on maven:install
command? 声纳还可以在maven:install
命令上生成报告吗?
Like you can see on the SonarQube documentation , we strongly advise you to first run mvn clean install
and then mvn sonar:sonar
separately - otherwise you can have some side effects. 就像您在SonarQube文档上可以看到的那样 ,我们强烈建议您先运行mvn clean install
然后再分别运行mvn sonar:sonar
sonar-否则可能会有一些副作用。
However, if you want to have all this in a single run, this is a Maven-related question. 但是,如果您希望一次运行所有这些,这是一个与Maven相关的问题。 You just have to bind the "sonar" goal to the "install" phase in your POM, with something like: 您只需将“声纳”目标绑定到POM中的“安装”阶段即可,例如:
...
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>sonar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.