From 9954c18749d4bef2e7e55665787e1fca89927f05 Mon Sep 17 00:00:00 2001 From: "David M. Lloyd" Date: Fri, 22 Apr 2022 15:12:23 -0500 Subject: [PATCH] Add `module-info` --- pom.xml | 21 ++++++++++++------- src/main/java/module-info.java | 14 +++++++++++++ src/main/java/org/jboss/threads/Messages.java | 6 ++++-- 3 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 src/main/java/module-info.java diff --git a/pom.xml b/pom.xml index 130281e..933028c 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ 11 - 3.0.0.Final + 3.0.1.Final @@ -100,12 +100,6 @@ ${version.jboss.logging.tools} provided - - org.jboss.logging - jboss-logging-processor - ${version.jboss.logging.tools} - provided - org.jboss.logging jboss-logging @@ -189,7 +183,17 @@ maven-compiler-plugin - full + + + org.jboss.logging + jboss-logging-processor + ${version.jboss.logging.tools} + + + + + --add-reads=org.jboss.threads=ALL-UNNAMED + @@ -205,6 +209,7 @@ ${jboss.threads.eqe.unlimited-queue} ${jboss.threads.eqe.register-mbean} + true diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 0000000..e68e5fb --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,14 @@ +module org.jboss.threads { + requires java.management; + requires jdk.unsupported; + requires org.jboss.logging; + requires static org.jboss.logging.annotations; + requires org.wildfly.common; + requires io.smallrye.common.annotation; + requires io.smallrye.common.constraint; + requires io.smallrye.common.cpu; + requires io.smallrye.common.function; + + exports org.jboss.threads; + exports org.jboss.threads.management; +} \ No newline at end of file diff --git a/src/main/java/org/jboss/threads/Messages.java b/src/main/java/org/jboss/threads/Messages.java index 7e87533..ac0fd53 100644 --- a/src/main/java/org/jboss/threads/Messages.java +++ b/src/main/java/org/jboss/threads/Messages.java @@ -1,5 +1,7 @@ package org.jboss.threads; +import static java.lang.invoke.MethodHandles.*; + import java.time.Duration; import org.jboss.logging.BasicLogger; @@ -14,8 +16,8 @@ */ @MessageLogger(projectCode = "JBTHR", length = 5) interface Messages extends BasicLogger { - Messages msg = Logger.getMessageLogger(Messages.class, "org.jboss.threads"); - Messages intMsg = Logger.getMessageLogger(Messages.class, "org.jboss.threads.interrupt-handler"); + Messages msg = Logger.getMessageLogger(lookup(), Messages.class, "org.jboss.threads"); + Messages intMsg = Logger.getMessageLogger(lookup(), Messages.class, "org.jboss.threads.interrupt-handler"); // version @Message(value = "JBoss Threads version %s")