From f0fdd8bed4ae91164aa0d352936c7b1e1347bc36 Mon Sep 17 00:00:00 2001 From: Patrick Reinhart Date: Fri, 24 Feb 2023 22:48:48 +0100 Subject: [PATCH] Fixes issue#2158 by adding Automatic-Module-Name Signed-off-by: Patrick Reinhart --- .../main/java/org/ehcache/build/conventions/BndConvention.java | 2 ++ ehcache-107/build.gradle | 1 + 2 files changed, 3 insertions(+) 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, *', )