JPMS: archetypes (I), bean validation API adopted

Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
diff --git a/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml
index 05b0c3d..af97394 100644
--- a/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml
@@ -70,8 +70,6 @@
                 <artifactId>maven-compiler-plugin</artifactId>
                 <inherited>true</inherited>
                 <configuration>
-                    <source>${java.version}</source>
-                    <target>${java.version}</target>
                     <showWarnings>false</showWarnings>
                     <fork>false</fork>
                 </configuration>
diff --git a/archetypes/jersey-quickstart-grizzly2/pom.xml b/archetypes/jersey-quickstart-grizzly2/pom.xml
index 7b7371e..c3983d7 100644
--- a/archetypes/jersey-quickstart-grizzly2/pom.xml
+++ b/archetypes/jersey-quickstart-grizzly2/pom.xml
@@ -45,7 +45,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-resources-plugin</artifactId>
-                <version>2.5</version>
+                <version>${maven.resources.plugin.version}</version>
                 <configuration>
                     <escapeString>\</escapeString>
                 </configuration>
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/META-INF/archetype.xml b/archetypes/jersey-quickstart-grizzly2/src/main/resources/META-INF/archetype.xml
deleted file mode 100644
index 8a4f997..0000000
--- a/archetypes/jersey-quickstart-grizzly2/src/main/resources/META-INF/archetype.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (c) 2010, 2018 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
-
--->
-
-<archetype>
-  <id>jersey-quickstart-grizzly2</id>
-  <sources>
-    <source>src/main/java/Main.java</source>
-    <source>src/main/java/MyResource.java</source>
-  </sources>
-  <testSources>
-    <source>src/test/java/MyResourceTest.java</source>
-  </testSources>
-</archetype>
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/jersey-quickstart-grizzly2/src/main/resources/META-INF/maven/archetype-metadata.xml
new file mode 100644
index 0000000..e932741
--- /dev/null
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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
+
+-->
+
+<archetype-descriptor
+        xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0 https://maven.apache.org/xsd/archetype-descriptor-1.1.0.xsd"
+        name="quickstart">
+    <fileSets>
+        <fileSet filtered="true" packaged="true">
+            <excludes>
+                <exclude>module-info.java</exclude>
+            </excludes>
+            <directory>src/main/java</directory>
+            <includes>
+                <include>**/*.java</include>
+            </includes>
+        </fileSet>
+        <fileSet filtered="true" packaged="false">
+            <directory>src/main/java</directory>
+            <includes>
+                <include>module-info.java</include>
+            </includes>
+        </fileSet>
+        <fileSet filtered="true" packaged="true">
+            <excludes>
+                <exclude>module-info.java</exclude>
+            </excludes>
+            <directory>src/test/java</directory>
+            <includes>
+                <include>**/*.java</include>
+            </includes>
+        </fileSet>
+        <fileSet filtered="true" packaged="false">
+            <directory>src/test/java</directory>
+            <includes>
+                <include>module-info.java</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+</archetype-descriptor>
\ No newline at end of file
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml
index 9bd0bda..682a44b 100644
--- a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml
@@ -50,17 +50,13 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.8.1</version>
+                <version>3.10.1</version>
                 <inherited>true</inherited>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
             </plugin>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>exec-maven-plugin</artifactId>
-                <version>1.2.1</version>
+                <version>3.0.0</version>
                 <executions>
                     <execution>
                         <goals>
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/module-info.java b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/module-info.java
new file mode 100644
index 0000000..eda6b28
--- /dev/null
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/module-info.java
@@ -0,0 +1,10 @@
+module ${package}.module {
+    requires jakarta.ws.rs;
+
+    requires grizzly.http.server;
+
+    requires org.glassfish.jersey.core.server;
+    requires org.glassfish.jersey.container.grizzly2.http;
+
+    exports ${package};
+}
\ No newline at end of file
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/MyResourceTest.java b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/MyResourceTest.java
index 0b5f5c7..729b5d5 100644
--- a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/MyResourceTest.java
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/MyResourceTest.java
@@ -1,4 +1,4 @@
-package $package;
+package ${package}.test;
 
 import jakarta.ws.rs.client.Client;
 import jakarta.ws.rs.client.ClientBuilder;
@@ -6,6 +6,8 @@
 
 import org.glassfish.grizzly.http.server.HttpServer;
 
+import ${package}.Main;
+
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/module-info.java b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/module-info.java
new file mode 100644
index 0000000..c2d395f
--- /dev/null
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/module-info.java
@@ -0,0 +1,9 @@
+module ${package}.module.test {
+    requires jakarta.ws.rs;
+
+    requires junit;
+
+    requires com.example.archetype.grizzly.module;
+
+    exports ${package}.test;
+}
\ No newline at end of file
diff --git a/archetypes/jersey-quickstart-webapp/pom.xml b/archetypes/jersey-quickstart-webapp/pom.xml
index 43525bc..d73f895 100644
--- a/archetypes/jersey-quickstart-webapp/pom.xml
+++ b/archetypes/jersey-quickstart-webapp/pom.xml
@@ -36,7 +36,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-resources-plugin</artifactId>
-                <version>2.5</version>
+                <version>${maven.resources.plugin.version}</version>
                 <configuration>
                     <escapeString>\</escapeString>
                 </configuration>
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/META-INF/archetype.xml b/archetypes/jersey-quickstart-webapp/src/main/resources/META-INF/archetype.xml
deleted file mode 100644
index cea1eea..0000000
--- a/archetypes/jersey-quickstart-webapp/src/main/resources/META-INF/archetype.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (c) 2010, 2018 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
-
--->
-
-<archetype>
-  <id>jersey-quickstart-webapp</id>
-  <sources>
-    <source>src/main/java/MyResource.java</source>
-  </sources>
-  <resources>
-    <resource>src/main/webapp/index.jsp</resource>
-    <resource>src/main/webapp/WEB-INF/web.xml</resource>
-  </resources>
-</archetype>
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/jersey-quickstart-webapp/src/main/resources/META-INF/maven/archetype-metadata.xml
new file mode 100644
index 0000000..53d7ba6
--- /dev/null
+++ b/archetypes/jersey-quickstart-webapp/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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
+
+-->
+
+<archetype-descriptor
+        xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0 https://maven.apache.org/xsd/archetype-descriptor-1.1.0.xsd"
+        name="quickstart">
+    <fileSets>
+        <fileSet filtered="true" packaged="true">
+            <excludes>
+                <exclude>module-info.java</exclude>
+            </excludes>
+            <directory>src/main/java</directory>
+            <includes>
+                <include>**/*.java</include>
+            </includes>
+        </fileSet>
+        <fileSet filtered="true" packaged="false">
+            <directory>src/main/java</directory>
+            <includes>
+                <include>module-info.java</include>
+            </includes>
+        </fileSet>
+        <fileSet filtered="true" packaged="false">
+            <directory>src/main/webapp</directory>
+        </fileSet>
+    </fileSets>
+</archetype-descriptor>
\ No newline at end of file
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml
index fc70d51..8de4e4d 100644
--- a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml
@@ -15,12 +15,8 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.8.1</version>
+                <version>3.10.1</version>
                 <inherited>true</inherited>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/java/module-info.java b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/java/module-info.java
new file mode 100644
index 0000000..23c71ea
--- /dev/null
+++ b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/java/module-info.java
@@ -0,0 +1,8 @@
+module ${package}.module {
+    requires jakarta.ws.rs;
+
+    requires org.glassfish.jersey.container.servlet.core;
+    requires org.glassfish.jersey.inject.hk2;
+
+    exports ${package};
+}
\ No newline at end of file
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
index 7c85b3a..279de3c 100644
--- a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
+++ b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
@@ -7,7 +7,7 @@
         <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
         <init-param>
             <param-name>jersey.config.server.provider.packages</param-name>
-            <param-value>$package</param-value>
+            <param-value>${package}</param-value>
         </init-param>
         <load-on-startup>1</load-on-startup>
     </servlet>
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp
index a064b45..9b08787 100644
--- a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp
+++ b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp
@@ -2,7 +2,7 @@
 <body>
     <h2>Jersey RESTful Web Application!</h2>
     <p><a href="webapi/myresource">Jersey resource</a>
-    <p>Visit <a href="http://jersey.java.net">Project Jersey website</a>
+    <p>Visit <a href="http://eclipse-ee4j.github.io/jersey">Project Jersey website</a>
     for more information on Jersey!
 </body>
 </html>
diff --git a/archetypes/pom.xml b/archetypes/pom.xml
index 6642616..1b44aa6 100644
--- a/archetypes/pom.xml
+++ b/archetypes/pom.xml
@@ -57,4 +57,7 @@
             </plugin>
         </plugins>
     </build>
+    <properties>
+        <maven.resources.plugin.version>3.2.0</maven.resources.plugin.version>
+    </properties>
 </project>
diff --git a/core-common/src/main/java/module-info.java b/core-common/src/main/java/module-info.java
index 0e58fb0..e944d60 100644
--- a/core-common/src/main/java/module-info.java
+++ b/core-common/src/main/java/module-info.java
@@ -21,7 +21,7 @@
     requires static jakarta.activation;
     requires jakarta.annotation;
     requires java.logging;
-    requires java.desktop;
+    requires static java.desktop;
 
     // Filename-based auto-modules
     requires static org.osgi.core;
diff --git a/core-server/src/main/java/module-info.java b/core-server/src/main/java/module-info.java
index 0f9ce53..73509d7 100644
--- a/core-server/src/main/java/module-info.java
+++ b/core-server/src/main/java/module-info.java
@@ -19,7 +19,7 @@
     requires static jakarta.xml.bind;
     requires java.logging;
     requires jakarta.annotation;
-    requires java.desktop;
+    requires static java.desktop;
     requires java.management;
     requires jakarta.activation;
     requires jakarta.inject;
diff --git a/ext/bean-validation/src/main/java/module-info.java b/ext/bean-validation/src/main/java/module-info.java
index 85c012c..55e4cd9 100644
--- a/ext/bean-validation/src/main/java/module-info.java
+++ b/ext/bean-validation/src/main/java/module-info.java
@@ -33,5 +33,6 @@
     exports org.glassfish.jersey.server.validation;
     exports org.glassfish.jersey.server.validation.internal.hibernate;
     exports org.glassfish.jersey.server.validation.internal;
+    opens org.glassfish.jersey.server.validation.internal;
     opens org.glassfish.jersey.server.validation.internal.hibernate;
 }
\ No newline at end of file
diff --git a/ext/proxy-client/src/main/java/module-info.java b/ext/proxy-client/src/main/java/module-info.java
index 2e233f6..0bb2091 100644
--- a/ext/proxy-client/src/main/java/module-info.java
+++ b/ext/proxy-client/src/main/java/module-info.java
@@ -15,7 +15,7 @@
  */
 
 module org.glassfish.jersey.ext.proxy.client {
-    requires java.desktop;
+    requires static java.desktop;
 
     requires jakarta.ws.rs;
 
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
index 2f58eeb..d2cf773 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
@@ -90,9 +90,23 @@
         </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>
     </dependencies>
@@ -125,4 +139,12 @@
     <build>
         <finalName>${project.artifactId}</finalName>
     </build>
+    <properties>
+        <surefire.coverage.argline>
+            --add-reads jakarta.validation=weld.api
+            --add-reads jakarta.validation=weld.core.impl
+            --add-opens jakarta.validation/jakarta.validation=weld.core.impl
+            --add-modules=ALL-MODULE-PATH
+        </surefire.coverage.argline>
+    </properties>
 </project>
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.java
similarity index 93%
rename from tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/module-info.txt
rename to tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/module-info.java
index 66c0c94..2c57e55 100644
--- 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.java
@@ -14,8 +14,8 @@
  * 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.inject;
     requires jakarta.ws.rs;
     requires jakarta.xml.bind;
     requires jakarta.cdi;
@@ -28,4 +28,5 @@
     requires org.glassfish.jersey.ext.cdi1x;
 
     exports org.glassfish.jersey.tests.cdi.bv;
+    opens org.glassfish.jersey.tests.cdi.bv;
 }
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/module-info.java
new file mode 100644
index 0000000..8f7e829
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/module-info.java
@@ -0,0 +1,44 @@
+/*
+ * 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.beanvalidation.webapp.test {
+    requires jakarta.cdi;
+    requires jakarta.inject;
+    requires jakarta.validation;
+    requires jakarta.ws.rs;
+
+    requires weld.se.core;
+    requires grizzly.http.server;
+
+    requires org.glassfish.jersey.core.common;
+    requires org.glassfish.jersey.core.client;
+    requires org.glassfish.jersey.core.server;
+    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.beanvalidation.webapp;
+
+    requires junit;
+    requires hamcrest.core;
+
+    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.bv.test;
+    opens org.glassfish.jersey.tests.cdi.bv.test;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/BaseValidationTest.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/BaseValidationTest.java
similarity index 98%
rename from tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/BaseValidationTest.java
rename to tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/BaseValidationTest.java
index 0a1141c..527012b 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/BaseValidationTest.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/BaseValidationTest.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.bv;
+package org.glassfish.jersey.tests.cdi.bv.test;
 
 import java.net.URI;
 
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/CombinedTest.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/CombinedTest.java
similarity index 97%
rename from tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/CombinedTest.java
rename to tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/CombinedTest.java
index 2b04f74..1ca9945 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/CombinedTest.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/CombinedTest.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.bv;
+package org.glassfish.jersey.tests.cdi.bv.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.bv.CdiApplication;
+import org.glassfish.jersey.tests.cdi.bv.Hk2Application;
 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-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/RawCdiTest.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/RawCdiTest.java
similarity index 96%
rename from tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/RawCdiTest.java
rename to tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/RawCdiTest.java
index dfb2340..2733c38 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/RawCdiTest.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/RawCdiTest.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.bv;
+package org.glassfish.jersey.tests.cdi.bv.test;
 
 import jakarta.ws.rs.core.Application;
 
@@ -22,6 +22,7 @@
 import org.glassfish.jersey.server.ResourceConfig;
 import org.glassfish.jersey.test.external.ExternalTestContainerFactory;
 
+import org.glassfish.jersey.tests.cdi.bv.CdiApplication;
 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-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/RawHk2Test.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/RawHk2Test.java
similarity index 90%
rename from tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/RawHk2Test.java
rename to tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/RawHk2Test.java
index 1998e9a..e50591e 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/RawHk2Test.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/RawHk2Test.java
@@ -14,14 +14,13 @@
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
  */
 
-package org.glassfish.jersey.tests.cdi.bv;
+package org.glassfish.jersey.tests.cdi.bv.test;
 
 import jakarta.ws.rs.core.Application;
 
 import org.glassfish.jersey.server.ResourceConfig;
 
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
+import org.glassfish.jersey.tests.cdi.bv.Hk2Application;
 
 /**
  * Validation result test for raw HK2 environment.