From b9f89af847f148a00128a72ca9ceb2ac82f43895 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Fri, 8 Feb 2019 17:30:27 +0100 Subject: [PATCH] Fixes #3320 - Review Jetty 10 module-info.java. Reviewed module-info.java files. For those that have a "requires static" added a comment about why the dependency is optional. Rearranged directives in alphabetical order. Signed-off-by: Simone Bordet --- apache-jsp/src/main/java/module-info.java | 4 ++-- .../jetty-alpn-client/src/main/java/module-info.java | 2 +- .../src/main/java/module-info.java | 6 +++--- .../src/main/java/module-info.java | 6 +++--- .../src/main/java/module-info.java | 4 ++-- .../src/main/java/module-info.java | 4 ++-- .../jetty-alpn-server/src/main/java/module-info.java | 2 +- jetty-annotations/src/main/java/module-info.java | 8 ++++---- jetty-client/src/main/java/module-info.java | 11 +++++++---- jetty-deploy/src/main/java/module-info.java | 2 ++ .../fcgi-client/src/main/java/module-info.java | 4 ++-- jetty-fcgi/fcgi-server/pom.xml | 6 +----- .../fcgi-server/src/main/java/module-info.java | 10 ++++++---- jetty-http/pom.xml | 2 +- jetty-http/src/main/java/module-info.java | 4 +++- .../http2-client/src/main/java/module-info.java | 6 +++--- .../http2-common/src/main/java/module-info.java | 4 ++-- .../http2-hpack/src/main/java/module-info.java | 2 +- .../src/main/java/module-info.java | 12 ++++++------ .../http2-server/src/main/java/module-info.java | 4 ++-- jetty-jaas/src/main/java/module-info.java | 6 ++++-- jetty-jaspi/src/main/java/module-info.java | 4 ++-- jetty-jmx/src/main/java/module-info.java | 8 ++++++-- jetty-jndi/src/main/java/module-info.java | 5 ++++- jetty-plus/src/main/java/module-info.java | 7 ++++++- jetty-proxy/src/main/java/module-info.java | 4 ++-- jetty-quickstart/src/main/java/module-info.java | 6 +++--- jetty-rewrite/src/main/java/module-info.java | 2 +- jetty-security/src/main/java/module-info.java | 5 ++++- jetty-server/src/main/java/module-info.java | 7 +++++-- jetty-servlet/src/main/java/module-info.java | 5 +++++ jetty-servlets/src/main/java/module-info.java | 11 +++++++++-- jetty-util/src/main/java/module-info.java | 7 ++++++- jetty-webapp/src/main/java/module-info.java | 4 ++-- .../src/main/java/module-info.java | 4 ++-- .../src/main/java/module-info.java | 2 +- .../src/main/java/module-info.java | 6 +++--- .../src/main/java/module-info.java | 8 +++++--- .../src/main/java/module-info.java | 2 +- jetty-websocket/jetty-websocket-server/pom.xml | 2 +- .../src/main/java/module-info.java | 8 +++++--- .../websocket-core/src/main/java/module-info.java | 12 ++++++------ .../websocket-servlet/src/main/java/module-info.java | 4 ++-- 43 files changed, 139 insertions(+), 93 deletions(-) diff --git a/apache-jsp/src/main/java/module-info.java b/apache-jsp/src/main/java/module-info.java index 3f88952913d..99b8a2737e7 100644 --- a/apache-jsp/src/main/java/module-info.java +++ b/apache-jsp/src/main/java/module-info.java @@ -24,13 +24,13 @@ import org.eclipse.jetty.apache.jsp.JuliLog; module org.eclipse.jetty.apache.jsp { - exports org.eclipse.jetty.jsp; exports org.eclipse.jetty.apache.jsp; + exports org.eclipse.jetty.jsp; requires java.xml; + requires jetty.servlet.api; requires org.eclipse.jetty.util; requires org.mortbay.apache.jasper; - requires static jetty.servlet.api; provides Log with JuliLog; provides ServletContainerInitializer with JettyJasperInitializer; diff --git a/jetty-alpn/jetty-alpn-client/src/main/java/module-info.java b/jetty-alpn/jetty-alpn-client/src/main/java/module-info.java index a62ad83e870..7b4eb4ac026 100644 --- a/jetty-alpn/jetty-alpn-client/src/main/java/module-info.java +++ b/jetty-alpn/jetty-alpn-client/src/main/java/module-info.java @@ -22,8 +22,8 @@ module org.eclipse.jetty.alpn.client { exports org.eclipse.jetty.alpn.client; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; uses ALPNProcessor.Client; } diff --git a/jetty-alpn/jetty-alpn-conscrypt-client/src/main/java/module-info.java b/jetty-alpn/jetty-alpn-conscrypt-client/src/main/java/module-info.java index cf32621f7af..4c8dfee4196 100644 --- a/jetty-alpn/jetty-alpn-conscrypt-client/src/main/java/module-info.java +++ b/jetty-alpn/jetty-alpn-conscrypt-client/src/main/java/module-info.java @@ -21,10 +21,10 @@ import org.eclipse.jetty.io.ssl.ALPNProcessor; module org.eclipse.jetty.alpn.conscrypt.client { - requires org.eclipse.jetty.util; - requires org.eclipse.jetty.io; - requires org.eclipse.jetty.alpn.client; requires org.conscrypt; + requires org.eclipse.jetty.alpn.client; + requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; provides ALPNProcessor.Client with ConscryptClientALPNProcessor; } diff --git a/jetty-alpn/jetty-alpn-conscrypt-server/src/main/java/module-info.java b/jetty-alpn/jetty-alpn-conscrypt-server/src/main/java/module-info.java index 1b625270208..9a7e82c2dc2 100644 --- a/jetty-alpn/jetty-alpn-conscrypt-server/src/main/java/module-info.java +++ b/jetty-alpn/jetty-alpn-conscrypt-server/src/main/java/module-info.java @@ -21,10 +21,10 @@ import org.eclipse.jetty.io.ssl.ALPNProcessor; module org.eclipse.jetty.alpn.conscrypt.server { - requires org.eclipse.jetty.util; - requires org.eclipse.jetty.io; - requires org.eclipse.jetty.alpn.server; requires org.conscrypt; + requires org.eclipse.jetty.alpn.server; + requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; provides ALPNProcessor.Server with ConscryptServerALPNProcessor; } diff --git a/jetty-alpn/jetty-alpn-java-client/src/main/java/module-info.java b/jetty-alpn/jetty-alpn-java-client/src/main/java/module-info.java index 5cde4a450bf..008bd311206 100644 --- a/jetty-alpn/jetty-alpn-java-client/src/main/java/module-info.java +++ b/jetty-alpn/jetty-alpn-java-client/src/main/java/module-info.java @@ -21,9 +21,9 @@ import org.eclipse.jetty.io.ssl.ALPNProcessor; module org.eclipse.jetty.alpn.java.client { - requires org.eclipse.jetty.util; - requires org.eclipse.jetty.io; requires org.eclipse.jetty.alpn.client; + requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; provides ALPNProcessor.Client with JDK9ClientALPNProcessor; } diff --git a/jetty-alpn/jetty-alpn-java-server/src/main/java/module-info.java b/jetty-alpn/jetty-alpn-java-server/src/main/java/module-info.java index 95aa6007b9f..be977ae30c1 100644 --- a/jetty-alpn/jetty-alpn-java-server/src/main/java/module-info.java +++ b/jetty-alpn/jetty-alpn-java-server/src/main/java/module-info.java @@ -21,9 +21,9 @@ import org.eclipse.jetty.io.ssl.ALPNProcessor; module org.eclipse.jetty.alpn.java.server { - requires org.eclipse.jetty.util; - requires org.eclipse.jetty.io; requires org.eclipse.jetty.alpn.server; + requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; provides ALPNProcessor.Server with JDK9ServerALPNProcessor; } diff --git a/jetty-alpn/jetty-alpn-server/src/main/java/module-info.java b/jetty-alpn/jetty-alpn-server/src/main/java/module-info.java index 73f202bb12c..877d4cb91b1 100644 --- a/jetty-alpn/jetty-alpn-server/src/main/java/module-info.java +++ b/jetty-alpn/jetty-alpn-server/src/main/java/module-info.java @@ -22,9 +22,9 @@ module org.eclipse.jetty.alpn.server { exports org.eclipse.jetty.alpn.server; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.io; requires org.eclipse.jetty.server; + requires org.eclipse.jetty.util; uses ALPNProcessor.Server; } diff --git a/jetty-annotations/src/main/java/module-info.java b/jetty-annotations/src/main/java/module-info.java index 2c69444f2c0..a0e1ec910ef 100644 --- a/jetty-annotations/src/main/java/module-info.java +++ b/jetty-annotations/src/main/java/module-info.java @@ -25,17 +25,17 @@ module org.eclipse.jetty.annotations { exports org.eclipse.jetty.annotations; - requires java.naming; requires java.annotation; + requires java.naming; requires jetty.servlet.api; - requires org.objectweb.asm; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.http; requires org.eclipse.jetty.plus; + requires org.eclipse.jetty.security; requires org.eclipse.jetty.server; requires org.eclipse.jetty.servlet; - requires org.eclipse.jetty.security; + requires org.eclipse.jetty.util; requires org.eclipse.jetty.webapp; + requires org.objectweb.asm; uses ServletContainerInitializer; diff --git a/jetty-client/src/main/java/module-info.java b/jetty-client/src/main/java/module-info.java index 07762840127..92ca51083ca 100644 --- a/jetty-client/src/main/java/module-info.java +++ b/jetty-client/src/main/java/module-info.java @@ -20,13 +20,16 @@ module org.eclipse.jetty.client { exports org.eclipse.jetty.client; exports org.eclipse.jetty.client.api; - exports org.eclipse.jetty.client.util; - exports org.eclipse.jetty.client.jmx to org.eclipse.jetty.jmx; exports org.eclipse.jetty.client.http; + exports org.eclipse.jetty.client.jmx to org.eclipse.jetty.jmx; + exports org.eclipse.jetty.client.util; - requires org.eclipse.jetty.util; - requires org.eclipse.jetty.io; requires org.eclipse.jetty.http; + requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; + + // Only required if using SPNEGO. requires static java.security.jgss; + // Only required if using JMX. requires static org.eclipse.jetty.jmx; } diff --git a/jetty-deploy/src/main/java/module-info.java b/jetty-deploy/src/main/java/module-info.java index 5333ec500d8..629683276b7 100644 --- a/jetty-deploy/src/main/java/module-info.java +++ b/jetty-deploy/src/main/java/module-info.java @@ -28,5 +28,7 @@ module org.eclipse.jetty.deploy requires org.eclipse.jetty.util; requires org.eclipse.jetty.webapp; requires org.eclipse.jetty.xml; + + // Only required if using JMX. requires static org.eclipse.jetty.jmx; } diff --git a/jetty-fcgi/fcgi-client/src/main/java/module-info.java b/jetty-fcgi/fcgi-client/src/main/java/module-info.java index 0aec8827e2c..f5e97563dfa 100644 --- a/jetty-fcgi/fcgi-client/src/main/java/module-info.java +++ b/jetty-fcgi/fcgi-client/src/main/java/module-info.java @@ -23,8 +23,8 @@ module org.eclipse.jetty.fcgi.client exports org.eclipse.jetty.fcgi.generator to org.eclipse.jetty.fcgi.server; exports org.eclipse.jetty.fcgi.parser to org.eclipse.jetty.fcgi.server; - requires org.eclipse.jetty.util; + requires org.eclipse.jetty.client; requires org.eclipse.jetty.http; requires org.eclipse.jetty.io; - requires org.eclipse.jetty.client; + requires org.eclipse.jetty.util; } diff --git a/jetty-fcgi/fcgi-server/pom.xml b/jetty-fcgi/fcgi-server/pom.xml index 725e3308304..742fcf5a9fe 100644 --- a/jetty-fcgi/fcgi-server/pom.xml +++ b/jetty-fcgi/fcgi-server/pom.xml @@ -14,15 +14,11 @@ ${project.groupId}.server - - - - - org.eclipse.jetty.toolchain jetty-servlet-api + true org.eclipse.jetty.fcgi diff --git a/jetty-fcgi/fcgi-server/src/main/java/module-info.java b/jetty-fcgi/fcgi-server/src/main/java/module-info.java index ef4d27357c8..2e7e4ce4441 100644 --- a/jetty-fcgi/fcgi-server/src/main/java/module-info.java +++ b/jetty-fcgi/fcgi-server/src/main/java/module-info.java @@ -21,12 +21,14 @@ module org.eclipse.jetty.fcgi.server exports org.eclipse.jetty.fcgi.server; exports org.eclipse.jetty.fcgi.server.proxy; - requires jetty.servlet.api; - requires org.eclipse.jetty.util; + requires org.eclipse.jetty.client; + requires org.eclipse.jetty.fcgi.client; requires org.eclipse.jetty.http; requires org.eclipse.jetty.io; - requires org.eclipse.jetty.client; requires org.eclipse.jetty.proxy; requires org.eclipse.jetty.server; - requires org.eclipse.jetty.fcgi.client; + requires org.eclipse.jetty.util; + + // Only required if using the proxy features. + requires static jetty.servlet.api; } diff --git a/jetty-http/pom.xml b/jetty-http/pom.xml index 858b6da605f..7f364d1aff3 100644 --- a/jetty-http/pom.xml +++ b/jetty-http/pom.xml @@ -29,7 +29,7 @@ org.eclipse.jetty.toolchain jetty-servlet-api - provided + true diff --git a/jetty-http/src/main/java/module-info.java b/jetty-http/src/main/java/module-info.java index 681a4430692..c15d7c01f3f 100644 --- a/jetty-http/src/main/java/module-info.java +++ b/jetty-http/src/main/java/module-info.java @@ -24,8 +24,10 @@ module org.eclipse.jetty.http exports org.eclipse.jetty.http; exports org.eclipse.jetty.http.pathmap; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; + + // Only required if using the MultiPart classes. requires static jetty.servlet.api; uses HttpFieldPreEncoder; diff --git a/jetty-http2/http2-client/src/main/java/module-info.java b/jetty-http2/http2-client/src/main/java/module-info.java index 9f8c0c0a330..f892c10dad1 100644 --- a/jetty-http2/http2-client/src/main/java/module-info.java +++ b/jetty-http2/http2-client/src/main/java/module-info.java @@ -20,9 +20,9 @@ module org.eclipse.jetty.http2.client { exports org.eclipse.jetty.http2.client; - requires org.eclipse.jetty.util; - requires org.eclipse.jetty.http; - requires org.eclipse.jetty.io; requires org.eclipse.jetty.alpn.client; + requires org.eclipse.jetty.http; requires org.eclipse.jetty.http2.common; + requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; } diff --git a/jetty-http2/http2-common/src/main/java/module-info.java b/jetty-http2/http2-common/src/main/java/module-info.java index 3755ec41abc..956d06b679c 100644 --- a/jetty-http2/http2-common/src/main/java/module-info.java +++ b/jetty-http2/http2-common/src/main/java/module-info.java @@ -25,8 +25,8 @@ module org.eclipse.jetty.http2.common exports org.eclipse.jetty.http2.generator; exports org.eclipse.jetty.http2.parser; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.http; - requires org.eclipse.jetty.io; requires org.eclipse.jetty.http2.hpack; + requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; } diff --git a/jetty-http2/http2-hpack/src/main/java/module-info.java b/jetty-http2/http2-hpack/src/main/java/module-info.java index c8ca7f6afd8..93025628c09 100644 --- a/jetty-http2/http2-hpack/src/main/java/module-info.java +++ b/jetty-http2/http2-hpack/src/main/java/module-info.java @@ -23,8 +23,8 @@ module org.eclipse.jetty.http2.hpack { exports org.eclipse.jetty.http2.hpack; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.http; + requires org.eclipse.jetty.util; provides HttpFieldPreEncoder with HpackFieldPreEncoder; } diff --git a/jetty-http2/http2-http-client-transport/src/main/java/module-info.java b/jetty-http2/http2-http-client-transport/src/main/java/module-info.java index 30508d0b2f9..588427c1a8d 100644 --- a/jetty-http2/http2-http-client-transport/src/main/java/module-info.java +++ b/jetty-http2/http2-http-client-transport/src/main/java/module-info.java @@ -20,11 +20,11 @@ module org.eclipse.jetty.http2.http.client.transport { exports org.eclipse.jetty.http2.client.http; - requires org.eclipse.jetty.util; - requires org.eclipse.jetty.http; - requires org.eclipse.jetty.io; - requires org.eclipse.jetty.client; - requires org.eclipse.jetty.http2.common; - requires org.eclipse.jetty.http2.client; requires org.eclipse.jetty.alpn.client; + requires org.eclipse.jetty.client; + requires org.eclipse.jetty.http; + requires org.eclipse.jetty.http2.client; + requires org.eclipse.jetty.http2.common; + requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; } diff --git a/jetty-http2/http2-server/src/main/java/module-info.java b/jetty-http2/http2-server/src/main/java/module-info.java index e21652c4e29..329d1d4efda 100644 --- a/jetty-http2/http2-server/src/main/java/module-info.java +++ b/jetty-http2/http2-server/src/main/java/module-info.java @@ -20,9 +20,9 @@ module org.eclipse.jetty.http2.server { exports org.eclipse.jetty.http2.server; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.http; + requires org.eclipse.jetty.http2.common; requires org.eclipse.jetty.io; requires org.eclipse.jetty.server; - requires org.eclipse.jetty.http2.common; + requires org.eclipse.jetty.util; } diff --git a/jetty-jaas/src/main/java/module-info.java b/jetty-jaas/src/main/java/module-info.java index 0d4e913149a..c1297ab33a6 100644 --- a/jetty-jaas/src/main/java/module-info.java +++ b/jetty-jaas/src/main/java/module-info.java @@ -24,8 +24,10 @@ module org.eclipse.jetty.jaas requires java.naming; requires jetty.servlet.api; - requires org.eclipse.jetty.util; - requires org.eclipse.jetty.server; requires org.eclipse.jetty.security; + requires org.eclipse.jetty.server; + requires org.eclipse.jetty.util; + + // Only required if using JDBCLoginModule. requires static java.sql; } diff --git a/jetty-jaspi/src/main/java/module-info.java b/jetty-jaspi/src/main/java/module-info.java index fdcb9c91e6c..cc3333e34dd 100644 --- a/jetty-jaspi/src/main/java/module-info.java +++ b/jetty-jaspi/src/main/java/module-info.java @@ -22,10 +22,10 @@ module org.eclipse.jetty.security.jaspi exports org.eclipse.jetty.security.jaspi.callback; exports org.eclipse.jetty.security.jaspi.modules; - requires jetty.servlet.api; requires javax.security.auth.message; - requires org.eclipse.jetty.util; + requires jetty.servlet.api; requires org.eclipse.jetty.http; requires org.eclipse.jetty.security; requires org.eclipse.jetty.server; + requires org.eclipse.jetty.util; } diff --git a/jetty-jmx/src/main/java/module-info.java b/jetty-jmx/src/main/java/module-info.java index 85fd2060f05..908b16a5480 100644 --- a/jetty-jmx/src/main/java/module-info.java +++ b/jetty-jmx/src/main/java/module-info.java @@ -20,8 +20,12 @@ module org.eclipse.jetty.jmx { exports org.eclipse.jetty.jmx; - requires transitive java.management; + requires org.eclipse.jetty.util; + + // Only required if using ConnectorServer. requires static java.management.rmi; requires static java.rmi; - requires org.eclipse.jetty.util; + + // Applications that use ObjectMBean must use JMX classes too. + requires transitive java.management; } diff --git a/jetty-jndi/src/main/java/module-info.java b/jetty-jndi/src/main/java/module-info.java index 14819cd4497..48d29037c63 100644 --- a/jetty-jndi/src/main/java/module-info.java +++ b/jetty-jndi/src/main/java/module-info.java @@ -24,9 +24,12 @@ module org.eclipse.jetty.jndi exports org.eclipse.jetty.jndi.local; requires java.naming; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.server; + requires org.eclipse.jetty.util; + + // Only required if using DataSourceCloser. requires static java.sql; + // Only required if using MailSessionReference. requires static javax.mail.glassfish; requires static org.eclipse.jetty.security; } diff --git a/jetty-plus/src/main/java/module-info.java b/jetty-plus/src/main/java/module-info.java index f1dd9129d51..dee155dd09d 100644 --- a/jetty-plus/src/main/java/module-info.java +++ b/jetty-plus/src/main/java/module-info.java @@ -29,14 +29,19 @@ module org.eclipse.jetty.plus requires java.naming; requires java.transaction; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.jndi; requires org.eclipse.jetty.security; + requires org.eclipse.jetty.util; requires org.eclipse.jetty.webapp; requires org.eclipse.jetty.xml; + + // Only required if using DataSourceLoginService. requires static java.sql; + // Only required if using ContainerInitializer. requires static jetty.servlet.api; + // Only required if using DataSourceLoginService. requires static org.eclipse.jetty.server; + // Only required if using RunAs. requires static org.eclipse.jetty.servlet; provides Configuration with EnvConfiguration, PlusConfiguration; diff --git a/jetty-proxy/src/main/java/module-info.java b/jetty-proxy/src/main/java/module-info.java index fc9378771c5..4b4549c5cc6 100644 --- a/jetty-proxy/src/main/java/module-info.java +++ b/jetty-proxy/src/main/java/module-info.java @@ -21,9 +21,9 @@ module org.eclipse.jetty.proxy exports org.eclipse.jetty.proxy; requires jetty.servlet.api; - requires org.eclipse.jetty.util; + requires org.eclipse.jetty.client; requires org.eclipse.jetty.http; requires org.eclipse.jetty.io; - requires org.eclipse.jetty.client; requires org.eclipse.jetty.server; + requires org.eclipse.jetty.util; } diff --git a/jetty-quickstart/src/main/java/module-info.java b/jetty-quickstart/src/main/java/module-info.java index 1287d815af4..846d8451fc7 100644 --- a/jetty-quickstart/src/main/java/module-info.java +++ b/jetty-quickstart/src/main/java/module-info.java @@ -22,12 +22,12 @@ module org.eclipse.jetty.quickstart requires jetty.servlet.api; requires org.eclipse.jetty.annotations; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.http; - requires org.eclipse.jetty.xml; requires org.eclipse.jetty.plus; + requires org.eclipse.jetty.security; requires org.eclipse.jetty.server; requires org.eclipse.jetty.servlet; - requires org.eclipse.jetty.security; + requires org.eclipse.jetty.util; requires org.eclipse.jetty.webapp; + requires org.eclipse.jetty.xml; } diff --git a/jetty-rewrite/src/main/java/module-info.java b/jetty-rewrite/src/main/java/module-info.java index 6f9cfdc8574..c942ff0c359 100644 --- a/jetty-rewrite/src/main/java/module-info.java +++ b/jetty-rewrite/src/main/java/module-info.java @@ -22,8 +22,8 @@ module org.eclipse.jetty.rewrite exports org.eclipse.jetty.rewrite.handler; requires jetty.servlet.api; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.http; requires org.eclipse.jetty.io; requires org.eclipse.jetty.server; + requires org.eclipse.jetty.util; } diff --git a/jetty-security/src/main/java/module-info.java b/jetty-security/src/main/java/module-info.java index 0d9c03f3204..d5a8d543724 100644 --- a/jetty-security/src/main/java/module-info.java +++ b/jetty-security/src/main/java/module-info.java @@ -22,9 +22,12 @@ module org.eclipse.jetty.security exports org.eclipse.jetty.security.authentication; requires jetty.servlet.api; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.http; requires org.eclipse.jetty.server; + requires org.eclipse.jetty.util; + + // Only required if using JDBCLoginService. requires static java.sql; + // Only required if using SPNEGO. requires static java.security.jgss; } diff --git a/jetty-server/src/main/java/module-info.java b/jetty-server/src/main/java/module-info.java index 8c12e0acb02..f2839eae376 100644 --- a/jetty-server/src/main/java/module-info.java +++ b/jetty-server/src/main/java/module-info.java @@ -19,17 +19,20 @@ module org.eclipse.jetty.server { exports org.eclipse.jetty.server; - exports org.eclipse.jetty.server.jmx to org.eclipse.jetty.jmx; exports org.eclipse.jetty.server.handler; exports org.eclipse.jetty.server.handler.gzip; exports org.eclipse.jetty.server.handler.jmx to org.eclipse.jetty.jmx; + exports org.eclipse.jetty.server.jmx to org.eclipse.jetty.jmx; exports org.eclipse.jetty.server.session; requires jetty.servlet.api; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.http; requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; + + // Only required if using DatabaseAdaptor/JDBCSessionDataStore. requires static java.sql; requires static java.naming; + // Only required if using JMX. requires static org.eclipse.jetty.jmx; } diff --git a/jetty-servlet/src/main/java/module-info.java b/jetty-servlet/src/main/java/module-info.java index 794bd24e6f5..a4ed367a888 100644 --- a/jetty-servlet/src/main/java/module-info.java +++ b/jetty-servlet/src/main/java/module-info.java @@ -27,8 +27,13 @@ module org.eclipse.jetty.servlet requires org.eclipse.jetty.http; requires org.eclipse.jetty.server; requires org.eclipse.jetty.security; + + // Only required if using StatisticsServlet. requires static java.management; + // Only required if using IntrospectorCleaner. requires static java.desktop; + // Only required if using StatisticsServlet. requires static org.eclipse.jetty.io; + // Only required if using JMX. requires static org.eclipse.jetty.jmx; } diff --git a/jetty-servlets/src/main/java/module-info.java b/jetty-servlets/src/main/java/module-info.java index bd27c335615..a9e90f1bc52 100644 --- a/jetty-servlets/src/main/java/module-info.java +++ b/jetty-servlets/src/main/java/module-info.java @@ -16,13 +16,20 @@ // ======================================================================== // +// This module is a mixed bag of things. +// There are some utility classes that only depend on Servlet APIs, +// but other utility classes that depend on some Jetty module. module org.eclipse.jetty.servlets { exports org.eclipse.jetty.servlets; - requires static jetty.servlet.api; - requires static org.eclipse.jetty.util; + requires jetty.servlet.api; + + // Only required if using CloseableDoSFilter. requires static org.eclipse.jetty.io; + // Only required if using DoSFilter, PushCacheFilter, etc. requires static org.eclipse.jetty.http; requires static org.eclipse.jetty.server; + // Only required if using CrossOriginFilter, DoSFilter, etc. + requires static org.eclipse.jetty.util; } diff --git a/jetty-util/src/main/java/module-info.java b/jetty-util/src/main/java/module-info.java index f85ab8ff940..68237b80bd2 100644 --- a/jetty-util/src/main/java/module-info.java +++ b/jetty-util/src/main/java/module-info.java @@ -32,12 +32,17 @@ module org.eclipse.jetty.util exports org.eclipse.jetty.util.thread; exports org.eclipse.jetty.util.thread.strategy; + // Only required if using AppContextLeakPreventer/AWTLeakPreventer. requires static java.desktop; + // Only required if using X509. requires static java.naming; + // Only required if using JavaUtilLog. requires static java.logging; + // Only required if using DriverManagerLeakPreventer. requires static java.sql; + // Only required if using DOMLeakPreventer. requires static java.xml; - requires static jetty.servlet.api; + // Only required when using Jetty logging. requires static org.slf4j; uses CredentialProvider; diff --git a/jetty-webapp/src/main/java/module-info.java b/jetty-webapp/src/main/java/module-info.java index e6de44cc918..4393cba0768 100644 --- a/jetty-webapp/src/main/java/module-info.java +++ b/jetty-webapp/src/main/java/module-info.java @@ -25,19 +25,19 @@ module org.eclipse.jetty.webapp requires java.instrument; requires java.xml; requires jetty.servlet.api; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.http; requires org.eclipse.jetty.security; requires org.eclipse.jetty.server; requires org.eclipse.jetty.servlet; + requires org.eclipse.jetty.util; requires org.eclipse.jetty.xml; uses Configuration; provides Configuration with org.eclipse.jetty.webapp.FragmentConfiguration, - org.eclipse.jetty.webapp.JettyWebXmlConfiguration, org.eclipse.jetty.webapp.JaasConfiguration, + org.eclipse.jetty.webapp.JettyWebXmlConfiguration, org.eclipse.jetty.webapp.JmxConfiguration, org.eclipse.jetty.webapp.JndiConfiguration, org.eclipse.jetty.webapp.JspConfiguration, diff --git a/jetty-websocket/javax-websocket-client/src/main/java/module-info.java b/jetty-websocket/javax-websocket-client/src/main/java/module-info.java index 44b4f267268..b70e44d315a 100644 --- a/jetty-websocket/javax-websocket-client/src/main/java/module-info.java +++ b/jetty-websocket/javax-websocket-client/src/main/java/module-info.java @@ -25,10 +25,10 @@ module org.eclipse.jetty.websocket.javax.client exports org.eclipse.jetty.websocket.javax.client; requires javax.websocket.api; - requires org.eclipse.jetty.util; + requires org.eclipse.jetty.client; requires org.eclipse.jetty.http; requires org.eclipse.jetty.io; - requires org.eclipse.jetty.client; + requires org.eclipse.jetty.util; requires org.eclipse.jetty.websocket.core; requires org.eclipse.jetty.websocket.javax.common; diff --git a/jetty-websocket/javax-websocket-common/src/main/java/module-info.java b/jetty-websocket/javax-websocket-common/src/main/java/module-info.java index 8a4aa3ea3ba..f0a3bbce74d 100644 --- a/jetty-websocket/javax-websocket-common/src/main/java/module-info.java +++ b/jetty-websocket/javax-websocket-common/src/main/java/module-info.java @@ -25,8 +25,8 @@ module org.eclipse.jetty.websocket.javax.common exports org.eclipse.jetty.websocket.javax.common.util; requires javax.websocket.api; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.http; requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; requires org.eclipse.jetty.websocket.core; } diff --git a/jetty-websocket/javax-websocket-server/src/main/java/module-info.java b/jetty-websocket/javax-websocket-server/src/main/java/module-info.java index 29f676ada88..90a58e9818d 100644 --- a/jetty-websocket/javax-websocket-server/src/main/java/module-info.java +++ b/jetty-websocket/javax-websocket-server/src/main/java/module-info.java @@ -30,16 +30,16 @@ module org.eclipse.jetty.websocket.javax.server requires jetty.servlet.api; requires javax.websocket.api; - requires org.eclipse.jetty.util; + requires org.eclipse.jetty.client; requires org.eclipse.jetty.http; requires org.eclipse.jetty.io; - requires org.eclipse.jetty.client; requires org.eclipse.jetty.server; requires org.eclipse.jetty.servlet; + requires org.eclipse.jetty.util; requires org.eclipse.jetty.webapp; requires org.eclipse.jetty.websocket.core; - requires org.eclipse.jetty.websocket.javax.common; requires org.eclipse.jetty.websocket.javax.client; + requires org.eclipse.jetty.websocket.javax.common; requires org.eclipse.jetty.websocket.servlet; provides ServletContainerInitializer with JavaxWebSocketServletContainerInitializer; diff --git a/jetty-websocket/jetty-websocket-client/src/main/java/module-info.java b/jetty-websocket/jetty-websocket-client/src/main/java/module-info.java index 2e997711aec..558c1770146 100644 --- a/jetty-websocket/jetty-websocket-client/src/main/java/module-info.java +++ b/jetty-websocket/jetty-websocket-client/src/main/java/module-info.java @@ -20,12 +20,14 @@ module org.eclipse.jetty.websocket.jetty.client { exports org.eclipse.jetty.websocket.client; - requires org.eclipse.jetty.util; + requires org.eclipse.jetty.client; requires org.eclipse.jetty.http; requires org.eclipse.jetty.io; - requires org.eclipse.jetty.client; - requires static org.eclipse.jetty.xml; + requires org.eclipse.jetty.util; requires org.eclipse.jetty.websocket.jetty.api; requires org.eclipse.jetty.websocket.core; requires org.eclipse.jetty.websocket.jetty.common; + + // Only required if using XmlBasedHttpClientProvider. + requires static org.eclipse.jetty.xml; } diff --git a/jetty-websocket/jetty-websocket-common/src/main/java/module-info.java b/jetty-websocket/jetty-websocket-common/src/main/java/module-info.java index effc7e04481..d292fa13e0e 100644 --- a/jetty-websocket/jetty-websocket-common/src/main/java/module-info.java +++ b/jetty-websocket/jetty-websocket-common/src/main/java/module-info.java @@ -23,8 +23,8 @@ module org.eclipse.jetty.websocket.jetty.common exports org.eclipse.jetty.websocket.common.message; exports org.eclipse.jetty.websocket.common.util; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.io; + requires org.eclipse.jetty.util; requires org.eclipse.jetty.websocket.core; requires org.eclipse.jetty.websocket.jetty.api; } diff --git a/jetty-websocket/jetty-websocket-server/pom.xml b/jetty-websocket/jetty-websocket-server/pom.xml index 3595ad7e5bb..a5ae37ac30e 100644 --- a/jetty-websocket/jetty-websocket-server/pom.xml +++ b/jetty-websocket/jetty-websocket-server/pom.xml @@ -36,7 +36,7 @@ org.eclipse.jetty jetty-jmx ${project.version} - provided + true org.eclipse.jetty.websocket diff --git a/jetty-websocket/jetty-websocket-server/src/main/java/module-info.java b/jetty-websocket/jetty-websocket-server/src/main/java/module-info.java index f65d4bb4e8e..ae59819d87f 100644 --- a/jetty-websocket/jetty-websocket-server/src/main/java/module-info.java +++ b/jetty-websocket/jetty-websocket-server/src/main/java/module-info.java @@ -27,17 +27,19 @@ module org.eclipse.jetty.websocket.jetty.server exports org.eclipse.jetty.websocket.server; requires jetty.servlet.api; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.http; requires org.eclipse.jetty.server; - requires static org.eclipse.jetty.jmx; requires org.eclipse.jetty.servlet; + requires org.eclipse.jetty.util; requires org.eclipse.jetty.webapp; - requires org.eclipse.jetty.websocket.jetty.api; requires org.eclipse.jetty.websocket.core; + requires org.eclipse.jetty.websocket.jetty.api; requires org.eclipse.jetty.websocket.jetty.common; requires org.eclipse.jetty.websocket.servlet; + // Only required if using JMX. + requires static org.eclipse.jetty.jmx; + provides ServletContainerInitializer with JettyWebSocketServletContainerInitializer; provides Configuration with JettyWebSocketConfiguration; } diff --git a/jetty-websocket/websocket-core/src/main/java/module-info.java b/jetty-websocket/websocket-core/src/main/java/module-info.java index 5649e21fdf6..ffcaed7e690 100644 --- a/jetty-websocket/websocket-core/src/main/java/module-info.java +++ b/jetty-websocket/websocket-core/src/main/java/module-info.java @@ -33,19 +33,19 @@ module org.eclipse.jetty.websocket.core exports org.eclipse.jetty.websocket.core.internal.compress to org.eclipse.jetty.util; requires jetty.servlet.api; - requires org.eclipse.jetty.util; + requires org.eclipse.jetty.client; requires org.eclipse.jetty.io; requires org.eclipse.jetty.http; - requires org.eclipse.jetty.client; requires org.eclipse.jetty.server; + requires org.eclipse.jetty.util; uses Extension; provides Extension with - IdentityExtension, - FragmentExtension, - ValidationExtension, - PerMessageDeflateExtension, DeflateFrameExtension, + FragmentExtension, + IdentityExtension, + PerMessageDeflateExtension, + ValidationExtension, XWebkitDeflateFrameExtension; } diff --git a/jetty-websocket/websocket-servlet/src/main/java/module-info.java b/jetty-websocket/websocket-servlet/src/main/java/module-info.java index 709b84d6aa4..cfa6b652061 100644 --- a/jetty-websocket/websocket-servlet/src/main/java/module-info.java +++ b/jetty-websocket/websocket-servlet/src/main/java/module-info.java @@ -21,10 +21,10 @@ module org.eclipse.jetty.websocket.servlet exports org.eclipse.jetty.websocket.servlet; requires jetty.servlet.api; - requires org.eclipse.jetty.util; requires org.eclipse.jetty.http; - requires org.eclipse.jetty.server; requires org.eclipse.jetty.io; + requires org.eclipse.jetty.server; requires org.eclipse.jetty.servlet; + requires org.eclipse.jetty.util; requires org.eclipse.jetty.websocket.core; }