From 5d03c0f78c0d9c4dffa5ecfc61b49f6d1c160aa7 Mon Sep 17 00:00:00 2001
From: Robert Butora <robert.butora@inaf.it>
Date: Fri, 8 Nov 2024 11:52:58 +0100
Subject: [PATCH] build: bugfix (slf4j and jjwt lib were not available runtime)

---
 .../auth/neanias}/NeaSigningKeyResolver.java    |  0
 .../auth/neanias}/NeaTokenFilter.java           |  0
 .../auth/neanias}/NeaTokenSettings.java         |  0
 data-access/servlet/pom.xml                     | 17 +++++++++--------
 docker/Dockerfile.soda                          |  4 +---
 5 files changed, 10 insertions(+), 11 deletions(-)
 rename data-access/{servlet/src/main/java/auth/oidc => BACKUP/auth/neanias}/NeaSigningKeyResolver.java (100%)
 rename data-access/{servlet/src/main/java/auth/oidc/webapi => BACKUP/auth/neanias}/NeaTokenFilter.java (100%)
 rename data-access/{servlet/src/main/java/auth/oidc/webapi => BACKUP/auth/neanias}/NeaTokenSettings.java (100%)

diff --git a/data-access/servlet/src/main/java/auth/oidc/NeaSigningKeyResolver.java b/data-access/BACKUP/auth/neanias/NeaSigningKeyResolver.java
similarity index 100%
rename from data-access/servlet/src/main/java/auth/oidc/NeaSigningKeyResolver.java
rename to data-access/BACKUP/auth/neanias/NeaSigningKeyResolver.java
diff --git a/data-access/servlet/src/main/java/auth/oidc/webapi/NeaTokenFilter.java b/data-access/BACKUP/auth/neanias/NeaTokenFilter.java
similarity index 100%
rename from data-access/servlet/src/main/java/auth/oidc/webapi/NeaTokenFilter.java
rename to data-access/BACKUP/auth/neanias/NeaTokenFilter.java
diff --git a/data-access/servlet/src/main/java/auth/oidc/webapi/NeaTokenSettings.java b/data-access/BACKUP/auth/neanias/NeaTokenSettings.java
similarity index 100%
rename from data-access/servlet/src/main/java/auth/oidc/webapi/NeaTokenSettings.java
rename to data-access/BACKUP/auth/neanias/NeaTokenSettings.java
diff --git a/data-access/servlet/pom.xml b/data-access/servlet/pom.xml
index 3b31ed0..3e7c2a4 100644
--- a/data-access/servlet/pom.xml
+++ b/data-access/servlet/pom.xml
@@ -97,24 +97,26 @@
 
           <!-- auth dependencies (mostly caused by jjwt lib) -->
 
-          <!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-jackson -->
+          <!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-api -->
           <dependency>
                   <groupId>io.jsonwebtoken</groupId>
-                  <artifactId>jjwt-jackson</artifactId>
+                  <artifactId>jjwt-api</artifactId>
                   <version>0.12.3</version>
-                  <scope>runtime</scope>
           </dependency>
           <!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-api -->
           <dependency>
                   <groupId>io.jsonwebtoken</groupId>
-                  <artifactId>jjwt-api</artifactId>
+                  <artifactId>jjwt-impl</artifactId>
                   <version>0.12.3</version>
+                  <scope>runtime</scope>
           </dependency>
-          <!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-api -->
+
+          <!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-jackson -->
           <dependency>
                   <groupId>io.jsonwebtoken</groupId>
-                  <artifactId>jjwt-impl</artifactId>
+                  <artifactId>jjwt-jackson</artifactId>
                   <version>0.12.3</version>
+                  <scope>runtime</scope>
           </dependency>
 
           <dependency>
@@ -152,9 +154,8 @@
                   <groupId>org.slf4j</groupId>
                   <artifactId>slf4j-simple</artifactId>
                   <version>1.7.36</version>
-                  <scope>test</scope>
           </dependency>
- 
+
           <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
           <!-- dependency>
                   <groupId>ch.qos.logback</groupId>
diff --git a/docker/Dockerfile.soda b/docker/Dockerfile.soda
index f83f34b..0881920 100644
--- a/docker/Dockerfile.soda
+++ b/docker/Dockerfile.soda
@@ -33,9 +33,7 @@ ARG VLKB_VERSION
 COPY vlkb-${VLKB_VERSION}.deb ./
 COPY vlkb-soda-${VLKB_VERSION}.war ${WEBAPP_DIR}/
 RUN dpkg -i vlkb-${VLKB_VERSION}.deb \
- && cd ${WEBAPP_DIR} && unzip vlkb-soda-${VLKB_VERSION}.war \
- && rm -f $WEBAPP_DIR/WEB-INF/lib/jjwt-*0.11*.jar
-# remove jjwt used by IA2 (IA2 and IAM token filters used different ver of jjwt)
+ && cd ${WEBAPP_DIR} && unzip vlkb-soda-${VLKB_VERSION}.war
 
 
 # configure instance
-- 
GitLab