[英]What does mvn sonar:sonar do?
What are the maven lifecycle phases does the command mvn sonar:sonar
execute?命令
mvn sonar:sonar
执行的 maven 生命周期阶段是什么?
While I see the logs that run over the screen, at a very high level test, install
that I spotted out.当我看到在屏幕上运行的日志时,在非常高级的
test, install
我发现的。
Consider the following example,考虑下面的例子,
I have a maven project like the following我有一个像下面这样的 Maven 项目
maven-root
maven-child-1
maven-child-2
Consider the following scenario, I have done them sequentially at root level考虑以下场景,我在根级别按顺序完成了它们
mvn clean install
mvn sonar:sonar
-- See the report mvn sonar:sonar
-- 查看报告mvn sonar:sonar
mvn sonar:sonar
My changes for the test cases are not reflecting in the report.我对测试用例的更改没有反映在报告中。
mvn sonar:sonar
Still that generates me the old report.仍然生成了旧报告。
In brief, Do I need to perform mvn clean install
and then mvn sonar:sonar
?简而言之,我是否需要执行
mvn clean install
然后执行mvn sonar:sonar
?
If mvn sonar:sonar
covers executing the mvn clean install
, why the report gives me old numbers?如果
mvn sonar:sonar
涵盖执行mvn clean install
,为什么报告给了我旧的数字?
mvn sonar:sonar
does not trigger a mvn clean install
execution. mvn sonar:sonar
不会触发mvn clean install
执行。 It triggers a Maven Surefire plugin execution only.它仅触发 Maven Surefire 插件执行。
This is why you need to perform a mvn clean install
before each analysis - otherwise your compiled classes won't be up-to-date and therefore the Surefire execution won't include recent modifications.这就是为什么您需要在每次分析之前执行
mvn clean install
- 否则您编译的类将不会是最新的,因此 Surefire 执行将不包括最近的修改。
Run the below cammand运行下面的命令
mvn clean install sonar:sonar mvn 干净安装声纳:声纳
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.