From 7ac559f83a93a080e7eb747843370316bff67d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Manteaux?= Date: Mon, 14 Oct 2024 16:45:58 +0200 Subject: [PATCH] Plume and Jakarta update --- pom.xml | 18 ++--------------- .../com/coreoz/db/DatabaseInitializer.java | 4 ++-- .../java/com/coreoz/jersey/GrizzlySetup.java | 2 +- .../coreoz/jersey/JerseyConfigProvider.java | 6 +++--- .../configuration/ConfigurationService.java | 4 ++-- .../ProjectAdminPermissionService.java | 4 ++-- .../com/coreoz/webservices/api/ExampleWs.java | 16 +++++++-------- .../webservices/api/file/FileUploadWs.java | 20 +++++++++---------- .../internal/InternalApiAuthenticator.java | 4 ++-- .../webservices/internal/MonitoringWs.java | 18 ++++++++--------- .../webservices/internal/SwaggerWs.java | 16 +++++++-------- .../coreoz/guice/TestableTimeProvider.java | 2 +- .../integration/SampleIntegrationTest.java | 2 +- 13 files changed, 51 insertions(+), 65 deletions(-) diff --git a/pom.xml b/pom.xml index a763709..fa598e6 100644 --- a/pom.xml +++ b/pom.xml @@ -14,8 +14,7 @@ 17 17 - 4.3.4 - 3.1.0 + 4.3.5-SNAPSHOT @@ -130,18 +129,10 @@ jersey-container-grizzly2-http - - - javax.servlet - javax.servlet-api - 3.1.0 - provided - - io.swagger.core.v3 - swagger-jaxrs2 + swagger-jaxrs2-jakarta org.webjars @@ -171,27 +162,22 @@ com.coreoz plume-file-core - ${plume-file.version} com.coreoz plume-file-metadata-database - ${plume-file.version} com.coreoz plume-file-storage-database - ${plume-file.version} com.coreoz plume-file-web-download-jersey - ${plume-file.version} com.coreoz plume-file-web-upload-jersey - ${plume-file.version} diff --git a/src/main/java/com/coreoz/db/DatabaseInitializer.java b/src/main/java/com/coreoz/db/DatabaseInitializer.java index 8f12be2..8990493 100644 --- a/src/main/java/com/coreoz/db/DatabaseInitializer.java +++ b/src/main/java/com/coreoz/db/DatabaseInitializer.java @@ -1,7 +1,7 @@ package com.coreoz.db; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import javax.sql.DataSource; import org.flywaydb.core.Flyway; diff --git a/src/main/java/com/coreoz/jersey/GrizzlySetup.java b/src/main/java/com/coreoz/jersey/GrizzlySetup.java index 63e1eff..7dd3bd4 100644 --- a/src/main/java/com/coreoz/jersey/GrizzlySetup.java +++ b/src/main/java/com/coreoz/jersey/GrizzlySetup.java @@ -3,7 +3,7 @@ import java.io.IOException; import java.net.URI; -import javax.ws.rs.core.UriBuilder; +import jakarta.ws.rs.core.UriBuilder; import org.glassfish.grizzly.http.server.CLStaticHttpHandler; import org.glassfish.grizzly.http.server.HttpServer; diff --git a/src/main/java/com/coreoz/jersey/JerseyConfigProvider.java b/src/main/java/com/coreoz/jersey/JerseyConfigProvider.java index 6e4c7cd..f948127 100644 --- a/src/main/java/com/coreoz/jersey/JerseyConfigProvider.java +++ b/src/main/java/com/coreoz/jersey/JerseyConfigProvider.java @@ -1,8 +1,8 @@ package com.coreoz.jersey; -import javax.inject.Inject; -import javax.inject.Provider; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Provider; +import jakarta.inject.Singleton; import org.glassfish.hk2.utilities.binding.AbstractBinder; import org.glassfish.jersey.media.multipart.MultiPartFeature; diff --git a/src/main/java/com/coreoz/services/configuration/ConfigurationService.java b/src/main/java/com/coreoz/services/configuration/ConfigurationService.java index 0b0ff6c..14634c1 100644 --- a/src/main/java/com/coreoz/services/configuration/ConfigurationService.java +++ b/src/main/java/com/coreoz/services/configuration/ConfigurationService.java @@ -1,7 +1,7 @@ package com.coreoz.services.configuration; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import com.typesafe.config.Config; diff --git a/src/main/java/com/coreoz/webservices/admin/permissions/ProjectAdminPermissionService.java b/src/main/java/com/coreoz/webservices/admin/permissions/ProjectAdminPermissionService.java index ed1742a..41d31af 100644 --- a/src/main/java/com/coreoz/webservices/admin/permissions/ProjectAdminPermissionService.java +++ b/src/main/java/com/coreoz/webservices/admin/permissions/ProjectAdminPermissionService.java @@ -5,8 +5,8 @@ import com.coreoz.plume.admin.services.permissions.AdminPermissionService; import com.coreoz.plume.admin.services.permissions.AdminPermissions; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import java.util.Set; @Singleton diff --git a/src/main/java/com/coreoz/webservices/api/ExampleWs.java b/src/main/java/com/coreoz/webservices/api/ExampleWs.java index a279109..1f7e2e2 100644 --- a/src/main/java/com/coreoz/webservices/api/ExampleWs.java +++ b/src/main/java/com/coreoz/webservices/api/ExampleWs.java @@ -1,7 +1,7 @@ package com.coreoz.webservices.api; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import com.coreoz.plume.jersey.security.permission.PublicApi; import com.coreoz.services.configuration.ConfigurationService; @@ -10,12 +10,12 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; @Path("/example") @Tag(name = "example", description = "Manage exemple web-services") diff --git a/src/main/java/com/coreoz/webservices/api/file/FileUploadWs.java b/src/main/java/com/coreoz/webservices/api/file/FileUploadWs.java index 0399c6c..6230817 100644 --- a/src/main/java/com/coreoz/webservices/api/file/FileUploadWs.java +++ b/src/main/java/com/coreoz/webservices/api/file/FileUploadWs.java @@ -11,16 +11,16 @@ import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataParam; -import javax.inject.Inject; -import javax.inject.Singleton; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.container.ContainerRequestContext; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.container.ContainerRequestContext; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import java.io.InputStream; import java.util.Set; diff --git a/src/main/java/com/coreoz/webservices/internal/InternalApiAuthenticator.java b/src/main/java/com/coreoz/webservices/internal/InternalApiAuthenticator.java index edb6460..ceea13d 100644 --- a/src/main/java/com/coreoz/webservices/internal/InternalApiAuthenticator.java +++ b/src/main/java/com/coreoz/webservices/internal/InternalApiAuthenticator.java @@ -1,7 +1,7 @@ package com.coreoz.webservices.internal; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import com.coreoz.plume.jersey.security.basic.BasicAuthenticator; import com.coreoz.services.configuration.ConfigurationService; diff --git a/src/main/java/com/coreoz/webservices/internal/MonitoringWs.java b/src/main/java/com/coreoz/webservices/internal/MonitoringWs.java index fb0261d..f45e2f0 100644 --- a/src/main/java/com/coreoz/webservices/internal/MonitoringWs.java +++ b/src/main/java/com/coreoz/webservices/internal/MonitoringWs.java @@ -2,15 +2,15 @@ import java.util.Map; -import javax.inject.Inject; -import javax.inject.Provider; -import javax.inject.Singleton; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.container.ContainerRequestContext; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.inject.Provider; +import jakarta.inject.Singleton; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.container.ContainerRequestContext; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; import com.codahale.metrics.Metric; import com.coreoz.plume.db.transaction.TransactionManager; diff --git a/src/main/java/com/coreoz/webservices/internal/SwaggerWs.java b/src/main/java/com/coreoz/webservices/internal/SwaggerWs.java index e0b70dc..2ec1a8b 100644 --- a/src/main/java/com/coreoz/webservices/internal/SwaggerWs.java +++ b/src/main/java/com/coreoz/webservices/internal/SwaggerWs.java @@ -3,14 +3,14 @@ import java.util.List; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Singleton; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.container.ContainerRequestContext; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.container.ContainerRequestContext; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; import com.coreoz.plume.jersey.security.basic.BasicAuthenticator; import com.coreoz.plume.jersey.security.permission.PublicApi; diff --git a/src/test/java/com/coreoz/guice/TestableTimeProvider.java b/src/test/java/com/coreoz/guice/TestableTimeProvider.java index 732a23e..10d92d7 100644 --- a/src/test/java/com/coreoz/guice/TestableTimeProvider.java +++ b/src/test/java/com/coreoz/guice/TestableTimeProvider.java @@ -2,7 +2,7 @@ import com.coreoz.plume.services.time.TimeProvider; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import java.time.Clock; import java.time.Instant; import java.time.ZoneId; diff --git a/src/test/java/com/coreoz/integration/SampleIntegrationTest.java b/src/test/java/com/coreoz/integration/SampleIntegrationTest.java index 47878ee..54ef518 100644 --- a/src/test/java/com/coreoz/integration/SampleIntegrationTest.java +++ b/src/test/java/com/coreoz/integration/SampleIntegrationTest.java @@ -8,7 +8,7 @@ import org.junit.Test; import org.junit.runner.RunWith; -import javax.inject.Inject; +import jakarta.inject.Inject; /** * An integration test sample.