Re: Supporting building with incompatible JDK versions on a single project

2021-06-18 Thread Tibor Digaňa
The example given by Guillaume looks interesting. jre-options = ${jre-${java.specification.version}-options:-${jre-default-options}} jre-default-options = [default options] jre-1.8 = [my JDK 1.8 specific options] But I would maybe distinguish between: 1. Maven options 2. and plugin options

Re: Supporting building with incompatible JDK versions on a single project

2021-06-16 Thread Romain Manni-Bucau
Le mer. 16 juin 2021 à 14:27, Guillaume Nodet a écrit : > Le mer. 16 juin 2021 à 14:04, Romain Manni-Bucau a > écrit : > > > Le mer. 16 juin 2021 à 13:53, Guillaume Nodet a > écrit > > : > > > > > Le mer. 16 juin 2021 à 13:39, Romain Manni-Bucau < > rmannibu...@gmail.com> > > a > > > écrit : >

Re: Supporting building with incompatible JDK versions on a single project

2021-06-16 Thread Guillaume Nodet
Le mer. 16 juin 2021 à 14:04, Romain Manni-Bucau a écrit : > Le mer. 16 juin 2021 à 13:53, Guillaume Nodet a écrit > : > > > Le mer. 16 juin 2021 à 13:39, Romain Manni-Bucau > a > > écrit : > > > > > Le mer. 16 juin 2021 à 12:05, Guillaume Nodet a > > écrit > > > : > > > > > > > A few plugins

Re: Supporting building with incompatible JDK versions on a single project

2021-06-16 Thread Romain Manni-Bucau
Le mer. 16 juin 2021 à 13:53, Guillaume Nodet a écrit : > Le mer. 16 juin 2021 à 13:39, Romain Manni-Bucau a > écrit : > > > Le mer. 16 juin 2021 à 12:05, Guillaume Nodet a > écrit > > : > > > > > A few plugins that fail with the same problem found by googling a bit: > > > https://youtrack.jet

Re: Supporting building with incompatible JDK versions on a single project

2021-06-16 Thread Guillaume Nodet
Le mer. 16 juin 2021 à 13:39, Romain Manni-Bucau a écrit : > Le mer. 16 juin 2021 à 12:05, Guillaume Nodet a écrit > : > > > A few plugins that fail with the same problem found by googling a bit: > > https://youtrack.jetbrains.com/issue/IDEA-266556 > > https://github.com/projectlombok/lombok/i

Re: Supporting building with incompatible JDK versions on a single project

2021-06-16 Thread Romain Manni-Bucau
Le mer. 16 juin 2021 à 12:05, Guillaume Nodet a écrit : > A few plugins that fail with the same problem found by googling a bit: > https://youtrack.jetbrains.com/issue/IDEA-266556 > https://github.com/projectlombok/lombok/issues/2681 > > > https://community.sonarsource.com/t/maven-sonar-scanner

Re: Supporting building with incompatible JDK versions on a single project

2021-06-16 Thread Guillaume Nodet
A few plugins that fail with the same problem found by googling a bit: https://youtrack.jetbrains.com/issue/IDEA-266556 https://github.com/projectlombok/lombok/issues/2681 https://community.sonarsource.com/t/maven-sonar-scanner-not-working-with-jdk-16/40699 https://www.bountysource.com/issues/9

Re: Supporting building with incompatible JDK versions on a single project

2021-06-16 Thread Romain Manni-Bucau
Le mer. 16 juin 2021 à 08:39, Guillaume Nodet a écrit : > Well, my point was not really to find a workaround, but rather to start a > discussion around "maven jvm customization from files is not well > supported for now" ... :-) > Got it, but point is "is it that often needed"? Most plugin using

Re: Supporting building with incompatible JDK versions on a single project

2021-06-15 Thread Guillaume Nodet
Well, my point was not really to find a workaround, but rather to start a discussion around "maven jvm customization from files is not well supported for now" ... :-) Le mer. 16 juin 2021 à 07:24, Romain Manni-Bucau a écrit : > Le mar. 15 juin 2021 à 23:39, Guillaume Nodet a écrit > : > > > In

Re: Supporting building with incompatible JDK versions on a single project

2021-06-15 Thread Romain Manni-Bucau
Le mar. 15 juin 2021 à 23:39, Guillaume Nodet a écrit : > In my case, it was a test in mvnd which is using some low level > reflection. I do agree this is not the best example, because an easy > workaround can be done by configuring surefire to use a fork. However, if > a plugin does the same t

Re: Supporting building with incompatible JDK versions on a single project

2021-06-15 Thread Guillaume Nodet
In my case, it was a test in mvnd which is using some low level reflection. I do agree this is not the best example, because an easy workaround can be done by configuring surefire to use a fork. However, if a plugin does the same thing, there's no easy way to workaround it. Le mar. 15 juin 2021

Re: Supporting building with incompatible JDK versions on a single project

2021-06-15 Thread Romain Manni-Bucau
Hi, There are two levels for me: 1. Maven itself -> maven opts works not bad but we should work ootb 2. Forks -> each plugin must support that and it cna be made dynamic with an extension which autoadjust the conf block Wdyt? Le mar. 15 juin 2021 à 22:02, Benjamin Marwell a écrit : > Hi Tamá

Re: Supporting building with incompatible JDK versions on a single project

2021-06-15 Thread Benjamin Marwell
Hi Tamás, So hazelcast runs in the module path. Maven used the class path only. Thus, add-opens does not do anything. UNLESS... you start sub pocesses from Maven, eg using the exec plugin. This means we still need an example where you have this issue with Maven. On Tue, 15 Jun 2021, 20:27 Tamás

Re: Supporting building with incompatible JDK versions on a single project

2021-06-15 Thread Tamás Cservenák
Or xstream for that matter... ToP On Tue, Jun 15, 2021, 20:26 Tamás Cservenák wrote: > Just try to run hazelcast 3 (latest of 3.x) on java11. It will log what it > needs to be opened up. > > T on phone > > On Tue, Jun 15, 2021, 20:19 Benjamin Marwell wrote: > >> Tamás, >> >> which module do yo

Re: Supporting building with incompatible JDK versions on a single project

2021-06-15 Thread Tamás Cservenák
Just try to run hazelcast 3 (latest of 3.x) on java11. It will log what it needs to be opened up. T on phone On Tue, Jun 15, 2021, 20:19 Benjamin Marwell wrote: > Tamás, > > which module do you open? > > In most cases I have encountered, adding jaxb as a dependency to the > project is sufficien

Re: Supporting building with incompatible JDK versions on a single project

2021-06-15 Thread Benjamin Marwell
Tamás, which module do you open? In most cases I have encountered, adding jaxb as a dependency to the project is sufficient. But to be sure, we would need to see an example. I think this would have long been noticed if it was a common problem. Ben On Tue, 15 Jun 2021, 19:18 Tamás Cservenák,

Re: Supporting building with incompatible JDK versions on a single project

2021-06-15 Thread Tamás Cservenák
Howdy, Robert, I think you are wrong: from Java 11 migration guide --add-opens If you have to allow code on the class path to do deep reflection to access nonpublic members, then use the --add-opens runtime option. Some libraries do deep reflection, meaning setAccessible(true), so they can acces

Re: Supporting building with incompatible JDK versions on a single project

2021-06-15 Thread Robert Scholte
AFAIK the --add-opens is only useful when using the module path. Maven itself and the plugins use the classpath, so I would like to have an example to better understand your issue. thanks, Robert On 15-6-2021 18:43:35, Guillaume Nodet wrote: Hi everyone ! There are some small incompatibilities

Supporting building with incompatible JDK versions on a single project

2021-06-15 Thread Guillaume Nodet
Hi everyone ! There are some small incompatibilities between JDK around the supported command line versions. Usually, those do not cause any real problems. However, the "--add-opens" are sometimes necessary and only supported on JDK >= 9, as the JVM exits with an error on JDK 8. Some plugins may