JPMS: tests/integration/cdi 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 ec6d02c..2854adc 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 transitive jakarta.persistence; requires static jakarta.servlet; requires org.glassfish.jersey.core.common; @@ -30,4 +30,6 @@ exports org.glassfish.jersey.servlet.internal; exports org.glassfish.jersey.servlet.internal.spi; exports org.glassfish.jersey.servlet.spi; + + opens org.glassfish.jersey.servlet; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/module-info.txt b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/module-info.txt new file mode 100644 index 0000000..66c0c94 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/module-info.txt
@@ -0,0 +1,31 @@ +/* + * 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 + */ + +//TODO - fixme when jakarta.validation with proper module-info is released +module org.glassfish.jersey.tests.integration.cdi.beanvalidation.webapp { + requires jakarta.ws.rs; + requires jakarta.xml.bind; + requires jakarta.cdi; + requires jakarta.validation; + + requires weld.core.impl; + + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.ext.cdi1x; + + exports org.glassfish.jersey.tests.cdi.bv; +} \ 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 bb7fb92..9ab2692 100644 --- a/tests/integration/cdi-integration/cdi-client-on-server/pom.xml +++ b/tests/integration/cdi-integration/cdi-client-on-server/pom.xml
@@ -80,6 +80,12 @@ <version>${project.version}</version> <scope>provided</scope> </dependency> + <dependency> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-server</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> </dependencies> <profiles>
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/module-info.java new file mode 100644 index 0000000..f44cb3e --- /dev/null +++ b/tests/integration/cdi-integration/cdi-client-on-server/src/main/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.client.on.server { + requires jakarta.ws.rs; + requires jakarta.xml.bind; + requires jakarta.inject; + requires jakarta.cdi; + + requires org.glassfish.jersey.core.server; + + opens org.glassfish.jersey.tests.cdi.client; +} \ 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 new file mode 100644 index 0000000..6349a48 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-client/src/main/java/module-info.java
@@ -0,0 +1,23 @@ +/* + * 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 { + requires jakarta.ws.rs; + requires jakarta.inject; + requires jakarta.cdi; + + opens org.glassfish.jersey.tests.cdi.client; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/module-info.java new file mode 100644 index 0000000..b8e728a --- /dev/null +++ b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/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.ejb.test.webapp { + requires jakarta.ws.rs; + requires jakarta.xml.bind; + requires jakarta.inject; + requires jakarta.cdi; + requires jakarta.annotation; + requires jakarta.ejb.api; + + opens org.glassfish.jersey.tests.cdi.resources; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/java/module-info.java new file mode 100644 index 0000000..be4d227 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/java/module-info.java
@@ -0,0 +1,22 @@ +/* + * 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 jakarta.ws.rs; + requires jakarta.inject; + + opens org.glassfish.jersey.tests.cdi.resources; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-log-check/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-log-check/src/main/java/module-info.java new file mode 100644 index 0000000..52fbba0 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-log-check/src/main/java/module-info.java
@@ -0,0 +1,29 @@ +/* + * 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 jakarta.ws.rs; + requires jakarta.annotation; + requires jakarta.inject; + requires jakarta.interceptor.api; + requires jakarta.cdi; + + requires java.logging; + + requires org.glassfish.jersey.core.server; + + opens org.glassfish.jersey.tests.cdi.resources; +} \ 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 f93ab02..c78da1a 100644 --- a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml +++ b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml
@@ -47,6 +47,11 @@ <artifactId>jersey-cdi1x</artifactId> </dependency> <dependency> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-server</artifactId> + <scope>provided</scope> + </dependency> + <dependency> <groupId>org.jboss.weld.se</groupId> <artifactId>weld-se-core</artifactId> <scope>test</scope>
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 new file mode 100644 index 0000000..c37c0f6 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-manually-bound/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.integration.cdi.manually.bound { + requires jakarta.ws.rs; + requires jakarta.inject; + requires jakarta.cdi; + requires jakarta.xml.bind; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.ext.cdi1x; + + opens org.glassfish.jersey.tests.cdi.manuallybound; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/java/module-info.java new file mode 100644 index 0000000..e43e796 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/java/module-info.java
@@ -0,0 +1,24 @@ +/* + * 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 jakarta.cdi; + + requires org.glassfish.jersey.media.multipart; + + opens org.glassfish.jersey.tests.cdi.resources; +} \ 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 new file mode 100644 index 0000000..ac8801c --- /dev/null +++ b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/main/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.resource.context { + requires jakarta.ws.rs; + requires jakarta.xml.bind; + requires jakarta.inject; + requires jakarta.cdi; + + requires org.glassfish.jersey.core.server; + + opens org.glassfish.jersey.tests.cdi.resourceatcontext; +} \ No newline at end of file
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 new file mode 100644 index 0000000..5af76b0 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-singleton/src/main/java/module-info.java
@@ -0,0 +1,22 @@ +/* + * 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 { + requires jakarta.ws.rs; + requires jakarta.inject; + + opens org.glassfish.jersey.tests.cdi.singleton; +} \ No newline at end of file
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 new file mode 100644 index 0000000..24384b0 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/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.test.webapp { + requires jakarta.annotation; + requires jakarta.ws.rs; + requires jakarta.inject; + requires jakarta.cdi; + + requires java.logging; + + opens org.glassfish.jersey.tests.cdi.resources; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/java/module-info.java new file mode 100644 index 0000000..0681a22 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/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.integration.cdi.injection.cfg { + requires jakarta.ws.rs; + requires jakarta.xml.bind; + requires jakarta.inject; + requires jakarta.cdi; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.ext.cdi1x; + + opens org.glassfish.jersey.tests.cdi.resources; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/java/module-info.java new file mode 100644 index 0000000..d332511 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/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.injection.hk2.banned { + requires jakarta.ws.rs; + requires jakarta.xml.bind; + requires jakarta.inject; + requires jakarta.cdi; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + + opens org.glassfish.jersey.tests.cdi.resources; +} \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/java/module-info.java new file mode 100644 index 0000000..0530f05 --- /dev/null +++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/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.integration.cdi.injection.webapp { + requires jakarta.ws.rs; + requires jakarta.xml.bind; + requires jakarta.inject; + requires jakarta.cdi; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.ext.cdi1x; + + opens org.glassfish.jersey.tests.cdi.resources; +} \ 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 91c20a3..a278dfa 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/pom.xml +++ b/tests/integration/cdi-integration/context-inject-on-server/pom.xml
@@ -51,6 +51,12 @@ <artifactId>jakarta.servlet-api</artifactId> </dependency> <dependency> + <groupId>jakarta.persistence</groupId> + <artifactId>jakarta.persistence-api</artifactId> + <scope>provided</scope> + <optional>true</optional> + </dependency> + <dependency> <groupId>org.glassfish.jersey.test-framework.providers</groupId> <artifactId>jersey-test-framework-provider-grizzly2</artifactId> <scope>test</scope>
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 new file mode 100644 index 0000000..f43ffa6 --- /dev/null +++ b/tests/integration/cdi-integration/context-inject-on-server/src/main/java/module-info.java
@@ -0,0 +1,31 @@ +/* + * 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 { + requires jakarta.annotation; + requires jakarta.ws.rs; + requires jakarta.xml.bind; + requires jakarta.inject; + requires jakarta.cdi; + requires jakarta.servlet; + requires jakarta.persistence; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.container.servlet.core; + + opens org.glassfish.jersey.tests.cdi.inject; +} \ No newline at end of file