Skip to content

Commit

Permalink
JPMS build with tests
Browse files Browse the repository at this point in the history
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
  • Loading branch information
senivam committed Jan 24, 2024
1 parent 303b40d commit edf513e
Show file tree
Hide file tree
Showing 75 changed files with 814 additions and 75 deletions.
40 changes: 40 additions & 0 deletions connectors/apache-connector/src/test/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

module org.glassfish.jersey.apache.connector {
requires java.logging;

requires jakarta.inject;
requires jakarta.ws.rs;

requires org.apache.httpcomponents.httpcore;
requires org.apache.httpcomponents.httpclient;

requires org.glassfish.hk2.locator;

requires org.glassfish.jersey.core.common;
requires org.glassfish.jersey.core.client;
requires org.glassfish.jersey.core.server;

requires org.glassfish.jersey.tests.framework.core;
requires org.glassfish.jersey.tests.framework.provider.grizzly;

requires org.junit.jupiter.api;
requires org.junit.jupiter.engine;

exports org.glassfish.jersey.apache.connector;
opens org.glassfish.jersey.apache.connector;
}
10 changes: 8 additions & 2 deletions connectors/grizzly-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,17 @@
<artifactId>connection-pool</artifactId>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>jersey-test-framework-core</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-bundle</artifactId>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
41 changes: 41 additions & 0 deletions connectors/grizzly-connector/src/test/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

module org.glassfish.jersey.grizzly.connector {
requires java.logging;
requires org.slf4j;

requires jakarta.ws.rs;

requires grizzly.framework;
requires grizzly.http.client;

// requires grizzly.http.server;
requires grizzly.http;

requires org.glassfish.jersey.core.common;
requires org.glassfish.jersey.core.client;
requires org.glassfish.jersey.core.server;

requires org.glassfish.jersey.tests.framework.core;
requires org.glassfish.jersey.tests.framework.provider.grizzly;

requires org.junit.jupiter.api;
requires org.junit.jupiter.engine;

exports org.glassfish.jersey.grizzly.connector;
opens org.glassfish.jersey.grizzly.connector;
}
37 changes: 37 additions & 0 deletions connectors/jdk-connector/src/test/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

module org.glassfish.jersey.jdk.connector {
requires java.logging;

requires jakarta.ws.rs;
requires static jakarta.activation;

requires osgi.resource.locator;

requires org.junit.jupiter.api;
requires org.junit.jupiter.engine;

requires org.glassfish.jersey.tests.framework.core;
requires org.glassfish.jersey.tests.framework.provider.grizzly;

requires org.glassfish.jersey.core.common;
requires org.glassfish.jersey.core.client;
requires org.glassfish.jersey.core.server;

exports org.glassfish.jersey.jdk.connector;
exports org.glassfish.jersey.jdk.connector.internal;
}
21 changes: 21 additions & 0 deletions connectors/jetty-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
<java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory>
<java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory>
<java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory>
<surefire.coverage.argline>
--add-modules=ALL-MODULE-PATH
</surefire.coverage.argline>
</properties>

<dependencies>
Expand Down Expand Up @@ -68,12 +71,24 @@
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-jetty</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -86,6 +101,12 @@
<artifactId>jaxb-osgi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-jakarta-servlet-api</artifactId>
<version>${jetty.servlet.api.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down
43 changes: 43 additions & 0 deletions connectors/jetty-connector/src/test/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

module org.glassfish.jersey.jetty.connector {
requires java.logging;

requires jakarta.inject;
requires jakarta.ws.rs;

requires org.eclipse.jetty.client;
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.http;
requires org.eclipse.jetty.io;
requires org.eclipse.jetty.util;

requires org.junit.jupiter.api;
requires org.junit.jupiter.engine;
requires org.hamcrest;

requires jakarta.xml.bind;

requires org.glassfish.jersey.tests.framework.core;

requires org.glassfish.jersey.core.common;
requires org.glassfish.jersey.core.client;
requires org.glassfish.jersey.core.server;

exports org.glassfish.jersey.jetty.connector;
opens org.glassfish.jersey.jetty.connector;
}
1 change: 1 addition & 0 deletions containers/grizzly2-http/src/test/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
requires org.eclipse.jetty.client;
requires org.hamcrest;
requires org.junit.jupiter.api;
requires org.junit.jupiter.engine;

requires grizzly.http.server;
requires grizzly.http2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
requires jakarta.ws.rs;
requires jakarta.inject;
requires static jakarta.persistence;
requires jakarta.servlet;
requires static jakarta.servlet;

requires osgi.resource.locator;

Expand Down
6 changes: 6 additions & 0 deletions containers/jetty-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-jakarta-servlet-api</artifactId>
<version>${jetty.servlet.api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -19,8 +19,6 @@

requires jakarta.ws.rs;
requires jakarta.inject;
requires jakarta.servlet;
requires static jakarta.xml.bind;

requires org.eclipse.jetty.http;
requires org.eclipse.jetty.server;
Expand Down
6 changes: 4 additions & 2 deletions core-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<reuseForks>true</reuseForks>
<systemPropertiesFile>${project.basedir}/etc/systemPropertiesFile</systemPropertiesFile>
<argLine>
--add-modules jakarta.xml.bind
${surefire.coverage.argline}
${surefire.security.argline}
</argLine>
</configuration>
Expand Down Expand Up @@ -245,7 +245,8 @@
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<scope>provided</scope>
<optional>true</optional>
</dependency>

<dependency>
Expand Down Expand Up @@ -305,6 +306,7 @@

<properties>
<surefire.security.argline>-Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/server.policy</surefire.security.argline>
<surefire.coverage.argline>--add-modules=ALL-MODULE-PATH</surefire.coverage.argline>
</properties>

</project>
12 changes: 10 additions & 2 deletions core-server/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -27,6 +27,9 @@

requires jdk.httpserver;

requires static org.glassfish.jersey.inject.hk2;
requires static org.glassfish.hk2.api;

// jersey common modules
requires org.glassfish.jersey.core.common;
requires org.glassfish.jersey.core.client;
Expand All @@ -50,9 +53,14 @@
exports org.glassfish.jersey.server.internal;
exports org.glassfish.jersey.server.internal.inject;
exports org.glassfish.jersey.server.internal.monitoring;
exports org.glassfish.jersey.server.internal.monitoring.jmx;
exports org.glassfish.jersey.server.internal.process;
exports org.glassfish.jersey.server.internal.routing;
exports org.glassfish.jersey.server.internal.scanning;
// exports org.glassfish.jersey.server.internal.sonar;
exports org.glassfish.jersey.server.internal.sonar;

exports com.sun.research.ws.wadl; // to org.glassfish.jersey.core.server.test;
exports org.glassfish.jersey.server.internal.monitoring.core;

uses org.glassfish.jersey.server.spi.ComponentProvider;
uses org.glassfish.jersey.server.spi.ExternalRequestScope;
Expand Down

0 comments on commit edf513e

Please sign in to comment.