diff --git a/build-logic/src/main/java/org/ehcache/build/conventions/BndConvention.java b/build-logic/src/main/java/org/ehcache/build/conventions/BndConvention.java index bbb915168e..b4a4383507 100644 --- a/build-logic/src/main/java/org/ehcache/build/conventions/BndConvention.java +++ b/build-logic/src/main/java/org/ehcache/build/conventions/BndConvention.java @@ -14,6 +14,7 @@ import org.gradle.api.plugins.JavaPlugin; import org.gradle.api.provider.MapProperty; import org.gradle.api.publish.PublishingExtension; +import org.gradle.api.publish.maven.MavenPom; import org.gradle.api.publish.maven.MavenPublication; import org.gradle.api.publish.plugins.PublishingPlugin; import org.gradle.api.tasks.bundling.Jar; @@ -67,6 +68,7 @@ public static Action> bundleDefaults(Project project properties.put(Constants.BUNDLE_DESCRIPTION, publication.getPom().getDescription()); }); }); + properties.put(Constants.AUTOMATIC_MODULE_NAME, "org." + project.getName().replace('-','.')); properties.put(Constants.BUNDLE_SYMBOLICNAME, project.getGroup() + "." + project.getName()); properties.put(Constants.BUNDLE_DOCURL, "http://ehcache.org"); properties.put(Constants.BUNDLE_LICENSE, "LICENSE"); diff --git a/ehcache-107/build.gradle b/ehcache-107/build.gradle index 3d439ff733..e85041659c 100644 --- a/ehcache-107/build.gradle +++ b/ehcache-107/build.gradle @@ -89,6 +89,7 @@ javadoc { jar { bnd( + 'Automatic-Module-Name': 'org.ehcache.jcache', 'Export-Package': '!org.ehcache.jsr107.tck, !org.ehcache.jsr107.internal.*, org.ehcache.jsr107.*', 'Import-Package': 'javax.cache.*;resolution:=optional, *', )