JPMS: cdi integration tests Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
diff --git a/containers/jersey-servlet-core/src/main/java/module-info.java b/containers/jersey-servlet-core/src/main/java/module-info.java index 3676462..04adfac 100644 --- a/containers/jersey-servlet-core/src/main/java/module-info.java +++ b/containers/jersey-servlet-core/src/main/java/module-info.java
@@ -20,7 +20,7 @@ requires jakarta.ws.rs; requires jakarta.inject; - requires jakarta.persistence; + requires static jakarta.persistence; requires jakarta.servlet; requires osgi.resource.locator;
diff --git a/ext/cdi/jersey-cdi-rs-inject/src/main/java/module-info.java b/ext/cdi/jersey-cdi-rs-inject/src/main/java/module-info.java index ddd4c5c..3d87334 100644 --- a/ext/cdi/jersey-cdi-rs-inject/src/main/java/module-info.java +++ b/ext/cdi/jersey-cdi-rs-inject/src/main/java/module-info.java
@@ -22,4 +22,7 @@ requires org.glassfish.jersey.core.server; requires org.glassfish.jersey.inject.hk2; requires org.glassfish.jersey.ext.cdi1x; + + opens org.glassfish.jersey.ext.cdi1x.inject.internal; + exports org.glassfish.jersey.ext.cdi1x.inject.internal; } \ No newline at end of file
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/module-info.java b/ext/cdi/jersey-cdi1x/src/main/java/module-info.java index 1716abd..344dfe2 100644 --- a/ext/cdi/jersey-cdi1x/src/main/java/module-info.java +++ b/ext/cdi/jersey-cdi1x/src/main/java/module-info.java
@@ -26,7 +26,7 @@ requires org.glassfish.hk2.api; - requires org.glassfish.jersey.core.server; + requires static org.glassfish.jersey.core.server; requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.inject.hk2;
diff --git a/media/sse/src/main/java/module-info.java b/media/sse/src/main/java/module-info.java index 6f69e5f..2895ea5 100644 --- a/media/sse/src/main/java/module-info.java +++ b/media/sse/src/main/java/module-info.java
@@ -14,8 +14,6 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -import org.glassfish.jersey.media.sse.internal.JerseySseEventSource; - module org.glassfish.jersey.media.sse { requires java.logging; @@ -36,5 +34,5 @@ opens org.glassfish.jersey.media.sse.internal; provides jakarta.ws.rs.sse.SseEventSource.Builder with - JerseySseEventSource.Builder; + org.glassfish.jersey.media.sse.internal.JerseySseEventSource.Builder; } \ No newline at end of file
diff --git a/test-framework/core/pom.xml b/test-framework/core/pom.xml index 6dae286..9080322 100644 --- a/test-framework/core/pom.xml +++ b/test-framework/core/pom.xml
@@ -38,6 +38,10 @@ <artifactId>jakarta.xml.bind-api</artifactId> </dependency> <dependency> + <groupId>jakarta.persistence</groupId> + <artifactId>jakarta.persistence-api</artifactId> + </dependency> + <dependency> <groupId>jakarta.servlet</groupId> <artifactId>jakarta.servlet-api</artifactId> </dependency> @@ -77,6 +81,14 @@ </dependency> </dependencies> + <properties> + <surefire.coverage.argline> + --add-exports org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED + --add-exports org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED + --add-modules=ALL-MODULE-PATH + </surefire.coverage.argline> + </properties> + <profiles> <profile> <id>sonar</id>
diff --git a/test-framework/core/src/main/java/module-info.java b/test-framework/core/src/main/java/module-info.java new file mode 100644 index 0000000..0cea95e --- /dev/null +++ b/test-framework/core/src/main/java/module-info.java
@@ -0,0 +1,40 @@ +/* + * Copyright (c) 2022 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.tests.framework.core { + requires jakarta.ws.rs; + requires jakarta.xml.bind; + requires jakarta.servlet; + requires static jakarta.persistence; + + requires java.logging; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.client; + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.container.servlet.core; + + + requires junit; + requires static org.junit.jupiter.api; + + requires static testng; + + exports org.glassfish.jersey.test; + exports org.glassfish.jersey.test.spi; + opens org.glassfish.jersey.test; + opens org.glassfish.jersey.test.spi; +}
diff --git a/test-framework/providers/external/src/main/java/module-info.java b/test-framework/providers/external/src/main/java/module-info.java new file mode 100644 index 0000000..3a8a463 --- /dev/null +++ b/test-framework/providers/external/src/main/java/module-info.java
@@ -0,0 +1,28 @@ +/* + * Copyright (c) 2022 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.tests.framework.provider.external { + requires jakarta.ws.rs; + requires java.logging; + + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.core.client; + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.tests.framework.core; + + exports org.glassfish.jersey.test.external; + opens org.glassfish.jersey.test.external; +} \ No newline at end of file
diff --git a/test-framework/providers/grizzly2/src/main/java/module-info.java b/test-framework/providers/grizzly2/src/main/java/module-info.java new file mode 100644 index 0000000..752ccff --- /dev/null +++ b/test-framework/providers/grizzly2/src/main/java/module-info.java
@@ -0,0 +1,30 @@ +/* + * Copyright (c) 2022 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.tests.framework.provider.grizzly { + requires java.logging; + + requires jakarta.servlet; + requires jakarta.ws.rs; + + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.client; + requires org.glassfish.jersey.container.grizzly2.http; + requires org.glassfish.jersey.container.grizzly2.servlet; + + exports org.glassfish.jersey.test.grizzly; +} \ No newline at end of file
diff --git a/test-framework/providers/grizzly2/src/test/java/module-info.java b/test-framework/providers/grizzly2/src/test/java/module-info.java new file mode 100644 index 0000000..fa5a8be --- /dev/null +++ b/test-framework/providers/grizzly2/src/test/java/module-info.java
@@ -0,0 +1,43 @@ +/* + * Copyright (c) 2022 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.tests.framework.provider.grizzly { + requires java.logging; + + requires jakarta.inject; + requires jakarta.servlet; + requires jakarta.ws.rs; + + 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; + requires org.glassfish.jersey.container.grizzly2.http; + requires org.glassfish.jersey.container.grizzly2.servlet; + requires org.glassfish.jersey.container.servlet.core; + + exports org.glassfish.jersey.test.grizzly; + exports org.glassfish.jersey.test.grizzly.pckg; + exports org.glassfish.jersey.test.grizzly.web; + exports org.glassfish.jersey.test.grizzly.web.context; + exports org.glassfish.jersey.test.grizzly.web.ssl; + + opens org.glassfish.jersey.test.grizzly.pckg; + opens org.glassfish.jersey.test.grizzly.web; + + requires junit; + requires hamcrest.core; +} \ No newline at end of file
diff --git a/tests/integration/async-jersey-filter/pom.xml b/tests/integration/async-jersey-filter/pom.xml index 7e81742..9433b78 100644 --- a/tests/integration/async-jersey-filter/pom.xml +++ b/tests/integration/async-jersey-filter/pom.xml
@@ -42,6 +42,11 @@ <artifactId>jersey-container-servlet</artifactId> </dependency> <dependency> + <groupId>org.glassfish.jersey.test-framework</groupId> + <artifactId>jersey-test-framework-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.glassfish.jersey.test-framework.providers</groupId> <artifactId>jersey-test-framework-provider-external</artifactId> <scope>test</scope> @@ -61,6 +66,11 @@ <artifactId>jakarta.xml.bind-api</artifactId> <scope>provided</scope> </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> </dependencies> <build>
diff --git a/tests/integration/async-jersey-filter/src/test/java/module-info.java b/tests/integration/async-jersey-filter/src/test/java/module-info.java new file mode 100644 index 0000000..1b68a23 --- /dev/null +++ b/tests/integration/async-jersey-filter/src/test/java/module-info.java
@@ -0,0 +1,36 @@ +/* + * Copyright (c) 2022 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.tests.integration.async.jersey.filter { + requires java.logging; + + requires jakarta.inject; + requires jakarta.ws.rs; + requires jakarta.servlet; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.container.servlet.core; + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.external; + + requires junit; + + exports org.glassfish.jersey.tests.integration.async; + exports org.glassfish.jersey.tests.integration.jersey2730; + exports org.glassfish.jersey.tests.integration.jersey2812; + +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/pom.xml b/tests/integration/cdi-integration/cdi-client-on-server/pom.xml index 9ab2692..012ce4c 100644 --- a/tests/integration/cdi-integration/cdi-client-on-server/pom.xml +++ b/tests/integration/cdi-integration/cdi-client-on-server/pom.xml
@@ -86,6 +86,22 @@ <version>${project.version}</version> <scope>provided</scope> </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>aopalliance</groupId> + <artifactId>aopalliance</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + <scope>test</scope> + </dependency> </dependencies> <profiles>
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/module-info.java new file mode 100644 index 0000000..03a08ea --- /dev/null +++ b/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/module-info.java
@@ -0,0 +1,33 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.client.on.server { + + requires jakarta.inject; + requires jakarta.ws.rs; + + requires weld.se.core; + requires junit; + + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.inject.hk2; + + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.external; + + requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-client/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-client/src/main/java/module-info.java index 6349a48..66e5708 100644 --- a/tests/integration/cdi-integration/cdi-client/src/main/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-client/src/main/java/module-info.java
@@ -20,4 +20,5 @@ requires jakarta.cdi; opens org.glassfish.jersey.tests.cdi.client; + exports org.glassfish.jersey.tests.cdi.client; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-client/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-client/src/test/java/module-info.java new file mode 100644 index 0000000..474af2a --- /dev/null +++ b/tests/integration/cdi-integration/cdi-client/src/test/java/module-info.java
@@ -0,0 +1,35 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.client.test { + + requires jakarta.activation; + requires jakarta.inject; + requires jakarta.ws.rs; + + requires weld.se.core; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.inject.hk2; + requires org.glassfish.jersey.ext.cdi1x ; + + requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; + requires org.glassfish.jersey.tests.integration.cdi.client; + + exports org.glassfish.jersey.tests.cdi.client.test; + opens org.glassfish.jersey.tests.cdi.client.test; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java b/tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/test/BeanManagerInjectedOnClientTest.java similarity index 89% rename from tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java rename to tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/test/BeanManagerInjectedOnClientTest.java index bec10aa..62697e8 100644 --- a/tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java +++ b/tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/test/BeanManagerInjectedOnClientTest.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2022 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 @@ -14,10 +14,12 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.client; +package org.glassfish.jersey.tests.cdi.client.test; import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; import org.glassfish.jersey.internal.util.ReflectionHelper; +import org.glassfish.jersey.tests.cdi.client.CdiClientFilter; +import org.glassfish.jersey.tests.cdi.client.CdiLowerPriorityClientFilter; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/test/java/module-info.java new file mode 100644 index 0000000..e52fcca --- /dev/null +++ b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/test/java/module-info.java
@@ -0,0 +1,26 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.iface { + requires java.logging; + + requires jakarta.inject; + requires jakarta.ws.rs; + + requires junit; + requires hamcrest.core; + requires org.glassfish.jersey.tests.framework.core; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-log-check/pom.xml b/tests/integration/cdi-integration/cdi-log-check/pom.xml index 40d5231..a461a69 100644 --- a/tests/integration/cdi-integration/cdi-log-check/pom.xml +++ b/tests/integration/cdi-integration/cdi-log-check/pom.xml
@@ -80,6 +80,22 @@ <version>${project.version}</version> <scope>provided</scope> </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>aopalliance</groupId> + <artifactId>aopalliance</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + <scope>test</scope> + </dependency> </dependencies> <build>
diff --git a/tests/integration/cdi-integration/cdi-log-check/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-log-check/src/test/java/module-info.java new file mode 100644 index 0000000..8517d2a --- /dev/null +++ b/tests/integration/cdi-integration/cdi-log-check/src/test/java/module-info.java
@@ -0,0 +1,32 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.log.check { + requires java.logging; + + requires jakarta.inject; + requires jakarta.ws.rs; + + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.inject.hk2; + + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.external; + + requires junit; + requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml index c78da1a..8506b5b 100644 --- a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml +++ b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml
@@ -62,9 +62,23 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.glassfish.jersey.test-framework</groupId> + <artifactId>jersey-test-framework-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.glassfish.jersey.test-framework.providers</groupId> - <artifactId>jersey-test-framework-provider-bundle</artifactId> - <type>pom</type> + <artifactId>jersey-test-framework-provider-external</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-grizzly2</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-grizzly2-http</artifactId> <scope>test</scope> </dependency> <dependency>
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-manually-bound/src/main/java/module-info.java index dfc6686..bffb7bb 100644 --- a/tests/integration/cdi-integration/cdi-manually-bound/src/main/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-manually-bound/src/main/java/module-info.java
@@ -26,4 +26,5 @@ requires org.glassfish.jersey.ext.cdi1x; opens org.glassfish.jersey.tests.cdi.manuallybound; + exports org.glassfish.jersey.tests.cdi.manuallybound; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/module-info.java new file mode 100644 index 0000000..47a0a8c --- /dev/null +++ b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/module-info.java
@@ -0,0 +1,39 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.manually.bound.test { + requires jakarta.inject; + requires jakarta.ws.rs; + + requires weld.se.core; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.inject.hk2; + requires org.glassfish.jersey.ext.cdi1x; + requires org.glassfish.jersey.ext.weld2.se; + requires org.glassfish.jersey.container.grizzly2.http; + + requires org.glassfish.jersey.tests.integration.cdi.manually.bound; + + requires junit; + + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.external; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + + exports org.glassfish.jersey.tests.cdi.manuallybound.test; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/CdiServiceInjectTest.java b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/test/CdiServiceInjectTest.java similarity index 89% rename from tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/CdiServiceInjectTest.java rename to tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/test/CdiServiceInjectTest.java index 29e4d77..45d75fd 100644 --- a/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/CdiServiceInjectTest.java +++ b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/test/CdiServiceInjectTest.java
@@ -14,12 +14,15 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.manuallybound; +package org.glassfish.jersey.tests.cdi.manuallybound.test; import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.test.JerseyTest; import org.glassfish.jersey.test.external.ExternalTestContainerFactory; +import org.glassfish.jersey.tests.cdi.manuallybound.CdiServiceImpl; +import org.glassfish.jersey.tests.cdi.manuallybound.NoBeanDefiningAnnotationContainerFilter; +import org.glassfish.jersey.tests.cdi.manuallybound.Resource; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/HK2ServiceInjectTest.java b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/test/HK2ServiceInjectTest.java similarity index 88% rename from tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/HK2ServiceInjectTest.java rename to tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/test/HK2ServiceInjectTest.java index 9d0039f..2581891 100644 --- a/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/HK2ServiceInjectTest.java +++ b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/test/HK2ServiceInjectTest.java
@@ -14,12 +14,16 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.manuallybound; +package org.glassfish.jersey.tests.cdi.manuallybound.test; import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.test.JerseyTest; import org.glassfish.jersey.test.external.ExternalTestContainerFactory; +import org.glassfish.jersey.tests.cdi.manuallybound.HK2Binder; +import org.glassfish.jersey.tests.cdi.manuallybound.HK2InjectedFilter; +import org.glassfish.jersey.tests.cdi.manuallybound.HK2ServiceImpl; +import org.glassfish.jersey.tests.cdi.manuallybound.Resource; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/cdi-multipart-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-multipart-webapp/src/test/java/module-info.java new file mode 100644 index 0000000..8194a51 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-multipart-webapp/src/test/java/module-info.java
@@ -0,0 +1,27 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.multipart.webapp { + requires jakarta.ws.rs; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.client; + requires org.glassfish.jersey.media.multipart; + + requires junit; + + requires org.glassfish.jersey.tests.framework.core; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-resource-with-at-context/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/main/java/module-info.java index ac8801c..3599091 100644 --- a/tests/integration/cdi-integration/cdi-resource-with-at-context/src/main/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/main/java/module-info.java
@@ -22,5 +22,6 @@ requires org.glassfish.jersey.core.server; + exports org.glassfish.jersey.tests.cdi.resourceatcontext; opens org.glassfish.jersey.tests.cdi.resourceatcontext; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/module-info.java new file mode 100644 index 0000000..dd5b164 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/module-info.java
@@ -0,0 +1,36 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.resource.context.test { + requires jakarta.inject; + requires jakarta.ws.rs; + + requires org.glassfish.jersey.inject.hk2; + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.ext.cdi1x; + requires org.glassfish.jersey.ext.weld2.se; + requires org.glassfish.jersey.container.servlet.core; + requires org.glassfish.jersey.container.grizzly2.http; + + requires weld.se.core; + + requires junit; + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.integration.cdi.resource.context; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + + exports org.glassfish.jersey.tests.cdi.resourceatcontext.test; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/org/glassfish/jersey/tests/cdi/resourceatcontext/ResourceWithConstructorTest.java b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/org/glassfish/jersey/tests/cdi/resourceatcontext/test/ResourceWithConstructorTest.java similarity index 95% rename from tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/org/glassfish/jersey/tests/cdi/resourceatcontext/ResourceWithConstructorTest.java rename to tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/org/glassfish/jersey/tests/cdi/resourceatcontext/test/ResourceWithConstructorTest.java index 1f846f3..1464c81 100644 --- a/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/org/glassfish/jersey/tests/cdi/resourceatcontext/ResourceWithConstructorTest.java +++ b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/org/glassfish/jersey/tests/cdi/resourceatcontext/test/ResourceWithConstructorTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resourceatcontext; +package org.glassfish.jersey.tests.cdi.resourceatcontext.test; import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; import org.glassfish.jersey.server.ResourceConfig; @@ -25,6 +25,7 @@ import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory; import org.glassfish.jersey.test.spi.TestContainerException; import org.glassfish.jersey.test.spi.TestContainerFactory; +import org.glassfish.jersey.tests.cdi.resourceatcontext.App; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/cdi-singleton/pom.xml b/tests/integration/cdi-integration/cdi-singleton/pom.xml index b4864d4..369623a 100644 --- a/tests/integration/cdi-integration/cdi-singleton/pom.xml +++ b/tests/integration/cdi-integration/cdi-singleton/pom.xml
@@ -57,9 +57,23 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.glassfish.jersey.test-framework</groupId> + <artifactId>jersey-test-framework-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.glassfish.jersey.test-framework.providers</groupId> - <artifactId>jersey-test-framework-provider-bundle</artifactId> - <type>pom</type> + <artifactId>jersey-test-framework-provider-external</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-grizzly2</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-grizzly2-http</artifactId> <scope>test</scope> </dependency> <dependency>
diff --git a/tests/integration/cdi-integration/cdi-singleton/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-singleton/src/main/java/module-info.java index 5af76b0..39c136d 100644 --- a/tests/integration/cdi-integration/cdi-singleton/src/main/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-singleton/src/main/java/module-info.java
@@ -19,4 +19,5 @@ requires jakarta.inject; opens org.glassfish.jersey.tests.cdi.singleton; + exports org.glassfish.jersey.tests.cdi.singleton; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-singleton/src/main/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTestApp.java b/tests/integration/cdi-integration/cdi-singleton/src/main/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTestApp.java index 3578328..d44553e 100644 --- a/tests/integration/cdi-integration/cdi-singleton/src/main/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTestApp.java +++ b/tests/integration/cdi-integration/cdi-singleton/src/main/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTestApp.java
@@ -22,7 +22,7 @@ public class SingletonTestApp extends Application { - static final SingletonResource[] SINGLETON_RESOURCES = new SingletonResource[3]; + public static final SingletonResource[] SINGLETON_RESOURCES = new SingletonResource[3]; @Override public Set<Class<?>> getClasses() {
diff --git a/tests/integration/cdi-integration/cdi-singleton/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-singleton/src/test/java/module-info.java new file mode 100644 index 0000000..cca0271 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-singleton/src/test/java/module-info.java
@@ -0,0 +1,34 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.singleton.test { + requires jakarta.inject; + requires jakarta.ws.rs; + + requires org.glassfish.jersey.inject.hk2; + requires org.glassfish.jersey.container.grizzly2.http; + requires org.glassfish.jersey.ext.weld2.se; + requires org.glassfish.jersey.tests.integration.cdi.singleton; + + requires weld.se.core; + + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.external; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + requires junit; + + exports org.glassfish.jersey.tests.cdi.singleton.test; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-singleton/src/test/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTest.java b/tests/integration/cdi-integration/cdi-singleton/src/test/java/org/glassfish/jersey/tests/cdi/singleton/test/SingletonTest.java similarity index 92% rename from tests/integration/cdi-integration/cdi-singleton/src/test/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTest.java rename to tests/integration/cdi-integration/cdi-singleton/src/test/java/org/glassfish/jersey/tests/cdi/singleton/test/SingletonTest.java index 8e39986..3928527 100644 --- a/tests/integration/cdi-integration/cdi-singleton/src/test/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTest.java +++ b/tests/integration/cdi-integration/cdi-singleton/src/test/java/org/glassfish/jersey/tests/cdi/singleton/test/SingletonTest.java
@@ -14,11 +14,13 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.singleton; +package org.glassfish.jersey.tests.cdi.singleton.test; import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; import org.glassfish.jersey.test.JerseyTest; import org.glassfish.jersey.test.external.ExternalTestContainerFactory; +import org.glassfish.jersey.tests.cdi.singleton.SingletonResource; +import org.glassfish.jersey.tests.cdi.singleton.SingletonTestApp; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml index 99f1c90..294793c 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml
@@ -48,9 +48,23 @@ <scope>provided</scope> </dependency> <dependency> + <groupId>org.glassfish.jersey.test-framework</groupId> + <artifactId>jersey-test-framework-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.glassfish.jersey.test-framework.providers</groupId> - <artifactId>jersey-test-framework-provider-bundle</artifactId> - <type>pom</type> + <artifactId>jersey-test-framework-provider-external</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-grizzly2</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-grizzly2-http</artifactId> <scope>test</scope> </dependency> <dependency>
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/module-info.java index 24384b0..a2316ed 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/module-info.java
@@ -23,4 +23,5 @@ requires java.logging; opens org.glassfish.jersey.tests.cdi.resources; + exports org.glassfish.jersey.tests.cdi.resources; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/module-info.java new file mode 100644 index 0000000..612ccc5 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/module-info.java
@@ -0,0 +1,41 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.test.webapp.test { + requires java.logging; + + requires jakarta.annotation; + requires jakarta.inject; + requires jakarta.ws.rs; + + requires weld.se.core; + requires hamcrest.core; + + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.inject.hk2; + requires org.glassfish.jersey.ext.weld2.se; + requires org.glassfish.jersey.container.grizzly2.http; + + + requires org.glassfish.jersey.tests.integration.cdi.test.webapp; + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.external; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + + requires junit; + + exports org.glassfish.jersey.tests.cdi.resources.test; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CdiTest.java similarity index 93% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CdiTest.java index d4523ad..657bf6c 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CdiTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import java.net.URI; @@ -23,6 +23,7 @@ import org.glassfish.jersey.test.JerseyTest; +import org.glassfish.jersey.tests.cdi.resources.MainApplication; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ConstructorInjectionTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ConstructorInjectionTest.java similarity index 97% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ConstructorInjectionTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ConstructorInjectionTest.java index fe0edde..bb31406 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ConstructorInjectionTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ConstructorInjectionTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import jakarta.ws.rs.client.WebTarget; import jakarta.ws.rs.core.Response;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CounterTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CounterTest.java similarity index 96% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CounterTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CounterTest.java index 392d639..fa1ec43 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CounterTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CounterTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import jakarta.ws.rs.client.WebTarget; import jakarta.ws.rs.core.Response;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/JaxRsInjectedCdiBeanTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/JaxRsInjectedCdiBeanTest.java similarity index 96% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/JaxRsInjectedCdiBeanTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/JaxRsInjectedCdiBeanTest.java index b00475c..6640e4c 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/JaxRsInjectedCdiBeanTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/JaxRsInjectedCdiBeanTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import jakarta.ws.rs.client.WebTarget; import jakarta.ws.rs.core.Response;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/NonJaxRsBeanJaxRsInjectionTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/NonJaxRsBeanJaxRsInjectionTest.java similarity index 96% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/NonJaxRsBeanJaxRsInjectionTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/NonJaxRsBeanJaxRsInjectionTest.java index 3d577f4..a22ad08 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/NonJaxRsBeanJaxRsInjectionTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/NonJaxRsBeanJaxRsInjectionTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import java.io.IOException; import java.net.URI; @@ -34,6 +34,8 @@ import org.glassfish.grizzly.http.server.HttpHandler; import org.glassfish.grizzly.http.server.HttpServer; +import org.glassfish.jersey.tests.cdi.resources.MainApplication; +import org.glassfish.jersey.tests.cdi.resources.SecondaryApplication; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assumptions;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/PerRequestBeanTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/PerRequestBeanTest.java similarity index 97% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/PerRequestBeanTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/PerRequestBeanTest.java index 6865a66..c3e24b8 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/PerRequestBeanTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/PerRequestBeanTest.java
@@ -15,7 +15,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import java.util.List; import java.util.stream.Stream;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/PerRequestDependentBeanTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/PerRequestDependentBeanTest.java similarity index 96% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/PerRequestDependentBeanTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/PerRequestDependentBeanTest.java index 4954859..1970c6b 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/PerRequestDependentBeanTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/PerRequestDependentBeanTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import java.util.stream.Stream;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ProducerTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ProducerTest.java similarity index 96% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ProducerTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ProducerTest.java index ed9dc7e..7460ec8 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ProducerTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ProducerTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import jakarta.ws.rs.client.WebTarget; import jakarta.ws.rs.core.Response;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/QualifiedInjectionSetGetTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/QualifiedInjectionSetGetTest.java similarity index 96% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/QualifiedInjectionSetGetTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/QualifiedInjectionSetGetTest.java index 04570fb..558204f 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/QualifiedInjectionSetGetTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/QualifiedInjectionSetGetTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import jakarta.inject.Qualifier; import jakarta.ws.rs.client.Entity;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ReverseEchoTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ReverseEchoTest.java similarity index 96% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ReverseEchoTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ReverseEchoTest.java index 4f57650..f901338 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ReverseEchoTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ReverseEchoTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import java.util.stream.Stream;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SecondJaxRsInjectedCdiBeanTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SecondJaxRsInjectedCdiBeanTest.java similarity index 95% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SecondJaxRsInjectedCdiBeanTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SecondJaxRsInjectedCdiBeanTest.java index 7d33b41..d3be5a8 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SecondJaxRsInjectedCdiBeanTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SecondJaxRsInjectedCdiBeanTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import java.net.URI; @@ -25,6 +25,7 @@ import org.glassfish.jersey.test.JerseyTest; +import org.glassfish.jersey.tests.cdi.resources.SecondaryApplication; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SingletonBeanTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SingletonBeanTest.java similarity index 98% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SingletonBeanTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SingletonBeanTest.java index 045d742..caf412f 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SingletonBeanTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SingletonBeanTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import java.util.stream.Stream;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SingletonDependentBeanTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SingletonDependentBeanTest.java similarity index 98% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SingletonDependentBeanTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SingletonDependentBeanTest.java index 19a7033..5180d00 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SingletonDependentBeanTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SingletonDependentBeanTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import java.util.stream.Stream;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/StutterEchoTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/StutterEchoTest.java similarity index 96% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/StutterEchoTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/StutterEchoTest.java index ba2d1fd..9621562 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/StutterEchoTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/StutterEchoTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import java.util.stream.Stream;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/TimerTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/TimerTest.java similarity index 97% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/TimerTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/TimerTest.java index fa7dcb2..0bcc3bb 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/TimerTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/TimerTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import java.util.logging.Level; import java.util.logging.Logger;
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/test/java/module-info.java new file mode 100644 index 0000000..a6f98fb --- /dev/null +++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/test/java/module-info.java
@@ -0,0 +1,26 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.injection.cfg { + requires jakarta.inject; + requires jakarta.ws.rs; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + + requires junit; + requires org.glassfish.jersey.tests.framework.core; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/test/java/module-info.java new file mode 100644 index 0000000..89b5ead --- /dev/null +++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/test/java/module-info.java
@@ -0,0 +1,26 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.injection.hk2.banned { + requires jakarta.inject; + requires jakarta.ws.rs; + requires jakarta.cdi; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + + requires org.glassfish.jersey.tests.framework.core; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/test/java/module-info.java new file mode 100644 index 0000000..7740438 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/test/java/module-info.java
@@ -0,0 +1,26 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.injection.webapp { + requires jakarta.inject; + requires jakarta.cdi; + requires jakarta.ws.rs; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + + requires org.glassfish.jersey.tests.framework.core; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/context-inject-on-server/pom.xml b/tests/integration/cdi-integration/context-inject-on-server/pom.xml index a278dfa..3d863d3 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/pom.xml +++ b/tests/integration/cdi-integration/context-inject-on-server/pom.xml
@@ -125,4 +125,9 @@ </build> </profile> </profiles> + <properties> + <surefire.coverage.argline> + --add-modules=ALL-MODULE-PATH + </surefire.coverage.argline> + </properties> </project>
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/main/java/module-info.java b/tests/integration/cdi-integration/context-inject-on-server/src/main/java/module-info.java index f43ffa6..3916359 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/src/main/java/module-info.java +++ b/tests/integration/cdi-integration/context-inject-on-server/src/main/java/module-info.java
@@ -28,4 +28,5 @@ requires org.glassfish.jersey.container.servlet.core; opens org.glassfish.jersey.tests.cdi.inject; + exports org.glassfish.jersey.tests.cdi.inject; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/main/java/org/glassfish/jersey/tests/cdi/inject/InjectionChecker.java b/tests/integration/cdi-integration/context-inject-on-server/src/main/java/org/glassfish/jersey/tests/cdi/inject/InjectionChecker.java index 2d18f7c..8fecb39 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/src/main/java/org/glassfish/jersey/tests/cdi/inject/InjectionChecker.java +++ b/tests/integration/cdi-integration/context-inject-on-server/src/main/java/org/glassfish/jersey/tests/cdi/inject/InjectionChecker.java
@@ -42,10 +42,10 @@ import java.lang.annotation.Annotation; import java.util.Iterator; -class InjectionChecker { - static final String APPLICATION_PROPERTY = "ApplicationProperty"; - static final String HEADER = "HttpHeader"; - static final String ROOT = "resource"; +public class InjectionChecker { + public static final String APPLICATION_PROPERTY = "ApplicationProperty"; + public static final String HEADER = "HttpHeader"; + public static final String ROOT = "resource"; static boolean checkApplication(Application application, StringBuilder sb) { if (application == null) {
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/module-info.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/module-info.java new file mode 100644 index 0000000..aef70d4 --- /dev/null +++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/module-info.java
@@ -0,0 +1,41 @@ +/* + * Copyright (c) 2022 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.tests.integration.cdi.inject.server.test { + requires jakarta.annotation; + requires jakarta.cdi; + requires jakarta.inject; + requires jakarta.servlet; + requires jakarta.ws.rs; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.inject.hk2; + requires org.glassfish.jersey.container.servlet.core; + requires org.glassfish.jersey.container.grizzly2.http; + requires org.glassfish.jersey.ext.weld2.se; + requires org.glassfish.jersey.ext.cdi.rs.inject; + + requires weld.se.core; + + requires junit; + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.integration.cdi.inject.server; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + + exports org.glassfish.jersey.tests.cdi.inject.test; + opens org.glassfish.jersey.tests.cdi.inject.test; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/NonScopedApplicationInjectTest.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/NonScopedApplicationInjectTest.java similarity index 94% rename from tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/NonScopedApplicationInjectTest.java rename to tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/NonScopedApplicationInjectTest.java index 2b25463..1614615 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/NonScopedApplicationInjectTest.java +++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/NonScopedApplicationInjectTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.inject; +package org.glassfish.jersey.tests.cdi.inject.test; import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; import org.glassfish.jersey.servlet.ServletProperties; @@ -24,6 +24,8 @@ import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory; import org.glassfish.jersey.test.spi.TestContainerException; import org.glassfish.jersey.test.spi.TestContainerFactory; +import org.glassfish.jersey.tests.cdi.inject.InjectionChecker; +import org.glassfish.jersey.tests.cdi.inject.NonScopedApplicationInject; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/NonScopedInjectionTest.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/NonScopedInjectionTest.java similarity index 96% rename from tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/NonScopedInjectionTest.java rename to tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/NonScopedInjectionTest.java index c1339f5..a0f051e 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/NonScopedInjectionTest.java +++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/NonScopedInjectionTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.inject; +package org.glassfish.jersey.tests.cdi.inject.test; import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; import org.glassfish.jersey.servlet.ServletProperties; @@ -24,6 +24,8 @@ import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory; import org.glassfish.jersey.test.spi.TestContainerException; import org.glassfish.jersey.test.spi.TestContainerFactory; +import org.glassfish.jersey.tests.cdi.inject.InjectionChecker; +import org.glassfish.jersey.tests.cdi.inject.NonScopedApplication; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ScopedApplicationInjectTest.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ScopedApplicationInjectTest.java similarity index 94% rename from tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ScopedApplicationInjectTest.java rename to tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ScopedApplicationInjectTest.java index 9c2f15d..384f17c 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ScopedApplicationInjectTest.java +++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ScopedApplicationInjectTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.inject; +package org.glassfish.jersey.tests.cdi.inject.test; import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; import org.glassfish.jersey.servlet.ServletProperties; @@ -24,6 +24,8 @@ import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory; import org.glassfish.jersey.test.spi.TestContainerException; import org.glassfish.jersey.test.spi.TestContainerFactory; +import org.glassfish.jersey.tests.cdi.inject.InjectionChecker; +import org.glassfish.jersey.tests.cdi.inject.ScopedApplicationInject; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ScopedInjectionTest.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ScopedInjectionTest.java similarity index 96% rename from tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ScopedInjectionTest.java rename to tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ScopedInjectionTest.java index 85ebed0..6affbd2 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ScopedInjectionTest.java +++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ScopedInjectionTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.inject; +package org.glassfish.jersey.tests.cdi.inject.test; import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; import org.glassfish.jersey.servlet.ServletProperties; @@ -24,6 +24,8 @@ import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory; import org.glassfish.jersey.test.spi.TestContainerException; import org.glassfish.jersey.test.spi.TestContainerFactory; +import org.glassfish.jersey.tests.cdi.inject.InjectionChecker; +import org.glassfish.jersey.tests.cdi.inject.ScopedApplication; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/SseTest.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/SseTest.java similarity index 96% rename from tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/SseTest.java rename to tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/SseTest.java index 6fc8952..1d8a993 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/SseTest.java +++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/SseTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.inject; +package org.glassfish.jersey.tests.cdi.inject.test; import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; import org.glassfish.jersey.servlet.ServletProperties; @@ -24,6 +24,8 @@ import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory; import org.glassfish.jersey.test.spi.TestContainerException; import org.glassfish.jersey.test.spi.TestContainerFactory; +import org.glassfish.jersey.tests.cdi.inject.InjectionChecker; +import org.glassfish.jersey.tests.cdi.inject.SseAplication; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/jaxrs-component-inject/src/main/java/module-info.java b/tests/integration/jaxrs-component-inject/src/main/java/module-info.java index f49df25..f7c3fa9 100644 --- a/tests/integration/jaxrs-component-inject/src/main/java/module-info.java +++ b/tests/integration/jaxrs-component-inject/src/main/java/module-info.java
@@ -18,5 +18,7 @@ requires jakarta.ws.rs; requires jakarta.xml.bind; + requires org.glassfish.jersey.core.common; + exports org.glassfish.jersey.tests.jaxrs.inject; } \ No newline at end of file
diff --git a/tests/integration/jersey-1107/src/main/java/module-info.java b/tests/integration/jersey-1107/src/main/java/module-info.java index 0b4f5fe..cbdb86d 100644 --- a/tests/integration/jersey-1107/src/main/java/module-info.java +++ b/tests/integration/jersey-1107/src/main/java/module-info.java
@@ -17,4 +17,6 @@ module org.glassfish.jersey.tests.integration.jersey_1107 { requires jakarta.ws.rs; requires jakarta.xml.bind; + + requires org.glassfish.jersey.core.server; } \ No newline at end of file
diff --git a/tests/integration/jersey-1223/src/main/java/module-info.java b/tests/integration/jersey-1223/src/main/java/module-info.java index b81a290..15fcf36 100644 --- a/tests/integration/jersey-1223/src/main/java/module-info.java +++ b/tests/integration/jersey-1223/src/main/java/module-info.java
@@ -17,4 +17,6 @@ module org.glassfish.jersey.tests.integration.jersey1223 { requires jakarta.ws.rs; requires jakarta.xml.bind; + + requires org.glassfish.jersey.core.server; } \ No newline at end of file
diff --git a/tests/integration/jersey-1604/src/main/java/module-info.java b/tests/integration/jersey-1604/src/main/java/module-info.java index 73b160e..b339487 100644 --- a/tests/integration/jersey-1604/src/main/java/module-info.java +++ b/tests/integration/jersey-1604/src/main/java/module-info.java
@@ -17,4 +17,7 @@ module org.glassfish.jersey.tests.integration.jersey_1604 { requires jakarta.ws.rs; requires jakarta.xml.bind; + + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.core.client; } \ No newline at end of file
diff --git a/tests/integration/jersey-1883/src/main/java/module-info.java b/tests/integration/jersey-1883/src/main/java/module-info.java index 728cbda..3c742ae 100644 --- a/tests/integration/jersey-1883/src/main/java/module-info.java +++ b/tests/integration/jersey-1883/src/main/java/module-info.java
@@ -19,4 +19,7 @@ requires jakarta.ws.rs; requires jakarta.inject; requires jakarta.xml.bind; + + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.inject.hk2; } \ No newline at end of file
diff --git a/tests/integration/jersey-1928/src/main/java/module-info.java b/tests/integration/jersey-1928/src/main/java/module-info.java index fa71bc2..383097a 100644 --- a/tests/integration/jersey-1928/src/main/java/module-info.java +++ b/tests/integration/jersey-1928/src/main/java/module-info.java
@@ -17,4 +17,6 @@ module org.glassfish.jersey.tests.integration.jersey1928 { requires jakarta.ws.rs; requires jakarta.xml.bind; + + requires org.glassfish.jersey.core.server; } \ No newline at end of file
diff --git a/tests/integration/jersey-2184/src/main/java/module-info.java b/tests/integration/jersey-2184/src/main/java/module-info.java index 6645ae5..17571be 100644 --- a/tests/integration/jersey-2184/src/main/java/module-info.java +++ b/tests/integration/jersey-2184/src/main/java/module-info.java
@@ -18,4 +18,6 @@ requires jakarta.servlet; requires jakarta.ws.rs; requires jakarta.xml.bind; + + requires org.glassfish.jersey.inject.hk2; } \ No newline at end of file
diff --git a/tests/integration/jersey-780/pom.xml b/tests/integration/jersey-780/pom.xml index 39b8f7e..dd95b0e 100644 --- a/tests/integration/jersey-780/pom.xml +++ b/tests/integration/jersey-780/pom.xml
@@ -43,6 +43,38 @@ <artifactId>jersey-test-framework-provider-external</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework</groupId> + <artifactId>jersey-test-framework-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>aopalliance</groupId> + <artifactId>aopalliance</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>jakarta.persistence</groupId> + <artifactId>jakarta.persistence-api</artifactId> + <scope>test</scope> + </dependency> </dependencies> <build> @@ -61,5 +93,10 @@ </plugin> </plugins> </build> - + <properties> + <failsafe.coverage.argline> + --add-reads org.glassfish.jersey.tests.integration.jersey_780=ALL-UNNAMED + --add-modules=ALL-MODULE-PATH + </failsafe.coverage.argline> + </properties> </project>
diff --git a/tests/integration/jersey-780/src/test/java/module-info.java b/tests/integration/jersey-780/src/test/java/module-info.java new file mode 100644 index 0000000..4d480e5 --- /dev/null +++ b/tests/integration/jersey-780/src/test/java/module-info.java
@@ -0,0 +1,26 @@ +/* + * Copyright (c) 2022 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.tests.integration.jersey_780 { + requires jakarta.ws.rs; + requires jakarta.persistence; + + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.external; + + requires junit; +} \ No newline at end of file