From 303d3487dd024495ab6356bf8509b330f6cf92e4 Mon Sep 17 00:00:00 2001
From: Paul Gregoire <mondain@gmail.com>
Date: Mon, 4 Dec 2023 08:24:21 -0800
Subject: [PATCH] Set test skip enabled, remove surefire

---
 client/pom.xml                                     | 11 -----------
 common/pom.xml                                     |  6 ------
 .../org/red5/server/service/ReflectionUtils.java   |  8 ++++----
 io/pom.xml                                         |  6 ------
 pom.xml                                            | 14 +-------------
 red5-server.code-workspace                         |  2 +-
 .../red5/server/service/ReflectionUtilsTest.java   |  5 ++---
 service/pom.xml                                    |  6 ------
 8 files changed, 8 insertions(+), 50 deletions(-)

diff --git a/client/pom.xml b/client/pom.xml
index 5881d9f2..1e0b62e9 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -13,17 +13,6 @@
     <build>
         <defaultGoal>install</defaultGoal>
         <plugins>
-            <plugin>
-                <artifactId>maven-enforcer-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-            </plugin>
-            <!--
-            <plugin>
-                <artifactId>maven-toolchains-plugin</artifactId>
-            </plugin>
-            -->
             <plugin>
                 <groupId>net.revelc.code.formatter</groupId>
                 <artifactId>formatter-maven-plugin</artifactId>
diff --git a/common/pom.xml b/common/pom.xml
index fa9fd28f..b33e9a8a 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -21,12 +21,6 @@
     <build>
         <defaultGoal>install</defaultGoal>
         <plugins>
-            <plugin>
-                <artifactId>maven-enforcer-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <artifactId>maven-toolchains-plugin</artifactId>
-            </plugin>
             <plugin>
                 <groupId>net.revelc.code.formatter</groupId>
                 <artifactId>formatter-maven-plugin</artifactId>
diff --git a/common/src/main/java/org/red5/server/service/ReflectionUtils.java b/common/src/main/java/org/red5/server/service/ReflectionUtils.java
index 0e71daad..57d80510 100644
--- a/common/src/main/java/org/red5/server/service/ReflectionUtils.java
+++ b/common/src/main/java/org/red5/server/service/ReflectionUtils.java
@@ -130,7 +130,7 @@ public class ReflectionUtils {
      *            Arguments
      * @return Method/params pairs
      */
-    public static Object[] findMethodWithExactParameters(Object service, String methodName, Object[] args) {
+    private static Object[] findMethodWithExactParameters(Object service, String methodName, Object[] args) {
         int numParams = (args == null) ? 0 : args.length;
         if (isTrace) {
             log.trace("Args / parameters count: {}", numParams);
@@ -192,7 +192,7 @@ public class ReflectionUtils {
      *            Arguments
      * @return Method/params pairs
      */
-    public static Object[] findMethodWithListParameters(Object service, String methodName, List<?> args) {
+    private static Object[] findMethodWithListParameters(Object service, String methodName, List<?> args) {
         return findMethodWithListParameters(service, methodName, args.toArray());
     }
 
@@ -207,7 +207,7 @@ public class ReflectionUtils {
      *            Arguments
      * @return Method/params pairs
      */
-    public static Object[] findMethodWithListParameters(Object service, String methodName, Object[] args) {
+    private static Object[] findMethodWithListParameters(Object service, String methodName, Object[] args) {
         Method method = null;
         try {
             // convert the args first
@@ -253,7 +253,7 @@ public class ReflectionUtils {
      *            Number of parameters
      * @return List of methods that match by name and number of parameters
      */
-    public static List<Method> findMethodsByNameAndNumParams(Object object, String method, int numParam) {
+    private static List<Method> findMethodsByNameAndNumParams(Object object, String method, int numParam) {
         LinkedList<Method> list = new LinkedList<>();
         Method[] methods = object.getClass().getMethods();
         for (Method m : methods) {
diff --git a/io/pom.xml b/io/pom.xml
index ffbd23a0..09c5e3e8 100644
--- a/io/pom.xml
+++ b/io/pom.xml
@@ -13,12 +13,6 @@
     <build>
         <defaultGoal>install</defaultGoal>
         <plugins>
-            <plugin>
-                <artifactId>maven-enforcer-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <artifactId>maven-toolchains-plugin</artifactId>
-            </plugin>
             <plugin>
                 <groupId>net.revelc.code.formatter</groupId>
                 <artifactId>formatter-maven-plugin</artifactId>
diff --git a/pom.xml b/pom.xml
index 35ab3978..1befb2c4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,7 +86,7 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <!-- to run unit tests use -Dmaven.test.skip=false -->
-        <!-- <maven.test.skip>true</maven.test.skip> -->
+        <maven.test.skip>true</maven.test.skip>
         <maven.compiler.source>1.11</maven.compiler.source>
         <maven.compiler.target>1.11</maven.compiler.target>
         <java.release.level>11</java.release.level>
@@ -319,18 +319,6 @@
                         </execution>
                     </executions>
                 </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>3.0.0-M3</version>
-                    <configuration>
-                      <skipTests>${skipTests}</skipTests>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-project-info-reports-plugin</artifactId>
-                    <version>3.0.0</version>
-                </plugin>
                 <plugin>
                     <artifactId>maven-scm-plugin</artifactId>
                     <version>1.11.2</version>
diff --git a/red5-server.code-workspace b/red5-server.code-workspace
index b783b6c1..8fc86241 100644
--- a/red5-server.code-workspace
+++ b/red5-server.code-workspace
@@ -5,7 +5,7 @@
 		}
 	],
 	"settings": {
-		"java.configuration.updateBuildConfiguration": "interactive",
+		"java.configuration.updateBuildConfiguration": "automatic",
 		"java.compile.nullAnalysis.mode": "automatic",
 		"java.project.sourcePaths": [
 			"io",
diff --git a/server/src/test/java/org/red5/server/service/ReflectionUtilsTest.java b/server/src/test/java/org/red5/server/service/ReflectionUtilsTest.java
index 29332d8e..a5e6d67b 100644
--- a/server/src/test/java/org/red5/server/service/ReflectionUtilsTest.java
+++ b/server/src/test/java/org/red5/server/service/ReflectionUtilsTest.java
@@ -54,11 +54,10 @@ public class ReflectionUtilsTest {
         }
         assertNotEquals(NULL_RETURN, result);
 
-        
     }
 
     private class DummyConnection extends RTMPMinaConnection {
-            
+
     }
 
     public class TestService {
@@ -66,7 +65,7 @@ public class ReflectionUtilsTest {
         public void doTest(String param) {
             log.info("doTest: {}", param);
         }
-        
+
         public void doTestWithConn(IConnection conn, String param0, Integer param1) {
             log.info("doTestWithConn: {} {} {}", conn, param0, param1);
         }
diff --git a/service/pom.xml b/service/pom.xml
index e08e568a..5b9b3b0a 100644
--- a/service/pom.xml
+++ b/service/pom.xml
@@ -16,12 +16,6 @@
     <build>
         <defaultGoal>install</defaultGoal>
         <plugins>
-            <plugin>
-                <artifactId>maven-enforcer-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <artifactId>maven-toolchains-plugin</artifactId>
-            </plugin>
             <plugin>
                 <groupId>net.revelc.code.formatter</groupId>
                 <artifactId>formatter-maven-plugin</artifactId>
-- 
GitLab