Maksym
(Lysenko)
November 2, 2021, 11:14am
1
Sonarqube - 7.9.1, sonar-maven-plugin:3.9.0, amazon corretoo jdk 11
After updating jdk from 8 to amazon corretto 11 we started facing with issue when quality gates are failing due to code coverage 0%.
Even when we used jdk8, from time to time code covegare was 0% because there was no new code. But quality gates were not failing.
Maksym
(Lysenko)
November 2, 2021, 6:12pm
2
Added @{argLine} --illegal-access=permit to maven-surefire-plugin
ganncamp
(G Ann Campbell)
November 3, 2021, 6:51pm
3
Hi,
Welcome to the community!
First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:
7.9.1 → 8.9.3 → 9.1 (last step optional)
You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here .
Once you’ve accomplished the upgrade, we can take up the issue of coverage. But I suspect it lies outside of analysis since the JDK you run analysis with shouldn’t have any impact on the reading of your coverage reports.
Ann
Maksym
(Lysenko)
November 3, 2021, 7:23pm
4
Hi Ann, thanks for the response and advice. We will work on the upgrade.
Btw we managed to fix the issue by reconfiguring maven-surefire-plugin with:
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{argLine} --illegal-access=permit</argLine>
</configuration>
It was like:
<argLine>
--illegal-access=permit
</argLine>
1 Like
system
(system)
Closed
November 10, 2021, 7:24pm
5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.