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 single jar they can depend upon and choose when to upgrade within having to change and GAV details. Which the maven-compiler-plugin can handled, and produce a MR-JAR, but the issues I've encountered are; 1) surefire doesn't support toolchain yet, believe is out in 3.0.0-M5 2) Bug since Java 9 and still in 14 regarding MR-JAR and JPMS, where the root java version can't be 1.8, it must be 9 or newer. otherwise so if your have java 1.8 and this java 11 /META-INF/versions/11/module-info.class, it would be valid for jar but not for java or javac even if you specify -release 11. 3) IDE's can't handle different project subdirectories being different java versions I do like the new 6 month release cycles but i'm still feeling some projects are yet to move from java 6, or 7 to even 8, so some issues are yet to be found... John On Fri, 24 Apr 2020 at 17:06, Christian Stein <sormu...@gmail.com> wrote: > > 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.html > > On Fri, Apr 24, 2020 at 5:26 PM Elliotte Rusty Harold <elh...@ibiblio.org> > wrote: > > > 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 custom code. Each numbered directory is a full > > src folder that contains main, test, etc. > > > > > > Can anyone poke holes in this? Is there a reason why this wouldn't suffice? > > > > -- > > 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