Re: Changing Minimum Build Requirements for plugins to JDK11
> We (as Maven developers) will have to use Java 11 to build plugins but > not be able to use Java 11 features in the code. > That sounds frustrating to me :) > Or I don't understand the change you are trying to propose? Not at all. This is how I did it at work. This already removes a lot of frustration because it removes some complexity from the build. Am Di., 14. Nov. 2023 um 09:01 Uhr schrieb Olivier Lamy : > > oh right, sorry I didn't read correctly. > Do you want to build with Java 11 as a minimum but limit to the usage of Java > 8? > What is the point? > We (as Maven developers) will have to use Java 11 to build plugins but > not be able to use Java 11 features in the code. > That sounds frustrating to me :) > Or I don't understand the change you are trying to propose? > > My confusion was I read let's make java 11 as a minimum for plugins. > Which sounds a good change to me. > That's why I was thinking about some bytecode enforcer rule to check > plugins bytecode and not only dependencies so users stucked with Java > 8 can add such rule. > > > On Tue, 14 Nov 2023 at 17:45, Olivier Lamy wrote: > > > > Hi > > Do we have a bytecode enforcer rule but for plugins? > > That would help users who are eventually stuck with Java 8 and so cannot > > upgrade plugins going to be 11 required. > > > > > > > > Cheers > > Olivier > > > > > > On Tue, 14 Nov 2023 at 5:38 am, Karl Heinz Marbaise > > wrote: > >> > >> Hi, > >> > >> currently we have already the build requirements for Maven Core at JDK11+ > >> > >> So in consequence I would suggest to lift the minimum requirement for > >> building plugins to JDK11. > >> > >> That means also we can use "--release 8" option > >> (8) instead of > >> source/target which is not correct based on the warnings we get like: > >> "[WARNING] bootstrap class path not set in conjunction with -source 8" > >> which we get in all plugins based on the configuration in maven parent > >> using this: > >> > >> 8 > >> 1.${javaVersion} > >> 1.${javaVersion} > >> > >> which is not correct because we don't use animalsniffer anymore. > >> > >> So my suggestion is to lift the JDK build requirements to JDK11... > >> and use the 8 which > >> will prevent the warning. Also brings us back the safety net which > >> animal-sniffer was before. > >> > >> > >> Later on version of maven-parent (v42?) should change the whole > >> configuration (there are some related parts like maven-pmd-plugin, > >> maven-enforcer-plugin (enforce-byte-code max)..also toolchain-plugin... > >> > >> Furthermore we could get rid of the profile for JDK11+ related to > >> spotless-maven-plugin ... > >> > >> Based on the upgrade to maven-parent v41 we could also enhance the build > >> pipelines to build on JDK21 > >> > >> WDYT? > >> > >> Kind regards > >> Karl Heinz Marbaise > >> > >> - > >> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > >> For additional commands, e-mail: dev-h...@maven.apache.org > >> > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Changing Minimum Build Requirements for plugins to JDK11
Hi, On 14.11.23 14:16, Hervé Boutemy wrote: no need to change the build prerequisite: just add a profile to activate the release flag on newer JDK: https://issues.apache.org/jira/browse/MPOM-447 Add another profile... it would be better to clean up those things and make clean upgrade way...instead ... Kind regards Karl Heinz Marbaise Regards, Hervé Le lundi 13 novembre 2023, 20:38:00 CET Karl Heinz Marbaise a écrit : Hi, currently we have already the build requirements for Maven Core at JDK11+ So in consequence I would suggest to lift the minimum requirement for building plugins to JDK11. That means also we can use "--release 8" option (8) instead of source/target which is not correct based on the warnings we get like: "[WARNING] bootstrap class path not set in conjunction with -source 8" which we get in all plugins based on the configuration in maven parent using this: 8 1.${javaVersion} 1.${javaVersion} which is not correct because we don't use animalsniffer anymore. So my suggestion is to lift the JDK build requirements to JDK11... and use the 8 which will prevent the warning. Also brings us back the safety net which animal-sniffer was before. Later on version of maven-parent (v42?) should change the whole configuration (there are some related parts like maven-pmd-plugin, maven-enforcer-plugin (enforce-byte-code max)..also toolchain-plugin... Furthermore we could get rid of the profile for JDK11+ related to spotless-maven-plugin ... Based on the upgrade to maven-parent v41 we could also enhance the build pipelines to build on JDK21 WDYT? Kind regards Karl Heinz Marbaise - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Changing Minimum Build Requirements for plugins to JDK11
Hi, On 14.11.23 12:54, Elliotte Rusty Harold wrote: I'm OK with Java 11 required to build Maven in 2023, but I'll play my broken record: it is not yet OK to require Java 11 to run Maven or plugins. There are still a lot of developers out there who are using JDK 8 toolchains. and contrary to common claims, it is still a supported version by many JDK vendors. For runtime: Based on that argument we can are trapped in eternity ... because supporting contracts can go to 2035+ etc. If someone needs to support JDK 8; toolchain is the right way to go if it is really required... Most of the time JDK11, 17 or even 21 using --release 8 will be sufficient.. Buildtime is only for committers and contributors which from my perspective is a plus... Apart from that we already require JDK11+ for Core and resolver ... Kind regards Karl Heinz Marbaise On Mon, Nov 13, 2023 at 2:38 PM Karl Heinz Marbaise wrote: Hi, currently we have already the build requirements for Maven Core at JDK11+ So in consequence I would suggest to lift the minimum requirement for building plugins to JDK11. That means also we can use "--release 8" option (8) instead of source/target which is not correct based on the warnings we get like: "[WARNING] bootstrap class path not set in conjunction with -source 8" which we get in all plugins based on the configuration in maven parent using this: 8 1.${javaVersion} 1.${javaVersion} which is not correct because we don't use animalsniffer anymore. So my suggestion is to lift the JDK build requirements to JDK11... and use the 8 which will prevent the warning. Also brings us back the safety net which animal-sniffer was before. Later on version of maven-parent (v42?) should change the whole configuration (there are some related parts like maven-pmd-plugin, maven-enforcer-plugin (enforce-byte-code max)..also toolchain-plugin... Furthermore we could get rid of the profile for JDK11+ related to spotless-maven-plugin ... Based on the upgrade to maven-parent v41 we could also enhance the build pipelines to build on JDK21 WDYT? Kind regards Karl Heinz Marbaise - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Changing Minimum Build Requirements for plugins to JDK11
no need to change the build prerequisite: just add a profile to activate the release flag on newer JDK: https://issues.apache.org/jira/browse/MPOM-447 Regards, Hervé Le lundi 13 novembre 2023, 20:38:00 CET Karl Heinz Marbaise a écrit : > Hi, > > currently we have already the build requirements for Maven Core at JDK11+ > > So in consequence I would suggest to lift the minimum requirement for > building plugins to JDK11. > > That means also we can use "--release 8" option > (8) instead of > source/target which is not correct based on the warnings we get like: > "[WARNING] bootstrap class path not set in conjunction with -source 8" > which we get in all plugins based on the configuration in maven parent > using this: > > 8 > 1.${javaVersion} > 1.${javaVersion} > > which is not correct because we don't use animalsniffer anymore. > > So my suggestion is to lift the JDK build requirements to JDK11... > and use the 8 which > will prevent the warning. Also brings us back the safety net which > animal-sniffer was before. > > > Later on version of maven-parent (v42?) should change the whole > configuration (there are some related parts like maven-pmd-plugin, > maven-enforcer-plugin (enforce-byte-code max)..also toolchain-plugin... > > Furthermore we could get rid of the profile for JDK11+ related to > spotless-maven-plugin ... > > Based on the upgrade to maven-parent v41 we could also enhance the build > pipelines to build on JDK21 > > WDYT? > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Changing Minimum Build Requirements for plugins to JDK11
I'm OK with Java 11 required to build Maven in 2023, but I'll play my broken record: it is not yet OK to require Java 11 to run Maven or plugins. There are still a lot of developers out there who are using JDK 8 toolchains. and contrary to common claims, it is still a supported version by many JDK vendors. On Mon, Nov 13, 2023 at 2:38 PM Karl Heinz Marbaise wrote: > > Hi, > > currently we have already the build requirements for Maven Core at JDK11+ > > So in consequence I would suggest to lift the minimum requirement for > building plugins to JDK11. > > That means also we can use "--release 8" option > (8) instead of > source/target which is not correct based on the warnings we get like: > "[WARNING] bootstrap class path not set in conjunction with -source 8" > which we get in all plugins based on the configuration in maven parent > using this: > > 8 > 1.${javaVersion} > 1.${javaVersion} > > which is not correct because we don't use animalsniffer anymore. > > So my suggestion is to lift the JDK build requirements to JDK11... > and use the 8 which > will prevent the warning. Also brings us back the safety net which > animal-sniffer was before. > > > Later on version of maven-parent (v42?) should change the whole > configuration (there are some related parts like maven-pmd-plugin, > maven-enforcer-plugin (enforce-byte-code max)..also toolchain-plugin... > > Furthermore we could get rid of the profile for JDK11+ related to > spotless-maven-plugin ... > > Based on the upgrade to maven-parent v41 we could also enhance the build > pipelines to build on JDK21 > > WDYT? > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > -- Elliotte Rusty Harold elh...@ibiblio.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Changing Minimum Build Requirements for plugins to JDK11
+1 (non-binding) Actually, it should not make any difference if one builds a plugin using Java 11 or Java 17 (or even Java 21 with a warning) and targets Java 8 using the "--release 8" option (and that dependencies are compatible), so just for using --release option is actually enough (even if the lift was to Java 9) as it does not restrict the use of a newer JDK, and the --release option ensures compatibility with previous versions API. In any case, the ecosystem should start moving forward even if it is just for lifting the build requirement, yet as many already mentioned there are some caveats, as there is no big advantage for building with Java 11+ but compiling to Java 8 (the features are limited to Java 8 anyway) beyond the safety net and prevent the warning, it could potentially make the testing with Java 8 harder (maybe not with toolchains?), but if the test matrix will be Java 11, 17, 21 and latest-ea and crossing fingers that Java 8 works, it's also fine (I also compile with newer JDKs to older bytecode without major issues), but it should be clear what will be the approach to follow. Now, what I would love to see, is the lift of the runtime requirement for Maven 4.0 to at least Java 11, there has been a lot of discussion around this without any consensus, but I think it is time, then have plugins follow the lifting and compile to Java 11 too, leaving the 3.x branch compatible with Java 8, but the 4.x branch with minimum Java 11, please note that I'm not talking about breaking API compatibility, one plugin build for Java 8 (and from the 3.x branch) should work without issues in Maven 4.x running with Java 11+ as this is one of the goals of Maven 4.x, and this change will be more meaningful than just lifting the build requirement. Based on the 2023 State of the Java Ecosystem[1] it should now be a good bet to start using Java 11, and those who still need Java 8 compatibility, can and will still be using the 3.x branch (even if it's unmaintained). [1] https://newrelic.com/resources/report/2023-state-of-the-java-ecosystem On Mon, Nov 13, 2023 at 8:38 PM Karl Heinz Marbaise wrote: > Hi, > > currently we have already the build requirements for Maven Core at JDK11+ > > So in consequence I would suggest to lift the minimum requirement for > building plugins to JDK11. > > That means also we can use "--release 8" option > (8) instead of > source/target which is not correct based on the warnings we get like: > "[WARNING] bootstrap class path not set in conjunction with -source 8" > which we get in all plugins based on the configuration in maven parent > using this: > > 8 > 1.${javaVersion} > 1.${javaVersion} > > which is not correct because we don't use animalsniffer anymore. > > So my suggestion is to lift the JDK build requirements to JDK11... > and use the 8 which > will prevent the warning. Also brings us back the safety net which > animal-sniffer was before. > > > Later on version of maven-parent (v42?) should change the whole > configuration (there are some related parts like maven-pmd-plugin, > maven-enforcer-plugin (enforce-byte-code max)..also toolchain-plugin... > > Furthermore we could get rid of the profile for JDK11+ related to > spotless-maven-plugin ... > > Based on the upgrade to maven-parent v41 we could also enhance the build > pipelines to build on JDK21 > > WDYT? > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >
Re: Changing Minimum Build Requirements for plugins to JDK11
oh right, sorry I didn't read correctly. Do you want to build with Java 11 as a minimum but limit to the usage of Java 8? What is the point? We (as Maven developers) will have to use Java 11 to build plugins but not be able to use Java 11 features in the code. That sounds frustrating to me :) Or I don't understand the change you are trying to propose? My confusion was I read let's make java 11 as a minimum for plugins. Which sounds a good change to me. That's why I was thinking about some bytecode enforcer rule to check plugins bytecode and not only dependencies so users stucked with Java 8 can add such rule. On Tue, 14 Nov 2023 at 17:45, Olivier Lamy wrote: > > Hi > Do we have a bytecode enforcer rule but for plugins? > That would help users who are eventually stuck with Java 8 and so cannot > upgrade plugins going to be 11 required. > > > > Cheers > Olivier > > > On Tue, 14 Nov 2023 at 5:38 am, Karl Heinz Marbaise wrote: >> >> Hi, >> >> currently we have already the build requirements for Maven Core at JDK11+ >> >> So in consequence I would suggest to lift the minimum requirement for >> building plugins to JDK11. >> >> That means also we can use "--release 8" option >> (8) instead of >> source/target which is not correct based on the warnings we get like: >> "[WARNING] bootstrap class path not set in conjunction with -source 8" >> which we get in all plugins based on the configuration in maven parent >> using this: >> >> 8 >> 1.${javaVersion} >> 1.${javaVersion} >> >> which is not correct because we don't use animalsniffer anymore. >> >> So my suggestion is to lift the JDK build requirements to JDK11... >> and use the 8 which >> will prevent the warning. Also brings us back the safety net which >> animal-sniffer was before. >> >> >> Later on version of maven-parent (v42?) should change the whole >> configuration (there are some related parts like maven-pmd-plugin, >> maven-enforcer-plugin (enforce-byte-code max)..also toolchain-plugin... >> >> Furthermore we could get rid of the profile for JDK11+ related to >> spotless-maven-plugin ... >> >> Based on the upgrade to maven-parent v41 we could also enhance the build >> pipelines to build on JDK21 >> >> WDYT? >> >> Kind regards >> Karl Heinz Marbaise >> >> - >> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org >> For additional commands, e-mail: dev-h...@maven.apache.org >> - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Changing Minimum Build Requirements for plugins to JDK11
Hi Do we have a bytecode enforcer rule but for plugins? That would help users who are eventually stuck with Java 8 and so cannot upgrade plugins going to be 11 required. Cheers Olivier On Tue, 14 Nov 2023 at 5:38 am, Karl Heinz Marbaise wrote: > Hi, > > currently we have already the build requirements for Maven Core at JDK11+ > > So in consequence I would suggest to lift the minimum requirement for > building plugins to JDK11. > > That means also we can use "--release 8" option > (8) instead of > source/target which is not correct based on the warnings we get like: > "[WARNING] bootstrap class path not set in conjunction with -source 8" > which we get in all plugins based on the configuration in maven parent > using this: > > 8 > 1.${javaVersion} > 1.${javaVersion} > > which is not correct because we don't use animalsniffer anymore. > > So my suggestion is to lift the JDK build requirements to JDK11... > and use the 8 which > will prevent the warning. Also brings us back the safety net which > animal-sniffer was before. > > > Later on version of maven-parent (v42?) should change the whole > configuration (there are some related parts like maven-pmd-plugin, > maven-enforcer-plugin (enforce-byte-code max)..also toolchain-plugin... > > Furthermore we could get rid of the profile for JDK11+ related to > spotless-maven-plugin ... > > Based on the upgrade to maven-parent v41 we could also enhance the build > pipelines to build on JDK21 > > WDYT? > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >
Re: Changing Minimum Build Requirements for plugins to JDK11
+1 To discuss what versions matrix we want to have in CI builds ... lts + latest-ea? so will be 11, 17, 21, 22 I also build legacy applications with target 8 by jdk 11+ and don't see any issue. pon., 13 lis 2023 o 20:38 Karl Heinz Marbaise napisał(a): > Hi, > > currently we have already the build requirements for Maven Core at JDK11+ > > So in consequence I would suggest to lift the minimum requirement for > building plugins to JDK11. > > That means also we can use "--release 8" option > (8) instead of > source/target which is not correct based on the warnings we get like: > "[WARNING] bootstrap class path not set in conjunction with -source 8" > which we get in all plugins based on the configuration in maven parent > using this: > > 8 > 1.${javaVersion} > 1.${javaVersion} > > which is not correct because we don't use animalsniffer anymore. > > So my suggestion is to lift the JDK build requirements to JDK11... > and use the 8 which > will prevent the warning. Also brings us back the safety net which > animal-sniffer was before. > > > Later on version of maven-parent (v42?) should change the whole > configuration (there are some related parts like maven-pmd-plugin, > maven-enforcer-plugin (enforce-byte-code max)..also toolchain-plugin... > > Furthermore we could get rid of the profile for JDK11+ related to > spotless-maven-plugin ... > > Based on the upgrade to maven-parent v41 we could also enhance the build > pipelines to build on JDK21 > > WDYT? > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > > -- Sławomir Jaranowski
Re: Changing Minimum Build Requirements for plugins to JDK11
+1 Sylwester Ps. Hope to see soon that we drop Java 8 completely pon., 13 lis 2023, 20:38 użytkownik Karl Heinz Marbaise napisał: > Hi, > > currently we have already the build requirements for Maven Core at JDK11+ > > So in consequence I would suggest to lift the minimum requirement for > building plugins to JDK11. > > That means also we can use "--release 8" option > (8) instead of > source/target which is not correct based on the warnings we get like: > "[WARNING] bootstrap class path not set in conjunction with -source 8" > which we get in all plugins based on the configuration in maven parent > using this: > > 8 > 1.${javaVersion} > 1.${javaVersion} > > which is not correct because we don't use animalsniffer anymore. > > So my suggestion is to lift the JDK build requirements to JDK11... > and use the 8 which > will prevent the warning. Also brings us back the safety net which > animal-sniffer was before. > > > Later on version of maven-parent (v42?) should change the whole > configuration (there are some related parts like maven-pmd-plugin, > maven-enforcer-plugin (enforce-byte-code max)..also toolchain-plugin... > > Furthermore we could get rid of the profile for JDK11+ related to > spotless-maven-plugin ... > > Based on the upgrade to maven-parent v41 we could also enhance the build > pipelines to build on JDK21 > > WDYT? > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >
Re: Changing Minimum Build Requirements for plugins to JDK11
Big +1 I sometimes need to switch back from JDK 21 to 17 or earlier to build some of the plugins. If we start building with 11+, we can detect build errors easier for newer JDKs. The spotless profile might not be the only profile we can remove. One catch, though. Should we not test on JDK8? Maybe on toolchains? But I (personally) think from my experience the risk is very low. I have been building all my Java 8 apps with 11 for years, and now I am building Java 17 apps with 21 and never had a problem. On the contrary, build times went down by an insane amount, up to 50% less build time! :) Of course, YMMV. If there are technical reasons preventing this... so be it. But even then I would like to seek solutions first. - Ben Am Mo., 13. Nov. 2023 um 20:38 Uhr schrieb Karl Heinz Marbaise : > > Hi, > > currently we have already the build requirements for Maven Core at JDK11+ > > So in consequence I would suggest to lift the minimum requirement for > building plugins to JDK11. > > That means also we can use "--release 8" option > (8) instead of > source/target which is not correct based on the warnings we get like: > "[WARNING] bootstrap class path not set in conjunction with -source 8" > which we get in all plugins based on the configuration in maven parent > using this: > > 8 > 1.${javaVersion} > 1.${javaVersion} > > which is not correct because we don't use animalsniffer anymore. > > So my suggestion is to lift the JDK build requirements to JDK11... > and use the 8 which > will prevent the warning. Also brings us back the safety net which > animal-sniffer was before. > > > Later on version of maven-parent (v42?) should change the whole > configuration (there are some related parts like maven-pmd-plugin, > maven-enforcer-plugin (enforce-byte-code max)..also toolchain-plugin... > > Furthermore we could get rid of the profile for JDK11+ related to > spotless-maven-plugin ... > > Based on the upgrade to maven-parent v41 we could also enhance the build > pipelines to build on JDK21 > > WDYT? > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org