-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 1.5.2 still contains Java 11 class files #27
Comments
I just noticed that you did a lot of strange things in your Maven POM, like configuring So on the one hand, on Maven Central you have two versions of the plugin. But nobody can use the Java 8 variant, because using a Maven would say, when trying to run it like that:
Bottom line: Nice idea, but Maven simply does not work like this. I am not sure why you made all that effort without any benefit and why anyone needs the Java 11 version at all. Maybe you thought that in your build profiles, having to deal with different JVM command line parameters when building on different JDKs, you would have to do it like that. But you can easily build the project with JDK 16 and tell the compiler to always produce Java 8 byte code. A plugin or dependency compiled to target 8 can still be used in all future JVM versions, but not the other way around. So I am going to create a pull request in order to get rid of all those variants and limitations. Another problem in your POM is that you set this: <prerequisites>
<maven>${mavenVersion}</maven>
</prerequisites> Why? This not only sets the minimum Maven version needed to build the plugin, but also the minimum version to run the plugin. I experimentally deactivated this prerequisite, and the plugin still works fine in Maven versions back to 3.0.5 - I did not test any lower. So why would you force the users of your plugin to use a minimum Maven version? Even if you use plugin API 3.6.3 like presently, the plugin still works on older Maven versions. Even if you upgrade to plugin API 3.8.1, the plugin should still run on Maven 3.0.5. So my PR will also remote that unnecessary limitation. As for the minimum Maven version needed to build the plugin:
|
If you need a bugfix, enabling the plugin to be used on
|
Is there any update or workaround to enable the plugin on Java 8 runtimes? |
Why don't you just follow the link in my comment directly above yours? I have published a Java 8 version on Maven Central 9 months ago. |
In #21, I see that you did something in order to enable builds with Java 8 target. But actually, version 1.5.2 on Maven Central still contains Java 11 class files, i.e. users need at least JDK 11 in order to build software when using your plugin. So the same error reported in #21 persists.
I cloned the repository and built my own version using profile
java-8
, and it runs flawlessly on JDK 8.Please publish a new release 1.5.3, compiled correctly. It is not enough to just have the ability to compile for target 8, you also need to actually use it. 😉
P.S.: I am wondering why you even try to compile to target 11, if the source code (or at least the binaries) are still compatible with Java 8. What is the benefit, if you are not using recent language features?
The text was updated successfully, but these errors were encountered: