wttech / AEM-Rules-for-SonarQube

SonarQube plugin with set of rules detecting possible bugs and bad smells specific for AEM development.
Apache License 2.0
112 stars 51 forks source link

Java 8 support broken #201

Closed IGx89 closed 3 years ago

IGx89 commented 4 years ago

After updating to the latest release (v1.2) we're now getting the following error when running our scans:

The plugin [aemrules] does not support Java 1.8.0_111: com/cognifide/aemrules/AemRulesSonarPlugin 
has been compiled by a more recent version of the Java Runtime (class file version 55.0), 
this version of the Java Runtime only recognizes class file versions up to 52.0

Was dropping Java 8 support intentional? If not, I think just setting the Maven compiler plugin's source/target settings to 1.8 would fix it.

toniedzwiedz commented 4 years ago

Hi @IGx89 , yes, starting from version 1.2, we've moved to Java 11, mirroring SonarQube Server and making use of a couple of APIs introduced post Java 11 to redeuce reliance on Guava, which has been causing dependency conflict issues with other plugins.

If you need to run it with Java 8, I'm afraid you'll have to stick with version 1.1.

IGx89 commented 4 years ago

Definitely understand. Do know though that SonarQube scanners (where your code runs) still officially support Java 8 (see https://docs.sonarqube.org/latest/requirements/requirements/) and all the built-in plugins do as well, so you're a bit ahead of the pack in dropping Java 8 support.

IGx89 commented 4 years ago

FYI we're switching our scanner JVM up to Java 11 so this isn't a blocker for us, so feel free to close if this isn't something you plan to pursue. Would recommend though updating the v1.2 release notes from saying "dropping support for development of the plugin using Java 8." to "dropping support for Java 8." in case others would be affected as well.

toniedzwiedz commented 4 years ago

FYI we're switching our scanner JVM up to Java 11 so this isn't a blocker for us, so feel free to close if this isn't something you plan to pursue.

Glad to hear it. So far, you've been the first one to report this. Hopefully, a bump to Java 11 should be an option for most parties affected. We may reconsider if anyone reports this being a blocker. Thanks for letting us know!

A for the release notes, I did highlight that Java 11 was a dependency https://github.com/Cognifide/AEM-Rules-for-SonarQube/releases/tag/v1.2 but I'm happy to change the phrasing if it is confusing.

ketan2505 commented 4 years ago

I have the same problem. We can use java 11 for sonarqube task only. This is inconsistency though.

yaro24 commented 4 years ago

I have the same Problem with our Company. We have some projects still on Java8 so I had to uninstall the Plugin for everyone. Would it be possible to disable the analysis via configuration or just skipping the AEM Rules part if the project is using Java8? Right now it breaks the build which is rather unfortunate.