On Sat, 03 Sep 2016 03:57:30 +0200, Christian Schulte <[email protected]> wrote:

Am 09/02/16 um 19:06 schrieb Robert Scholte:
I'll rephrase the question: What to do which projects who want to have
their code compatible with a version lower than Java 9 AND want to provide
a module-info file as well?

The main sources are compiled with, for example, -target 1.6 and only
the module-info.java file is compiled with -target 1.9? That way? javac
cannot compile a module-info.java file when not targetting 1.9, correct?
Would be simple then.

Simple? We have several options. Most user friendly might be to have the "magic" in the maven-compiler-plugin, which implies you need to be able to set the javac executable for both, set the source/target/release for both. And how about compilation results (success/failures/error)? Merge them? All of this made we decide I don't like this option. So I suggest a bit less user-friendly, but even than there are several options:

- 2 execution blocks with one of following options:
* 2 source folders, one for the java sources, other for the module source(s).
  * 1 source folder, with includes/excludes of module-info.java
- MultiRelease JAR
And their might be options I haven't thought of.

All options are valid, but I think we should come with our preferred advice or recipe, because we will get these questions for sure.

Robert


Regards,

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to