Hi all, >From my perspective having Java 17 as the minimal runtime for maven itself is fine. I have several projects that need to produce Java 8 binaries and I have been running all my builds with Java 17 for quite some time now. The toolchains setup works fine for all use cases I have seen so far.
Some of the effects I have noticed: - I can run these builds with Maven running on Java 17 and then build the various modules with any JDK (8,11,17) I need for the specific module. - I can run a each IT in a different JDK to ensure the needed compatibility (JPMS and such). In this test project I also have a Multi JDK module where I then run the same IT on each of the configured JDKs. - There is no need for doing the matrix builds (i.e. re run the entire build with different JDK versions) as I see in many projects I have a minimalistic test project in which I have experimented with all of this a while ago. https://github.com/nielsbasjes/ToolChainsInCiBuilds This also shows how to build a project like this on both Github and Gitlab. Niels Basjes On Wed, May 31, 2023 at 5:27 PM Christoph Läubrich <m...@laeubi-soft.de> wrote: > That one needs java to *RUN* maven is an implementation detail for me > and the actual java version do not matter. > > At best maven would ship with whatever JVM is required, or has a > launcher that downloads one or ... e.g. for Eclipse IDE (and other > software as well) one simply downloads a package (maybe with installer) > that is specific for a platform, so the same could work for maven, so > simply ship a "maven-runtime-jvm" with it... > > Then there is java used for *COMPILE* and with the -release flags today > this does not matter much either and the maven-compiler-plugin should > offer whatever suffice to find/use the best to compile. > > Then there might be java used to *RUN/TEST* an application where one > might want to test several ones or a specific one, but this is then best > configured separately from RUN maven or COMPILE code jdks... > > Of course it is *CONVENIENT* to use the same java for each of the cases, > but its not a requirement, and maybe one should just make it more > convenient to use different JVMs for the different cases ... So if I > configure my test to run on java 8, maven should simply either find or > download a suitable JVM (maybe from maven central), if I have very > special requirements on the actual JVM vendor or version one can still > configure it explicitly, but I would assume that for > 99% it is simply > irrelevant if its Adpotium, OpenJDK, Oracle, Azul, ... whatever, all > that counts is it is a Java 1.8 so I can say I have tested it with (one) > Java 1.8 compliant JVM! And i should not need any setup (beside > downloading maven). > > To some extend, maven can even ship with a JDK8, 11, 17 and 21 out of > the box! > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > > -- Best regards / Met vriendelijke groeten, Niels Basjes