From: Jakub Jirutka <jakub@jirutka.cz>
Date: Fri, 23 Jun 2023 15:40:00 +0200
Subject: [PATCH] Remove some unnecessary dependencies

- org.junit.* are testing dependencies; these exclusions don't remove them all,
  I don't know how are they getting to the final build.
- quarkus-devservices-* are only for development and they add some docker bloat
  to the dependency graph.
- quarkus-jdbc-mssql and quarkus-jdbc-oracle are for proprietary databases,
  we don't support those.
- com.openshift adds some bloat for running on OpenShift platform - this package
  is not intended for OpenShift, users of this platform can use the official
  docker image.

This patch reduces the size of the package by ~23 MiB.
There are still many useless dependencies, but it's not easy to get rid of them.

--- a/quarkus/deployment/pom.xml
+++ b/quarkus/deployment/pom.xml
@@ -21,6 +21,17 @@
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-core-deployment</artifactId>
+            <!-- XXX-Patched: added -->
+            <exclusions>
+                <exclusion>
+                    <groupId>org.junit.platform</groupId>
+                    <artifactId>junit-platform-launcher</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.junit.jupiter</groupId>
+                    <artifactId>junit-jupiter</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
@@ -41,6 +52,13 @@
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-hibernate-orm-deployment</artifactId>
+            <!-- XXX-Patched: added -->
+            <exclusions>
+                <exclusion>
+                    <groupId>io.quarkus</groupId>
+                    <artifactId>quarkus-devservices-deployment</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
@@ -49,15 +67,37 @@
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-jdbc-postgresql-deployment</artifactId>
+            <!-- XXX-Patched: added -->
+            <exclusions>
+                <exclusion>
+                    <groupId>io.quarkus</groupId>
+                    <artifactId>quarkus-devservices-postgresql</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-jdbc-mariadb-deployment</artifactId>
+            <!-- XXX-Patched: added -->
+            <exclusions>
+                <exclusion>
+                    <groupId>io.quarkus</groupId>
+                    <artifactId>quarkus-devservices-mariadb</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-jdbc-mysql-deployment</artifactId>
+            <!-- XXX-Patched: added -->
+            <exclusions>
+                <exclusion>
+                    <groupId>io.quarkus</groupId>
+                    <artifactId>quarkus-devservices-mysql</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
+        <!-- XXX-Patched
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-jdbc-mssql-deployment</artifactId>
@@ -66,6 +106,7 @@
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-jdbc-oracle-deployment</artifactId>
         </dependency>
+        -->
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-bootstrap-core</artifactId>
--- a/quarkus/runtime/pom.xml
+++ b/quarkus/runtime/pom.xml
@@ -59,6 +59,7 @@
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-jdbc-mysql</artifactId>
         </dependency>
+        <!-- XXX-Patched
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-jdbc-mssql</artifactId>
@@ -67,6 +68,7 @@
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-jdbc-oracle</artifactId>
         </dependency>
+        -->
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-core</artifactId>
@@ -684,6 +686,7 @@
         </dependency>

         <!-- Openshift -->
+        <!-- XXX-Patched
         <dependency>
             <groupId>com.openshift</groupId>
             <artifactId>openshift-restclient-java</artifactId>
@@ -699,6 +702,7 @@
                 </exclusion>
             </exclusions>
         </dependency>
+        -->
     </dependencies>

     <build>
