Welcome! Please see the About page for a little more info on how this works.

0 votes
in Tools by
retagged by

Attempting to compile a modular Java project will fail, reporting that it cannot not find the required modules.

I fixed it by adding the module paths manually in :javac-opts. Could tools.build handle this? Either by adding all the modules to the module path, or ignoring module-info.java and module-info.class. tools.build/javac will also fail if there is a module-info.class in the classes directory and tools.build/javac does not find the modules.

Thank you.

2 Answers

0 votes
by

Where would tools.build get the module list from? From reading the dep jar manifests?

Certainly not opposed to adding support.

by
Looking at how maven-compile-plugin does it, they build a proper module list by parsing module-infos from the both binary classes and source files.
https://github.com/apache/maven-compiler-plugin/blob/master/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java#L200

But I think the module paths end up being a subset of the class paths.
0 votes
by
...