jborgers / sonar-pmd

☕️ PMD Plugin for SonarQube
https://redirect.sonarsource.com/plugins/pmd.html
GNU Lesser General Public License v3.0
254 stars 154 forks source link

Target Classfile Version changed in 3.5.0 #456

Closed dnl50 closed 2 months ago

dnl50 commented 2 months ago

Hi there,

I'm not sure if this is really an issue or an undocumented change, but the classfile version of the plugin classes changed from 52 (Java 8) to 61 (Java 11) in Release 3.5.0. This causes our Gradle Sonar analysis to fail, since the Gradle JVM is running on Java 11.

If this change is intentional it should be mentioned in the release notes 🐰

jborgers commented 2 months ago

Hmm, yes, it seems to be 61 , Java 17. That will be the reason it doesn't work on Java 11. Is this blocking for you?

MarkusSchoelzel commented 2 months ago

We have some projects using Java 11 Scanner, so 3.5.0 broke builds/scans for us.

If 3.5.0 is to be compatible with SonarQube 9.8, which supports scanners using Java >= 11 (https://docs.sonarsource.com/sonarqube/9.8/requirements/prerequisites-and-overview/), it may make sense for plugins to not require a higher version.

jborgers commented 2 months ago

Okay. We had trouble on 11, moving to 17 solved it. Can you work around it?

It is added to the release notes.

dnl50 commented 2 months ago

Thanks for your fast reply. We downgraded the plugin back to Version 3.4.0 and everything works again.

jborgers commented 2 months ago

okay, great.