I wanted to figure out what's happening here, because I didn't recognize any related message as created by the maven-compiler-plugin nor by one of its dependencies.
A small example showed me this:
[WARNING] ..../src/main/java/module-info.java:[2,50] module not found: x.y.z And indeed, the message is actually coming from the javac tool, exposed via Maven.

With maven-compiler-plugin 3.11.0 there was an update of one of libraries that changed the output a little bit. The reason behind this is: https://github.com/codehaus-plexus/plexus-compiler/issues/183

Related to this there's an open issue at OpenJDK as well:
https://bugs.openjdk.org/browse/JDK-8292634

Not sure if this answers the questions, but as Alex already pointed out: your question is mainly about Maven.
I suggest to ask your question via the user mailinglist of Maven.
See https://maven.apache.org/mailing-lists.html for details

regards,
Robert Scholte

------ Oorspronkelijke bericht ------
Van "Alex Buckley" <alex.buck...@oracle.com>
Aan jigsaw-dev@openjdk.org
Datum 19-10-2023 02:30:37
Onderwerp Re: WARNING when a module tries to export to another module but the other module is not yet compiled

This list is not able to help with Maven configuration issues.

However, it's actually allowed for module x to say `exports foo to y;` when 
module y doesn't exist.

(JLS 7.7.2: "It is permitted for the to clause of an exports or opens directive to 
specify a module which is not observable (ยง7.7.6).")

Alex

On 10/18/2023 4:36 PM, Siddharth Jain wrote:
I am using JPMS with Maven compiler plugin. say i have:

module x {
exports foo to y
}

when i do a clean install I get a WARNING from maven that y does not exist. Its 
true, the dependency tree has to be built from bottom to top so x will be built 
first and only then y can be built.

i also see strange errors while executing tests where maven clean install will 
fail with some errors saying type X could not be found but if i re-run the 
command it passes.

i think this error happens because at first y does not exist so JPMS does not 
know about it. but when i re-run y does exist. is that right?

i don't mind the WARNING my question is about the weird errors. has anyone run 
into same issue?

Reply via email to