Skip to content

Commit

Permalink
Issue jetty#4225 - Fix JPMS transitivity.
Browse files Browse the repository at this point in the history
Reworked all module-info.java files to take into
account JPMS transitivity.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Dec 19, 2019
1 parent 9bbf8c5 commit e3bb5a7
Show file tree
Hide file tree
Showing 54 changed files with 107 additions and 245 deletions.
3 changes: 1 addition & 2 deletions jetty-alpn/jetty-alpn-client/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
{
exports org.eclipse.jetty.alpn.client;

requires org.eclipse.jetty.io;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.io;

uses ALPNProcessor.Client;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
module org.eclipse.jetty.alpn.conscrypt.client
{
requires org.conscrypt;
requires org.eclipse.jetty.alpn.client;
requires org.eclipse.jetty.io;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.alpn.client;

provides ALPNProcessor.Client with ConscryptClientALPNProcessor;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
module org.eclipse.jetty.alpn.conscrypt.server
{
requires org.conscrypt;
requires org.eclipse.jetty.alpn.server;
requires org.eclipse.jetty.io;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.alpn.server;

provides ALPNProcessor.Server with ConscryptServerALPNProcessor;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@

module org.eclipse.jetty.alpn.java.client
{
requires org.eclipse.jetty.alpn.client;
requires org.eclipse.jetty.io;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.alpn.client;

provides ALPNProcessor.Client with JDK9ClientALPNProcessor;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@

module org.eclipse.jetty.alpn.java.server
{
requires org.eclipse.jetty.alpn.server;
requires org.eclipse.jetty.io;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.alpn.server;

provides ALPNProcessor.Server with JDK9ServerALPNProcessor;
}
4 changes: 1 addition & 3 deletions jetty-alpn/jetty-alpn-server/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
{
exports org.eclipse.jetty.alpn.server;

requires org.eclipse.jetty.io;
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.server;

uses ALPNProcessor.Server;
}
11 changes: 2 additions & 9 deletions jetty-annotations/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,8 @@

requires java.annotation;
requires java.naming;
requires jetty.servlet.api;
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.util;
requires org.eclipse.jetty.webapp;
requires org.objectweb.asm;
requires transitive org.eclipse.jetty.plus;
requires transitive org.objectweb.asm;

uses ServletContainerInitializer;

Expand Down
4 changes: 1 addition & 3 deletions jetty-client/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
exports org.eclipse.jetty.client.util;

requires org.eclipse.jetty.alpn.client;
requires org.eclipse.jetty.http;
requires org.eclipse.jetty.io;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.http;

// Only required if using SPNEGO.
requires static java.security.jgss;
Expand Down
5 changes: 2 additions & 3 deletions jetty-deploy/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@
{
exports org.eclipse.jetty.deploy;
exports org.eclipse.jetty.deploy.bindings;
exports org.eclipse.jetty.deploy.graph;
exports org.eclipse.jetty.deploy.jmx to org.eclipse.jetty.jmx;
exports org.eclipse.jetty.deploy.providers;

requires java.xml;
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.util;
requires org.eclipse.jetty.webapp;
requires transitive org.eclipse.jetty.webapp;
requires org.eclipse.jetty.xml;

// Only required if using JMX.
Expand Down
9 changes: 3 additions & 6 deletions jetty-fcgi/fcgi-client/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
{
exports org.eclipse.jetty.fcgi;
exports org.eclipse.jetty.fcgi.client.http;
exports org.eclipse.jetty.fcgi.generator to org.eclipse.jetty.fcgi.server;
exports org.eclipse.jetty.fcgi.parser to org.eclipse.jetty.fcgi.server;
exports org.eclipse.jetty.fcgi.generator;
exports org.eclipse.jetty.fcgi.parser;

requires org.eclipse.jetty.client;
requires org.eclipse.jetty.http;
requires org.eclipse.jetty.io;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.client;
}
9 changes: 2 additions & 7 deletions jetty-fcgi/fcgi-server/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,8 @@
exports org.eclipse.jetty.fcgi.server;
exports org.eclipse.jetty.fcgi.server.proxy;

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.proxy;
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.fcgi.client;
requires transitive org.eclipse.jetty.proxy;

// Only required if using the proxy features.
requires static jetty.servlet.api;
Expand Down
3 changes: 1 addition & 2 deletions jetty-http/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
exports org.eclipse.jetty.http;
exports org.eclipse.jetty.http.pathmap;

requires org.eclipse.jetty.io;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.io;

// Only required if using the MultiPart classes.
requires static jetty.servlet.api;
Expand Down
5 changes: 1 addition & 4 deletions jetty-http2/http2-client/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,5 @@
exports org.eclipse.jetty.http2.client;

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;
requires transitive org.eclipse.jetty.http2.common;
}
5 changes: 1 addition & 4 deletions jetty-http2/http2-common/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,5 @@
exports org.eclipse.jetty.http2.generator;
exports org.eclipse.jetty.http2.parser;

requires org.eclipse.jetty.http;
requires org.eclipse.jetty.http2.hpack;
requires org.eclipse.jetty.io;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.http2.hpack;
}
3 changes: 1 addition & 2 deletions jetty-http2/http2-hpack/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
{
exports org.eclipse.jetty.http2.hpack;

requires org.eclipse.jetty.http;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.http;

provides HttpFieldPreEncoder with HpackFieldPreEncoder;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
exports org.eclipse.jetty.http2.client.http;

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;
requires transitive org.eclipse.jetty.client;
requires transitive org.eclipse.jetty.http2.client;
}
7 changes: 2 additions & 5 deletions jetty-http2/http2-server/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
{
exports org.eclipse.jetty.http2.server;

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.util;
requires transitive org.eclipse.jetty.http2.common;
requires transitive org.eclipse.jetty.server;
}
2 changes: 1 addition & 1 deletion jetty-io/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
exports org.eclipse.jetty.io;
exports org.eclipse.jetty.io.ssl;

requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.util;
}
6 changes: 1 addition & 5 deletions jetty-jaas/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@
exports org.eclipse.jetty.jaas.callback;
exports org.eclipse.jetty.jaas.spi;

requires java.naming;
requires jetty.servlet.api;
requires org.eclipse.jetty.security;
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.security;

// Only required if using JDBCLoginModule.
requires static java.sql;
Expand Down
5 changes: 1 addition & 4 deletions jetty-jaspi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@

requires javax.security.auth.message;
requires jetty.servlet.api;
requires org.eclipse.jetty.http;
requires org.eclipse.jetty.security;
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.security;

provides Authenticator.Factory with JaspiAuthenticatorFactory;
}
7 changes: 3 additions & 4 deletions jetty-jmx/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
{
exports org.eclipse.jetty.jmx;

requires org.eclipse.jetty.util;
// Applications that use ObjectMBean must use JMX classes too.
requires transitive java.management;
requires transitive org.eclipse.jetty.util;

// Only required if using ConnectorServer.
requires static java.management.rmi;
requires static java.rmi;

// Applications that use ObjectMBean must use JMX classes too.
requires transitive java.management;
}
8 changes: 8 additions & 0 deletions jetty-jndi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@

<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
@{argLine} ${jetty.surefire.argLine} --add-modules javax.mail.glassfish
</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
Expand Down
5 changes: 2 additions & 3 deletions jetty-jndi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
exports org.eclipse.jetty.jndi.java;
exports org.eclipse.jetty.jndi.local;

requires java.naming;
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.util;
requires transitive java.naming;
requires transitive org.eclipse.jetty.server;

// Only required if using DataSourceCloser.
requires static java.sql;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ assert buildLog.text.contains( 'Started Server' )

assert buildLog.text.contains( '(1a) >> javax.servlet.ServletContextListener loaded from jar:' )

assert buildLog.text.contains( '/org/eclipse/jetty/toolchain/jetty-servlet-api/4.0.2/jetty-servlet-api-4.0.2.jar!/javax/servlet/ServletContextListener.class << (1b)' )
assert buildLog.text.contains( '/org/eclipse/jetty/toolchain/jetty-servlet-api/4.0.3/jetty-servlet-api-4.0.3.jar!/javax/servlet/ServletContextListener.class << (1b)' )

assert buildLog.text.contains( '(2a) >> mca.common.CommonService loaded from file:' )
assert buildLog.text.contains( 'common/target/classes/mca/common/CommonService.class << (2b)' )
Expand Down
11 changes: 3 additions & 8 deletions jetty-plus/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,13 @@
exports org.eclipse.jetty.plus.security;
exports org.eclipse.jetty.plus.webapp;

requires java.naming;
requires java.transaction;
requires jetty.servlet.api;
requires org.eclipse.jetty.jndi;
requires org.eclipse.jetty.security;
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.util;
requires org.eclipse.jetty.webapp;
requires org.eclipse.jetty.xml;
requires transitive org.eclipse.jetty.webapp;

// Only required if using DataSourceLoginService.
requires static java.sql;
// Only required if using Transaction.
requires static java.transaction;
// Only required if using RunAs.
requires static org.eclipse.jetty.servlet;

Expand Down
9 changes: 2 additions & 7 deletions jetty-proxy/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
{
exports org.eclipse.jetty.proxy;

requires jetty.servlet.api;
requires org.eclipse.jetty.alpn.client;
requires org.eclipse.jetty.client;
requires org.eclipse.jetty.http;
requires org.eclipse.jetty.io;
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.client;
requires transitive org.eclipse.jetty.server;
}
10 changes: 1 addition & 9 deletions jetty-quickstart/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,5 @@
exports org.eclipse.jetty.quickstart;

requires jetty.servlet.api;
requires org.eclipse.jetty.annotations;
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.util;
requires org.eclipse.jetty.webapp;
requires org.eclipse.jetty.xml;
requires transitive org.eclipse.jetty.annotations;
}
5 changes: 1 addition & 4 deletions jetty-rewrite/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,5 @@
exports org.eclipse.jetty.rewrite.handler;

requires jetty.servlet.api;
requires org.eclipse.jetty.http;
requires org.eclipse.jetty.io;
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.server;
}
5 changes: 1 addition & 4 deletions jetty-security/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
exports org.eclipse.jetty.security;
exports org.eclipse.jetty.security.authentication;

requires jetty.servlet.api;
requires org.eclipse.jetty.http;
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.server;

// Only required if using JDBCLoginService.
requires static java.sql;
Expand Down
6 changes: 2 additions & 4 deletions jetty-server/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
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.http;
requires org.eclipse.jetty.io;
requires org.eclipse.jetty.util;
requires transitive jetty.servlet.api;
requires transitive org.eclipse.jetty.http;

// Only required if using DatabaseAdaptor/JDBCSessionDataStore.
requires static java.sql;
Expand Down
Loading

0 comments on commit e3bb5a7

Please sign in to comment.