Qualified exports to an unknown module
Remi Forax
forax at univ-mlv.fr
Sat Dec 8 10:29:54 UTC 2018
----- Mail original -----
> De: "Alan Bateman" <Alan.Bateman at oracle.com>
> À: "jigsaw-dev" <jigsaw-dev at openjdk.java.net>
> Envoyé: Samedi 8 Décembre 2018 09:44:05
> Objet: Re: Qualified exports to an unknown module
> On 07/12/2018 18:59, Alex Buckley wrote:
>>
>> The decision was: Qualified exports/opens to a non-observable module
>> is NOT an error (see
>> https://docs.oracle.com/javase/specs/jls/se11/html/jls-7.html#jls-7.7.2-310).
>> javac will give an on-by-default lint warning instead.
>>
>> The StackOverflow question says "Because I configured the compiler to
>> treat warnings as errors (-Werror), the build fails." so the
>> questioner should look at disabling the lint warning (see
>> https://docs.oracle.com/en/java/javase/11/tools/javac.html#GUID-AEEC9F07-CB49-4E96-8BC7-BCC2C7F725C9).
> The scenario in the post seems to be a Maven multi-module project so an
> alternative to -Xlint:-module is to compile with --module-source-path so
> that module B is observable when compiling A. This should work:
> javac --module-source-path project/"*"/src/main/java -d <output> -m A
>
> although I don't know if the Maven compiler plugin can be configured to
> use this option/syntax.
Maven still can not do that, which is a bummer because compiling in multi-module mode is also faster when you starts to have quite a lot of classes.
>
> -Alan
Rémi
More information about the jigsaw-dev
mailing list