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.

-Alan

Reply via email to