spring-cloud / spring-cloud-stream

Framework for building Event-Driven Microservices
http://cloud.spring.io/spring-cloud-stream
Apache License 2.0
993 stars 606 forks source link

Missing entry "Automatic-Module-Name" in manifest in library "org.springframework.cloud:spring-cloud-stream" #2964

Open rlagoue opened 3 months ago

rlagoue commented 3 months ago

Currently it is not possible to use "org.springframework.cloud:spring-cloud-stream" in a Jigsaw-enabled application, because the manifest entry making it an "Automatic Module" is missing.

olegz commented 3 months ago

Could you please elaborate a bit?

rlagoue commented 3 months ago

Hi Oleg

Accoding to this link, the spring framework jars allow for deployment to JDK 9’s module path.

A note about modules: Spring’s framework jars allow for deployment to JDK 9’s module path ("Jigsaw"). For use in Jigsaw-enabled applications, the Spring Framework 5 jars come with "Automatic-Module-Name" manifest entries which define stable language-level module names ("spring.core", "spring.context", etc.) independent from jar artifact names (the jars follow the same naming pattern with "-" instead of ".", e.g. "spring-core" and "spring-context"). Of course, Spring’s framework jars keep working fine on the classpath on both JDK 8 and 9+.

I just found out that this is not the case for the jar "spring-cloud-stream" . The field "Autmatic Module" is namely missing inside the manifest file of this jar-file.

It just hindered me from adoption of jigsaw inside a spring boot application.

Best Regards