From 2b622a20e83d12c7ef1a7aae4a4182aca0b58ba4 Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Sat, 7 Oct 2023 08:40:50 +0200
Subject: [PATCH] OZG-3955 fix javax dependencies

---
 pluto-server/pom.xml                          | 24 +++++++++++++++++++
 .../VorgangAttachedItemServiceITCase.java     |  3 +--
 .../ClientAttributeServiceITCase.java         |  3 +--
 3 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/pluto-server/pom.xml b/pluto-server/pom.xml
index 8fbc67d89..e7eb768f2 100644
--- a/pluto-server/pom.xml
+++ b/pluto-server/pom.xml
@@ -57,6 +57,7 @@
 		<testcontainer.version>1.17.3</testcontainer.version>
 
 		<maven-deploy-plugin.version>3.0.0</maven-deploy-plugin.version>
+		<find-and-replace-maven-plugin.version>1.1.0</find-and-replace-maven-plugin.version>
 
 	</properties>
 
@@ -143,6 +144,7 @@
 		<dependency>
 			<groupId>net.devh</groupId>
 			<artifactId>grpc-client-spring-boot-starter</artifactId>
+			<version>2.15.0.RELEASE</version>
 		</dependency>
 
 		<dependency>
@@ -390,6 +392,28 @@
 					</dependency>
 				</dependencies>
 			</plugin>
+			<plugin>
+				<groupId>io.github.floverfelt</groupId>
+				<artifactId>find-and-replace-maven-plugin</artifactId>
+				<version>${find-and-replace-maven-plugin.version}</version>
+				<executions>
+					<execution>
+						<id>exec</id>
+						<phase>process-sources</phase>
+						<goals>
+							<goal>find-and-replace</goal>
+						</goals>
+						<configuration>
+							<replacementType>file-contents</replacementType>
+							<baseDir>target/generated-sources/</baseDir>
+							<findRegex>javax</findRegex>
+							<replaceValue>jakarta</replaceValue>
+							<recursive>true</recursive>
+							<fileMask>.java</fileMask>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
 		</plugins>
 	</build>
 
diff --git a/pluto-server/src/test/java/de/itvsh/ozg/pluto/attached_item/VorgangAttachedItemServiceITCase.java b/pluto-server/src/test/java/de/itvsh/ozg/pluto/attached_item/VorgangAttachedItemServiceITCase.java
index 9f9cd1cd5..81ca40075 100644
--- a/pluto-server/src/test/java/de/itvsh/ozg/pluto/attached_item/VorgangAttachedItemServiceITCase.java
+++ b/pluto-server/src/test/java/de/itvsh/ozg/pluto/attached_item/VorgangAttachedItemServiceITCase.java
@@ -2,8 +2,6 @@ package de.itvsh.ozg.pluto.attached_item;
 
 import static org.assertj.core.api.Assertions.*;
 
-import javax.validation.ConstraintViolationException;
-
 import org.apache.commons.lang3.StringUtils;
 import org.junit.jupiter.api.Nested;
 import org.junit.jupiter.api.Test;
@@ -13,6 +11,7 @@ import org.springframework.context.ApplicationEventPublisher;
 
 import de.itvsh.kop.common.test.ITCase;
 import de.itvsh.ozg.pluto.command.CommandTestFactory;
+import jakarta.validation.ConstraintViolationException;
 
 @ITCase
 class VorgangAttachedItemServiceITCase {
diff --git a/pluto-server/src/test/java/de/itvsh/ozg/pluto/clientattribute/ClientAttributeServiceITCase.java b/pluto-server/src/test/java/de/itvsh/ozg/pluto/clientattribute/ClientAttributeServiceITCase.java
index ed315ad69..fa019d50e 100644
--- a/pluto-server/src/test/java/de/itvsh/ozg/pluto/clientattribute/ClientAttributeServiceITCase.java
+++ b/pluto-server/src/test/java/de/itvsh/ozg/pluto/clientattribute/ClientAttributeServiceITCase.java
@@ -27,8 +27,6 @@ import static org.assertj.core.api.Assertions.*;
 
 import java.util.Optional;
 
-import javax.validation.ConstraintViolationException;
-
 import org.junit.jupiter.api.Nested;
 import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -36,6 +34,7 @@ import org.springframework.boot.test.mock.mockito.MockBean;
 
 import de.itvsh.kop.common.test.ITCase;
 import de.itvsh.ozg.pluto.vorgang.VorgangTestFactory;
+import jakarta.validation.ConstraintViolationException;
 
 @ITCase
 class ClientAttributeServiceITCase {
-- 
GitLab