Re: [DISCUSS] Maven runtime vs artifact runtime?

2023-06-06 Thread Sylwester Lachiewicz
That's how we also our ci and local environment. On prvarte laptops we use latest LTS and ea Java versions to build and compile but use gha to check with other combinations. Sometimes it's a bit huge https://github.com/apache/maven-compiler-plugin/actions/runs/518201 - 3 latest Maven versions

Re: [DISCUSS] Maven runtime vs artifact runtime?

2023-06-05 Thread Hervé Boutemy
I think this difference during Maven build between compile time JDK vs tests execution time JDK is key for normal users choice. And ease of setup if multiple JDKs are involved (= it's not easy to have configured prerequisites in place) I suppose good articles showing the full setup to do so

Re: [DISCUSS] Maven runtime vs artifact runtime?

2023-06-05 Thread Romain Manni-Bucau
*Just for the record*. Toolchain has a great use case IMHO: enable to run on multiple jdk the same plugin (think surefire/failsafe for ex) without any matrix or CI trick. The big plus: you test the code runs with all versions you need against the same binary without side effects. Sometimes it is

Re: [DISCUSS] Maven runtime vs artifact runtime?

2023-06-05 Thread Henning Schmiedehausen
Agreed, that is one way to do that, but it seems to me that this is a CI/integration test issue, not a build issue per se. We do the same thing in Jdbi: Build with the LTS JDK, then test against 8, 11, 17, current Java release: https://github.com/jdbi/jdbi/blob/master/.github/workflows/ci.yml

Re: [DISCUSS] Maven runtime vs artifact runtime?

2023-06-05 Thread Henning Schmiedehausen
I always assumed that Java versions are a solved problem in JDK 9+ with '-release' which creates bytecode for the targeted JDK and even ensures that no classes or methods from the JDK are used that are not supported in that version. There is a desire for "everything must be the same" that I am

Re: [DISCUSS] Maven runtime vs artifact runtime?

2023-06-01 Thread Tamás Cservenák
Howdy, define 3 Java versions in my toolchains.xml, and then add 3 executions for surefire like here? https://maven.apache.org/surefire/maven-surefire-plugin/examples/toolchains.html Thanks T On Thu, Jun 1, 2023 at 6:39 PM Gary Gregory wrote: > I claim it is not wasteful to run unit tests on

Re: [DISCUSS] Maven runtime vs artifact runtime?

2023-06-01 Thread Gary Gregory
I claim it is not wasteful to run unit tests on Java 8, 11, and 17, which usually is the longest and most resource intensive part of a build. How would you do that were it not for a GitHub matrix? Gary On Thu, Jun 1, 2023, 08:01 Tamás Cservenák wrote: > Howdy, > > From recent discussions I

Re: [DISCUSS] Maven runtime vs artifact runtime?

2023-06-01 Thread Jeremy Landis
_ From: Tamás Cservenák Sent: Thursday, June 1, 2023 8:20:13 AM To: Maven Developers List Subject: Re: [DISCUSS] Maven runtime vs artifact runtime? Howdy, But AFAIK the toolchain is similar, all you need is to setup maven-toolchains-plugin once and done, so is "central" as well,

Re: [DISCUSS] Maven runtime vs artifact runtime?

2023-06-01 Thread Tamás Cservenák
Howdy, But AFAIK the toolchain is similar, all you need is to setup maven-toolchains-plugin once and done, so is "central" as well, no? https://maven.apache.org/guides/mini/guide-using-toolchains.html What do you mean by "no need to configure here and there"? You mean toolchains.xml? Or POM

Re: [DISCUSS] Maven runtime vs artifact runtime?

2023-06-01 Thread Romain Manni-Bucau
Well, Guillaume's work kind of solves that...but still, even with gradle, toolchains are a nightmare for most users so it is quite common to end with the same jdk to build and run. Romain Manni-Bucau @rmannibucau | Blog | Old

Re: [DISCUSS] Maven runtime vs artifact runtime?

2023-06-01 Thread Christoph Läubrich
> Does Maven miss some features Just look at how gradle support toolchains: https://docs.gradle.org/current/userguide/toolchains.html That's all shows what maven refuses to support and leaving people think its easier to use the same JVM "from beginning to end": 1) First class declarative

Re: [DISCUSS] Maven runtime vs artifact runtime?

2023-06-01 Thread Romain Manni-Bucau
Hi Tamas, Think we have two kind of users: * toolchain ones (probably minority) -> most plugins are okish there * contextual ones (use the build jdk to run maven and build apps) So overall I think we are quite targetting that already. In terms of compat matrix, I agree it is werid to not build

[DISCUSS] Maven runtime vs artifact runtime?

2023-06-01 Thread Tamás Cservenák
Howdy, >From recent discussions I see an interesting pattern: it seems that people (even our PMCs) are using Maven in a way that is making sure that "same Java version" (I guess vendor + version) is used from "beginning" to "end". And "beginning" here means BUILDING (think workstations and CI