From fbfabcfb555e83d85e3bad253984b7d2e24322fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Tue, 31 Jan 2023 13:56:33 +0100 Subject: [PATCH] Make the CDI/interceptor dependencies optional in module-info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "static" keyword means "required for compilation of this module, but not at runtime", which is pretty much the current situation. Those dependencies are only required for the @Transactional and @TransactionScoped annotations, but jakarta.transaction can perfectly well be used without CDI, e.g. in Hibernate ORM in a Java SE environment. Without this change, it's impossible to use jakarta.transaction-api (or anything relying on it, e.g. Hibernate ORM) without CDI in the modulepath. Signed-off-by: Yoann Rodière --- api/src/main/java/module-info.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/module-info.java b/api/src/main/java/module-info.java index ff5325f..21f9ec3 100644 --- a/api/src/main/java/module-info.java +++ b/api/src/main/java/module-info.java @@ -1,8 +1,8 @@ module jakarta.transaction { requires java.rmi; requires transitive java.transaction.xa; - requires transitive jakarta.cdi; - requires jakarta.interceptor; + requires static transitive jakarta.cdi; + requires static jakarta.interceptor; exports jakarta.transaction; } \ No newline at end of file