From b9e55ac5282e38981d8495504b61bcbca65d6cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Mon, 13 Nov 2023 12:44:11 +0100 Subject: [PATCH] module-info.java: Remove "transient" from requirements where possible junixsocket-common declares a "require static transient" on compile-time annotations. These annotations are optional, and therefore should not be marked transient. Moreover, in mysql, we would "require transient" the new MySQL connector (mysql.connector.j). However, this would prevent us from using the old MySQL connector (mysql.connector.java). Remove the "transient" declaration, and reformat module-info.java https://github.com/kohlschutter/junixsocket/issues/148 --- junixsocket-common/src/main/java/module-info.java | 6 +++--- junixsocket-darwin/src/main/java/module-info.java | 1 + junixsocket-demo/src/main/java/module-info.java | 6 +++--- junixsocket-mysql/src/main/java/module-info.java | 2 +- junixsocket-server/src/main/java/module-info.java | 1 + junixsocket-ssl/src/main/java/module-info.java | 1 + junixsocket-tipc/src/main/java/module-info.java | 1 + junixsocket-vsock/src/main/java/module-info.java | 1 + 8 files changed, 12 insertions(+), 7 deletions(-) diff --git a/junixsocket-common/src/main/java/module-info.java b/junixsocket-common/src/main/java/module-info.java index 4d024ea9a..335e8b7b8 100644 --- a/junixsocket-common/src/main/java/module-info.java +++ b/junixsocket-common/src/main/java/module-info.java @@ -2,13 +2,13 @@ * The common junixsocket classes. */ // NOPMD -- https://github.com/pmd/pmd/issues/4620 -@SuppressWarnings("module") -module org.newsclub.net.unix { +@SuppressWarnings("module") module org.newsclub.net.unix { exports org.newsclub.net.unix; requires java.base; requires static java.rmi; - requires static transitive com.kohlschutter.annotations.compiletime; + + requires static com.kohlschutter.annotations.compiletime; requires static org.eclipse.jdt.annotation; requires static animal.sniffer.annotations; } diff --git a/junixsocket-darwin/src/main/java/module-info.java b/junixsocket-darwin/src/main/java/module-info.java index 5a163a1c6..6ae4e53de 100644 --- a/junixsocket-darwin/src/main/java/module-info.java +++ b/junixsocket-darwin/src/main/java/module-info.java @@ -6,6 +6,7 @@ exports org.newsclub.net.unix.darwin.system; requires transitive org.newsclub.net.unix; + requires static com.kohlschutter.annotations.compiletime; requires static org.eclipse.jdt.annotation; } diff --git a/junixsocket-demo/src/main/java/module-info.java b/junixsocket-demo/src/main/java/module-info.java index 9fd50b997..3528394f2 100644 --- a/junixsocket-demo/src/main/java/module-info.java +++ b/junixsocket-demo/src/main/java/module-info.java @@ -3,7 +3,6 @@ */ @SuppressWarnings("module") // module org.newsclub.net.unix.demo { - requires com.kohlschutter.util; requires org.newsclub.net.unix; requires org.newsclub.net.unix.tipc; requires org.newsclub.net.unix.server; @@ -15,12 +14,13 @@ requires nanohttpd; requires okhttp3; requires mina.core; - requires static com.kohlschutter.annotations.compiletime; - requires static org.eclipse.jdt.annotation; requires io.netty.common; requires io.netty.buffer; requires io.netty.transport; + requires static com.kohlschutter.annotations.compiletime; + requires static org.eclipse.jdt.annotation; + exports org.newsclub.net.unix.demo.rmi.services to java.rmi; exports org.newsclub.net.unix.demo.rmi.fd to java.rmi; } diff --git a/junixsocket-mysql/src/main/java/module-info.java b/junixsocket-mysql/src/main/java/module-info.java index ed6b7ba1f..494994200 100644 --- a/junixsocket-mysql/src/main/java/module-info.java +++ b/junixsocket-mysql/src/main/java/module-info.java @@ -9,7 +9,7 @@ requires java.base; // requires mysql.connector.java; // until 8.0.30 - requires transitive mysql.connector.j; // from 8.0.31 + requires mysql.connector.j; // from 8.0.31 requires static com.kohlschutter.annotations.compiletime; requires static org.eclipse.jdt.annotation; diff --git a/junixsocket-server/src/main/java/module-info.java b/junixsocket-server/src/main/java/module-info.java index 9426eb352..0c7c8bf9a 100644 --- a/junixsocket-server/src/main/java/module-info.java +++ b/junixsocket-server/src/main/java/module-info.java @@ -5,6 +5,7 @@ exports org.newsclub.net.unix.server; requires transitive org.newsclub.net.unix; + requires static com.kohlschutter.annotations.compiletime; requires static org.eclipse.jdt.annotation; } diff --git a/junixsocket-ssl/src/main/java/module-info.java b/junixsocket-ssl/src/main/java/module-info.java index 33f406182..1a3a21a8e 100644 --- a/junixsocket-ssl/src/main/java/module-info.java +++ b/junixsocket-ssl/src/main/java/module-info.java @@ -5,6 +5,7 @@ exports org.newsclub.net.unix.ssl; requires transitive org.newsclub.net.unix; + requires static com.kohlschutter.annotations.compiletime; requires static org.eclipse.jdt.annotation; } diff --git a/junixsocket-tipc/src/main/java/module-info.java b/junixsocket-tipc/src/main/java/module-info.java index 5c88ee1f5..5b9f7dea7 100644 --- a/junixsocket-tipc/src/main/java/module-info.java +++ b/junixsocket-tipc/src/main/java/module-info.java @@ -5,6 +5,7 @@ exports org.newsclub.net.unix.tipc; requires transitive org.newsclub.net.unix; + requires static com.kohlschutter.annotations.compiletime; requires static org.eclipse.jdt.annotation; } diff --git a/junixsocket-vsock/src/main/java/module-info.java b/junixsocket-vsock/src/main/java/module-info.java index 061e2d680..16c5fe764 100644 --- a/junixsocket-vsock/src/main/java/module-info.java +++ b/junixsocket-vsock/src/main/java/module-info.java @@ -5,6 +5,7 @@ exports org.newsclub.net.unix.vsock; requires transitive org.newsclub.net.unix; + requires static com.kohlschutter.annotations.compiletime; requires static org.eclipse.jdt.annotation; }