From 5c5f03bd78da3552258d630381eb1eb9f86d8a14 Mon Sep 17 00:00:00 2001
From: Andreas Svanberg <andreass@dsv.su.se>
Date: Wed, 5 Mar 2025 11:53:10 +0100
Subject: [PATCH] Let Spring Boot manage dependency versions (#124)

Since SciPro is now a Spring Boot-based application it is counter-productive to manage our own dependency versions.
* They could conflict with what Spring Boot assumes
* All libraries that are managed by Spring Boot are tested to work together

QueryDSL and JPA version properties are left in because they're needed for annotation processors (they can't be dependency managed).

Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Reviewed-on: https://gitea.dsv.su.se/DMC/scipro/pulls/124
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
---
 core/pom.xml |   2 -
 pom.xml      | 142 ---------------------------------------------------
 2 files changed, 144 deletions(-)

diff --git a/core/pom.xml b/core/pom.xml
index 532b1d4d04..d2a9506ee7 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -113,12 +113,10 @@
         <dependency>
             <groupId>jakarta.xml.bind</groupId>
             <artifactId>jakarta.xml.bind-api</artifactId>
-            <version>4.0.2</version>
         </dependency>
         <dependency>
             <groupId>org.glassfish.jaxb</groupId>
             <artifactId>jaxb-runtime</artifactId>
-            <version>4.0.5</version>
             <scope>runtime</scope>
         </dependency>
     </dependencies>
diff --git a/pom.xml b/pom.xml
index 896b1269e5..f79b662c36 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,23 +23,10 @@
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
         <!-- Dependency versions -->
-        <slf4j.version>2.0.7</slf4j.version>
-        <log4j2.version>2.20.0</log4j2.version>
         <wicket.version>10.4.0</wicket.version>
-
-        <!-- See https://hibernate.org/orm/releases/ for which version Hibernate implements -->
         <jakarta.persistence-api.version>3.1.0</jakarta.persistence-api.version>
-        <hibernate.version>6.5.0.Final</hibernate.version>
-        <mariadb-java-client.version>3.2.0</mariadb-java-client.version>
-
         <querydsl.version>5.0.0</querydsl.version>
-        <jakarta.servlet.version>5.0.0</jakarta.servlet.version>
-        <junit.version>5.9.3</junit.version>
-        <mockito.version>5.3.1</mockito.version>
-        <flyway.version>9.19.1</flyway.version>
-        <jersey.version>3.1.6</jersey.version>
         <poi.version>5.2.5</poi.version>
-        <jackson.version>2.17.0</jackson.version>
 
         <!--
             When updating spring-boot check if the transitive dependency on json-smart has been
@@ -114,47 +101,6 @@
                 <type>pom</type>
             </dependency>
 
-            <!--  Servlet API, needed for compilation. -->
-            <dependency>
-                <groupId>jakarta.servlet</groupId>
-                <artifactId>jakarta.servlet-api</artifactId>
-                <version>${jakarta.servlet.version}</version>
-                <scope>provided</scope>
-            </dependency>
-
-            <!-- LOGGING DEPENDENCIES -->
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-api</artifactId>
-                <version>${slf4j.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>jcl-over-slf4j</artifactId>
-                <version>${slf4j.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.logging.log4j</groupId>
-                <artifactId>log4j-bom</artifactId>
-                <version>${log4j2.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-
-            <dependency>
-                <groupId>org.mariadb.jdbc</groupId>
-                <artifactId>mariadb-java-client</artifactId>
-                <version>${mariadb-java-client.version}</version>
-            </dependency>
-
-            <!--QueryDSL-->
-            <dependency>
-                <groupId>com.querydsl</groupId>
-                <artifactId>querydsl-bom</artifactId>
-                <version>${querydsl.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
             <dependency>
                 <groupId>com.querydsl</groupId>
                 <artifactId>querydsl-jpa</artifactId>
@@ -162,41 +108,6 @@
                 <classifier>jakarta</classifier>
             </dependency>
 
-            <!-- JPA -->
-            <dependency>
-                <groupId>jakarta.persistence</groupId>
-                <artifactId>jakarta.persistence-api</artifactId>
-                <version>${jakarta.persistence-api.version}</version>
-            </dependency>
-            <!-- Hibernate impl -->
-            <dependency>
-                <groupId>org.hibernate.orm</groupId>
-                <artifactId>hibernate-core</artifactId>
-                <version>${hibernate.version}</version>
-                <scope>runtime</scope>
-            </dependency>
-
-            <!-- Jersey/Jax-Rs -->
-            <dependency>
-                <groupId>jakarta.ws.rs</groupId>
-                <artifactId>jakarta.ws.rs-api</artifactId>
-                <version>3.1.0</version>
-            </dependency>
-            <dependency>
-                <groupId>org.glassfish.jersey</groupId>
-                <artifactId>jersey-bom</artifactId>
-                <version>${jersey.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-            <dependency>
-                <groupId>com.fasterxml.jackson</groupId>
-                <artifactId>jackson-bom</artifactId>
-                <version>${jackson.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-
             <!-- Additional dependencies -->
             <dependency>
                 <groupId>com.google.guava</groupId>
@@ -204,22 +115,6 @@
                 <version>32.0.1-jre</version>
             </dependency>
 
-            <dependency>
-                <groupId>jakarta.mail</groupId>
-                <artifactId>jakarta.mail-api</artifactId>
-                <version>2.1.3</version>
-            </dependency>
-            <dependency>
-                <groupId>jakarta.activation</groupId>
-                <artifactId>jakarta.activation-api</artifactId>
-                <version>2.1.3</version>
-            </dependency>
-            <dependency>
-                <groupId>org.eclipse.angus</groupId>
-                <artifactId>jakarta.mail</artifactId>
-                <version>2.0.2</version>
-                <scope>runtime</scope>
-            </dependency>
             <dependency>
                 <!--
                 2.5.1 is brought in transitively by
@@ -235,32 +130,6 @@
                 <version>2.5.2</version>
             </dependency>
 
-            <!-- Test stuff -->
-            <dependency>
-                <groupId>org.junit</groupId>
-                <artifactId>junit-bom</artifactId>
-                <version>${junit.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.mockito</groupId>
-                <artifactId>mockito-core</artifactId>
-                <version>${mockito.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.mockito</groupId>
-                <artifactId>mockito-junit-jupiter</artifactId>
-                <version>${mockito.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.hamcrest</groupId>
-                <artifactId>hamcrest</artifactId>
-                <version>2.2</version>
-                <scope>test</scope>
-            </dependency>
             <dependency>
                 <groupId>org.apache.poi</groupId>
                 <artifactId>poi</artifactId>
@@ -271,16 +140,6 @@
                 <artifactId>poi-ooxml</artifactId>
                 <version>${poi.version}</version>
             </dependency>
-            <dependency>
-                <groupId>org.flywaydb</groupId>
-                <artifactId>flyway-core</artifactId>
-                <version>${flyway.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.flywaydb</groupId>
-                <artifactId>flyway-mysql</artifactId>
-                <version>${flyway.version}</version>
-            </dependency>
             <dependency>
                 <groupId>org.springdoc</groupId>
                 <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
@@ -320,7 +179,6 @@
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-simple</artifactId>
-            <version>${slf4j.version}</version>
             <scope>test</scope>
         </dependency>
     </dependencies>