DroidsOnRoids / bitrise-step-sonarqube-scanner

Step for running SonarQube Scanner CLI
MIT License
6 stars 19 forks source link

SonarQube warning deprecated Java version #15

Open nicholausadi opened 4 years ago

nicholausadi commented 4 years ago

Hi everyone,

I use SonarScanner step and I receive this deprecate Java warning from Sonar. Can someone please update the Java version?

Thanks

Screen Shot 2020-08-13 at 22 09 34
d4rkd3v1l commented 3 years ago

You can add another script step before to ensure using Java 11 like follows.

# https://devcenter.bitrise.io/infrastructure/virtual-machines/#managing-java-versions
jenv global system
export JAVA_HOME="$(jenv prefix)"
envman add --key JAVA_HOME --value "$(jenv prefix)"

Maybe this could be integrated into this step?

koral-- commented 3 years ago

Sorry for the late reply I missed the first post. I'm not sure if changing the environment for next steps is the right action for this step. Although changing java version for only this step sounds good if bitrise stack won't switch to 11 until October.

d4rkd3v1l commented 3 years ago

I'm not that java guy (at all), but maybe it would be possible to "remember" die old environment and reset it after the step?

Best would be if Bitrise would use 11 as default, so only people that need older versions must switch back? But maybe they are afraid of too many breaking changes?

However, the first post references October 2020, which is already in the past now ;-)

koral-- commented 3 years ago

Ah indeed 🤦 I haven't read carefully. I switched to 11 in my projects some time ago so wasn't aware of that date. @d4rkd3v1l what is the current result then? Is scanner invocation failing on 8?