eclipse.jdt.ls icon indicating copy to clipboard operation
eclipse.jdt.ls copied to clipboard

`Automatic-Module-Name` not recognized when set on another module within the same Maven project

Open sin-ack opened this issue 8 months ago • 1 comments

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.

sin-ack avatar May 13 '25 16:05 sin-ack

Sounds very much like https://github.com/eclipse-m2e/m2e-core/issues/1089

fbricon avatar Oct 29 '25 15:10 fbricon