Re: source directory layout for multirelease jars

2020-05-01 Thread Robert Scholte
That's true, if it is just for the module descriptor, having a MRJAR is overkill. https://maven.apache.org/plugins/maven-compiler-plugin/examples/module-info.html describes how to solve that. Robert On 1-5-2020 13:52:15, Hervé BOUTEMY wrote: when the need is restricted META-INF/versions/9/modu

Re: source directory layout for multirelease jars

2020-05-01 Thread Christian Stein
On Fri, May 1, 2020 at 1:52 PM Hervé BOUTEMY wrote: > when the need is restricted META-INF/versions/9/module-info.class, ie not > really code per Java release, but only module or not module, isn't one > strategy better to use, given there should be less tests to be run? > > perhaps the answer is

Re: source directory layout for multirelease jars

2020-05-01 Thread Hervé BOUTEMY
when the need is restricted META-INF/versions/9/module-info.class, ie not really code per Java release, but only module or not module, isn't one strategy better to use, given there should be less tests to be run? perhaps the answer is that MR is overkill for that, given JDK 8 will simply ignore

Re: source directory layout for multirelease jars

2020-04-30 Thread Robert Scholte
Hi Benjamin, You're confusing me "Sadly, you cannot just add executions to the maven compiler plugin." Why not? The design of the pom contains support of multiple executions within the same plugin "Almost no IDE supports it, ..." I think they all do. And even if they don't, they should. I consi

Re: source directory layout for multirelease jars

2020-04-29 Thread Benjamin Marwell
Hi, to make the story a bit shorter - for most libraries it would be sufficient to add a way to include a module descriptor at "META-INF/versions/9/module-info.class" while still staying at java 8. Most libraries will stick to java 8 or even 7 for quite a time. Sadly, you cannot just add executio

Re: source directory layout for multirelease jars

2020-04-25 Thread Robert Scholte
I'm afraid this will be long story, but this might be the moment to share the details. https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.html describes already several topics: - why MultiRelease Jars - how to build them? There are several patterns, each with its pro's and con'

Re: source directory layout for multirelease jars

2020-04-24 Thread John Patrick
The structure which I want is; src/main/java src/main/java11 src/main/java14 src/test/java src/test/java11 src/test/java14 I'm wanting to create a java 1.8 jar, with java 11 LTS support and the latest release java version supported. So newer projects can use modules and older projects still have a

Re: source directory layout for multirelease jars

2020-04-24 Thread Christian Stein
Robert (?) wrote this page [0] about supporting MR-JAR files. There're several approaches to the topic. It'd be nice, if the compiler- and the jar-plugin would pick one by default or based on a directory layout convention. [0]: https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.h

source directory layout for multirelease jars

2020-04-24 Thread Elliotte Rusty Harold
I've been thinking about multirelease jars. First step is source layout. Here's a strawman modeled after the jar layout. We add a versions directory to the existing src directory. Inside the versions directory one can have directories named 9, 10, 11, etc. for each major Java version that has cust