What are the maven lifecycle phases does the command mvn sonar:sonar
execute?
While I see the logs that run over the screen, at a very high level test, install
that I spotted out.
Consider the following example,
I have a maven project like the following
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 reportmvn 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
?
If mvn sonar:sonar
covers executing the mvn clean install
, why the report gives me old numbers?
mvn sonar:sonar
does not trigger a mvn clean install
execution. It triggers a Maven Surefire plugin execution only.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With