Java-Runtime-Compiler icon indicating copy to clipboard operation
Java-Runtime-Compiler copied to clipboard

Problem with gradle en eclipse because of automatic modules

Open MrKuip opened this issue 10 months ago • 2 comments

Gradle and eclipse still do not support automatic modules very well.

They only accept automatic modules when the jar has a Automatic-Module-Name property in the MANIFEST.MF.

The command 'jar -d --file compiler-2.25ea2.jar' displays module information:

No module descriptor found. Derived automatic module.

[email protected] automatic
requires java.base mandated
contains net.openhft.compiler
contains net.openhft.compiler.internal

it shows that the calculated module descriptor is 'compiler'. Maybe a better name could be supplied.

Could you please add a Automatic-Module-Name property in the manifest? (or create a proper module with module-info.class)

MrKuip avatar Mar 28 '24 13:03 MrKuip

Hi @MrKuip. Could you provide more details of how it exactly affects you (and what would be a 'correct' name)? Cause artifactId is actually compiler. Thus auto-derived module name is correct.

yevgenp avatar Jun 10 '24 10:06 yevgenp

There are 2 options to make this work for gradle:

  1. There should be a Automatic-Module-Name property in the manifest.
  2. The library should have a proper module-info.class.

An auto-derived module name is not handled bij gradle.

MrKuip avatar Jun 14 '24 11:06 MrKuip