JPMS core,inject,media,connectors,containers

Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
diff --git a/core-client/pom.xml b/core-client/pom.xml
index fcd0987..668f70b 100644
--- a/core-client/pom.xml
+++ b/core-client/pom.xml
@@ -41,24 +41,27 @@
                 <inherited>true</inherited>
             </plugin>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <inherited>true</inherited>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <inherited>false</inherited>
-                <configuration>
-                    <source>${java.version}</source>
-                    <target>${java.version}</target>
-                    <compilerArguments>
-                        <!-- Do not warn about using sun.misc.Unsafe -->
-                        <XDignore.symbol.file />
-                    </compilerArguments>
-                    <showWarnings>false</showWarnings>
-                    <fork>false</fork>
-                </configuration>
+<!--                <inherited>false</inherited>-->
+                <executions>
+                    <execution>
+                        <id>default-compile</id>
+                        <goals>
+                            <goal>compile</goal>
+                        </goals>
+                        <configuration>
+                            <source>${java.version}</source>
+                            <target>${java.version}</target>
+                            <compilerArguments>
+                                <!-- Do not warn about using sun.misc.Unsafe -->
+                                <XDignore.symbol.file/>
+                            </compilerArguments>
+<!--                            <showWarnings>false</showWarnings>-->
+<!--                            <fork>false</fork>-->
+                        </configuration>
+                    </execution>
+                </executions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -68,6 +71,7 @@
                     <parallel>classesAndMethods</parallel>
                     <perCoreThreadCount>true</perCoreThreadCount>
                     <threadCount>1</threadCount>
+                    <forkCount>0</forkCount>
                 </configuration>
             </plugin>
 
@@ -119,6 +123,17 @@
         </dependency>
 
         <dependency>
+            <groupId>jakarta.xml.bind</groupId>
+            <artifactId>jakarta.xml.bind-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>jakarta.annotation</groupId>
+            <artifactId>jakarta.annotation-api</artifactId>
+        </dependency>
+
+        <dependency>
             <!-- not to warn about missing activation -->
             <groupId>org.eclipse.angus</groupId>
             <artifactId>angus-activation</artifactId>
@@ -175,4 +190,4 @@
         </profile>
     </profiles>
 
-</project>
+</project>
\ No newline at end of file
diff --git a/core-client/src/main/java/module-info.java b/core-client/src/main/java/module-info.java
new file mode 100644
index 0000000..b3c7030
--- /dev/null
+++ b/core-client/src/main/java/module-info.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2021 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.client {
+    //requires jakarta.ws.rs;
+    requires org.glassfish.jersey.core.common;
+
+    requires jakarta.annotation;
+
+    requires java.logging;
+    //requires java.base;
+
+
+    requires jakarta.inject;
+
+    exports org.glassfish.jersey.client;
+    exports org.glassfish.jersey.client.authentication;
+    exports org.glassfish.jersey.client.filter;
+    exports org.glassfish.jersey.client.http;
+    exports org.glassfish.jersey.client.inject;
+    exports org.glassfish.jersey.client.spi;
+
+    provides jakarta.ws.rs.client.ClientBuilder with
+            org.glassfish.jersey.client.JerseyClientBuilder;
+}
\ No newline at end of file
diff --git a/core-common/pom.xml b/core-common/pom.xml
index 3e5eae4..4997e1d 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -254,6 +254,53 @@
 
     <profiles>
         <profile>
+            <id>jdk11+</id>
+            <!--
+                JDK 9 & 10 is unsupported (as well as <release>9</release>)
+                module-info for java.xml.bind is taken from JDK (lib/ct.sym/9-modules)
+                and it depends on java.activation which clashes with javax.activation
+            -->
+            <activation>
+                <jdk>[11,)</jdk>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>jakarta.xml.bind</groupId>
+                    <artifactId>jakarta.xml.bind-api</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>jakarta.annotation</groupId>
+                    <artifactId>jakarta.annotation-api</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>jakarta.activation</groupId>
+                    <artifactId>jakarta.activation-api</artifactId>
+                </dependency>
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>default-compile</id>
+                                <configuration>
+                                    <!-- compile everything to ensure module-info contains right entries -->
+                                    <release>11</release>
+                                    <compilerArgs>
+                                        <arg>--add-reads</arg>
+                                        <arg>org.glassfish.jersey.core.common=ALL-UNNAMED</arg>
+                                    </compilerArgs>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
             <id>securityOff</id>
             <properties>
                <surefire.security.argline />
@@ -293,6 +340,11 @@
 
     <properties>
         <surefire.security.argline>-Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/surefire.policy</surefire.security.argline>
+        <jsr166.sourceDirectory>${project.basedir}/src/main/jsr166</jsr166.sourceDirectory>
+        <java8.build.outputDirectory>${project.build.directory}/classes-java8</java8.build.outputDirectory>
+        <java8.sourceDirectory>${project.basedir}/src/main/java8</java8.sourceDirectory>
+        <java9.build.outputDirectory>${project.build.directory}/classes-java9</java9.build.outputDirectory>
+        <java9.sourceDirectory>${project.basedir}/src/main/java9</java9.sourceDirectory>
     </properties>
 
 </project>
diff --git a/core-common/src/main/java/module-info.java b/core-common/src/main/java/module-info.java
new file mode 100644
index 0000000..e48ec4c
--- /dev/null
+++ b/core-common/src/main/java/module-info.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2021 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.core.common {
+    requires transitive jakarta.ws.rs;
+    requires static jakarta.xml.bind;
+    requires java.logging;
+    requires jakarta.annotation;
+    requires java.desktop;
+    requires jakarta.activation;
+
+    // Filename-based auto-modules
+    requires transitive jakarta.inject;
+    requires org.osgi.core;
+    requires osgi.resource.locator;
+
+    // Exports rather all, which corresponds to previous state without module-info
+    exports org.glassfish.jersey.internal.config;
+    exports org.glassfish.jersey.internal.guava;
+    exports org.glassfish.jersey.internal.inject;
+    exports org.glassfish.jersey.internal.l10n;
+    exports org.glassfish.jersey.internal.sonar;
+    exports org.glassfish.jersey.internal.spi;
+    exports org.glassfish.jersey.internal.routing;
+    exports org.glassfish.jersey.internal.util;
+    exports org.glassfish.jersey.internal.util.collection;
+    exports org.glassfish.jersey.internal;
+    exports org.glassfish.jersey.logging;
+    exports org.glassfish.jersey.message;
+    exports org.glassfish.jersey.message.internal;
+    exports org.glassfish.jersey.model;
+    exports org.glassfish.jersey.model.internal;
+    exports org.glassfish.jersey.model.internal.spi;
+    exports org.glassfish.jersey.process;
+    exports org.glassfish.jersey.process.internal;
+    exports org.glassfish.jersey.spi;
+    exports org.glassfish.jersey.uri;
+    exports org.glassfish.jersey.uri.internal;
+    exports org.glassfish.jersey;
+    exports org.glassfish.jersey.internal.jsr166 to org.glassfish.jersey.core.server;
+
+    opens org.glassfish.jersey.message.internal;
+    opens org.glassfish.jersey.internal;
+
+    uses org.glassfish.jersey.internal.inject.InjectionManagerFactory;
+    uses org.glassfish.jersey.internal.spi.AutoDiscoverable;
+    uses org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable;
+
+    provides jakarta.ws.rs.ext.RuntimeDelegate with org.glassfish.jersey.internal.RuntimeDelegateImpl;
+    provides org.glassfish.jersey.internal.spi.AutoDiscoverable with org.glassfish.jersey.logging.LoggingFeatureAutoDiscoverable;
+    //provides org.osgi.framework.SynchronousBundleListener with org.glassfish.jersey.internal.OsgiRegistry;
+
+}
\ No newline at end of file
diff --git a/core-server/pom.xml b/core-server/pom.xml
index 4885dc1..e28874a 100644
--- a/core-server/pom.xml
+++ b/core-server/pom.xml
@@ -154,11 +154,30 @@
                     <parallel>classes</parallel>
                     <perCoreThreadCount>true</perCoreThreadCount>
                     <threadCount>1</threadCount>
-                    <forkCount>1C</forkCount>
+                    <forkCount>0</forkCount>
                     <reuseForks>true</reuseForks>
                     <systemPropertiesFile>${project.basedir}/etc/systemPropertiesFile</systemPropertiesFile>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <executions>
+                    <execution>
+<!--                        <id>default-compile</id>-->
+                        <configuration>
+                            <!-- compile everything to ensure module-info contains right entries -->
+                            <release>11</release>
+                            <compilerArgs>
+                                <arg>--add-reads</arg>
+                                <arg>org.glassfish.jersey.core.server=ALL-UNNAMED</arg>
+                                <arg>--add-opens</arg>
+                                <arg>jakarta.xml.bind/jakarta.xml.bind=ALL-UNNAMED</arg>
+                            </compilerArgs>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 
diff --git a/core-server/src/main/java/module-info.java b/core-server/src/main/java/module-info.java
new file mode 100644
index 0000000..048dca7
--- /dev/null
+++ b/core-server/src/main/java/module-info.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2021 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.core.server {
+    requires transitive jakarta.ws.rs;
+    requires static jakarta.xml.bind;
+    requires java.logging;
+    requires jakarta.annotation;
+    requires java.desktop;
+    requires java.management;
+    requires jakarta.activation;
+    requires jakarta.inject;
+    requires jakarta.validation;
+
+    requires jdk.httpserver;
+
+    // jersey common modules
+    requires org.glassfish.jersey.core.common;
+    requires org.glassfish.jersey.client;
+
+    // Exports rather all, which corresponds to previous state without module-info
+    exports org.glassfish.jersey.server;
+    exports org.glassfish.jersey.server.spi;
+    exports org.glassfish.jersey.server.spi.internal;
+    exports org.glassfish.jersey.server.model;
+    exports org.glassfish.jersey.server.wadl;
+    exports org.glassfish.jersey.server.wadl.config;
+    exports org.glassfish.jersey.server.wadl.processor;
+    exports org.glassfish.jersey.server.filter;
+    exports org.glassfish.jersey.server.monitoring;
+    exports org.glassfish.jersey.server.wadl.internal;
+    exports org.glassfish.jersey.server.internal;
+    exports org.glassfish.jersey.server.internal.inject;
+
+    provides jakarta.ws.rs.core.Configuration with org.glassfish.jersey.server.ResourceConfig;
+//    provides jakarta.ws.rs.core.Configuration with org.glassfish.jersey.server.ServerConfig;
+
+}
\ No newline at end of file
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/AbstractFinderTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/AbstractFinderTest.java
new file mode 100644
index 0000000..575aa8e
--- /dev/null
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/AbstractFinderTest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2021 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
+ */
+
+package org.glassfish.jersey.server.internal.scanning;
+
+public abstract class AbstractFinderTest {
+
+    String setUpJaxRsApiPath() {
+        final String classPath = System.getProperty("surefire.test.class.path");
+
+        return parseEntries(classPath);
+    }
+
+    private static String parseEntries(String fullPath) {
+        final String[] entries = fullPath.split(System.getProperty("path.separator"));
+        for (final String entry : entries) {
+            if (entry.contains("jakarta.ws.rs-api")) {
+                return entry;
+            }
+        }
+        return null;
+    }
+
+}
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java
index bdceaa1..40f2757 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java
@@ -43,15 +43,8 @@
 
     @BeforeEach
     public void setUp() throws Exception {
-        final String classPath = System.getProperty("java.class.path");
-        final String[] entries = classPath.split(System.getProperty("path.separator"));
 
-        for (final String entry : entries) {
-            if (entry.contains("jakarta.ws.rs-api")) {
-                jaxRsApiPath = entry;
-                break;
-            }
-        }
+        jaxRsApiPath = setUpJaxRsApiPath();
 
         if (jaxRsApiPath == null) {
             fail("Could not find jakarta.ws.rs-api.");
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/VFSSchemeResourceFinderTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/VFSSchemeResourceFinderTest.java
index 903f150..4d15358 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/VFSSchemeResourceFinderTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/VFSSchemeResourceFinderTest.java
@@ -40,21 +40,14 @@
  * @author Martin Snyder
  * @author Jason T. Greene
  */
-public class VFSSchemeResourceFinderTest {
+public class VFSSchemeResourceFinderTest extends AbstractFinderTest {
 
     private String jaxRsApiPath;
 
     @BeforeEach
     public void setUp() throws Exception {
-        final String classPath = System.getProperty("java.class.path");
-        final String[] entries = classPath.split(System.getProperty("path.separator"));
 
-        for (final String entry : entries) {
-            if (entry.contains("jakarta.ws.rs-api")) {
-                jaxRsApiPath = entry;
-                break;
-            }
-        }
+        jaxRsApiPath = setUpJaxRsApiPath();
 
         if (jaxRsApiPath == null) {
             fail("Could not find jakarta.ws.rs-api.");
diff --git a/ext/cdi/jersey-cdi1x-transaction/src/main/java/module-info.java b/ext/cdi/jersey-cdi1x-transaction/src/main/java/module-info.java
new file mode 100644
index 0000000..0c04ef3
--- /dev/null
+++ b/ext/cdi/jersey-cdi1x-transaction/src/main/java/module-info.java
@@ -0,0 +1,5 @@
+module org.glassfish.jersey.ext.cdi1x {
+    requires jakarta.annotation;
+    requires jakarta.inject;
+    requires org.glassfish.jersey.core.server;
+}
\ No newline at end of file
diff --git a/ext/cdi/jersey-cdi1x/pom.xml b/ext/cdi/jersey-cdi1x/pom.xml
index afc33a7..4b742ac 100644
--- a/ext/cdi/jersey-cdi1x/pom.xml
+++ b/ext/cdi/jersey-cdi1x/pom.xml
@@ -113,6 +113,23 @@
                     <skipTests>${skip.tests}</skipTests>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>default-compile</id>
+                        <configuration>
+                            <!-- compile everything to ensure module-info contains right entries -->
+                            <release>11</release>
+                            <compilerArgs>
+                                <arg>--add-reads</arg>
+                                <arg>org.glassfish.jersey.ext.cdi1x=ALL-UNNAMED</arg>
+                            </compilerArgs>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/module-info.java b/ext/cdi/jersey-cdi1x/src/main/java/module-info.java
new file mode 100644
index 0000000..287d6e6
--- /dev/null
+++ b/ext/cdi/jersey-cdi1x/src/main/java/module-info.java
@@ -0,0 +1,8 @@
+module org.glassfish.jersey.ext.cdi1x {
+
+    requires java.naming;
+
+    requires transitive org.glassfish.jersey.core.server;
+    requires transitive org.glassfish.jersey.inject.hk2;
+
+}
\ No newline at end of file
diff --git a/inject/hk2/pom.xml b/inject/hk2/pom.xml
index bc9787e..7178c5e 100644
--- a/inject/hk2/pom.xml
+++ b/inject/hk2/pom.xml
@@ -131,4 +131,60 @@
             </plugin>
         </plugins>
     </build>
+    <profiles>
+        <profile>
+            <id>jdk11+</id>
+            <!--
+                JDK 9 & 10 is unsupported (as well as <release>9</release>)
+                module-info for java.xml.bind is taken from JDK (lib/ct.sym/9-modules)
+                and it depends on java.activation which clashes with javax.activation
+            -->
+            <activation>
+                <jdk>[11,)</jdk>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>jakarta.xml.bind</groupId>
+                    <artifactId>jakarta.xml.bind-api</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>jakarta.annotation</groupId>
+                    <artifactId>jakarta.annotation-api</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>jakarta.activation</groupId>
+                    <artifactId>jakarta.activation-api</artifactId>
+                </dependency>
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>default-compile</id>
+                                <configuration>
+                                    <!-- compile everything to ensure module-info contains right entries -->
+                                    <release>11</release>
+                                    <compilerArgs>
+                                        <arg>--add-reads</arg>
+                                        <arg>org.glassfish.jersey.inject.hk2=ALL-UNNAMED</arg>
+                                    </compilerArgs>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <forkMode>never</forkMode>
+                            <argLine>--add-reads org.glassfish.jersey.inject.hk2=ALL-UNNAMED --add-opens org.glassfish.jersey.inject.hk2=ALL-UNNAMED --illegal-access=permit</argLine>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>
diff --git a/inject/hk2/src/main/java/module-info.java b/inject/hk2/src/main/java/module-info.java
new file mode 100644
index 0000000..82ff87a
--- /dev/null
+++ b/inject/hk2/src/main/java/module-info.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2021 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.inject.hk2 {
+
+    requires transitive jakarta.annotation;
+    requires transitive jakarta.inject;
+    requires java.logging;
+
+    requires org.glassfish.hk2.api;
+    requires org.glassfish.hk2.locator;
+    requires org.glassfish.hk2.utilities;
+
+    requires org.glassfish.jersey.core.common;
+
+    exports org.glassfish.jersey.inject.hk2;
+    opens org.glassfish.jersey.inject.hk2;
+
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index ea1fd70..08b5cad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -322,9 +322,6 @@
                         </compilerArguments>
                         <showWarnings>false</showWarnings>
                         <fork>false</fork>
-                        <excludes>
-                            <exclude>module-info.java</exclude>
-                        </excludes>
                     </configuration>
                 </plugin>
                 <plugin>
@@ -911,10 +908,9 @@
                         <plugin>
                             <groupId>org.apache.maven.plugins</groupId>
                             <artifactId>maven-compiler-plugin</artifactId>
+                            <version>${mvn.compiler.plugin.version}</version>
                             <inherited>true</inherited>
                             <configuration>
-                                <source>${java.version}</source>
-                                <target>${java.version}</target>
                                 <excludes>
                                     <exclude>module-info.java</exclude>
                                 </excludes>
@@ -940,9 +936,9 @@
                         <plugin>
                             <groupId>org.apache.maven.plugins</groupId>
                             <artifactId>maven-compiler-plugin</artifactId>
+                            <version>${mvn.compiler.plugin.version}</version>
                             <inherited>true</inherited>
                             <executions>
-<!-- when module.info
                                 <execution>
                                     <id>default-compile</id>
                                     <configuration>
@@ -950,7 +946,6 @@
                                         <release>11</release>
                                     </configuration>
                                 </execution>
--->
                                 <execution>
                                     <id>base-compile</id>
                                     <goals>