`Automatic-Module-Name` not recognized when set on another module within the same Maven project
System information
OS: Gentoo Linux 2.17 amd64 JDTLS version: v1.46.1 Editor: GNU Emacs (lsp-mode)
Problem Definition
I have the following project setup:
project/
foo/
pom.xml
bar/
pom.xml
pom.xml
bar is a Java module (defines a module-info.class). foo is not yet a Java module, and I'd like to reference it in bar. To do this, one can set a stable name for a JAR using the Automatic-Module-Name key in MANIFEST.MF. I do this in my pom.xml using maven-jar-plugin. However, this is not recognized by JDTLS, and I get: foo cannot be resolved to a module [8389908] in my editor. However, JDTLS is able to recognize the autogenerated name from the JAR filename. I'd like to avoid using this and instead use the Automatic-Module-Name.
Sounds very much like https://github.com/eclipse-m2e/m2e-core/issues/1089