diff --git a/pom.xml b/pom.xml index 2c0a563..763827e 100644 --- a/pom.xml +++ b/pom.xml @@ -20,12 +20,12 @@ org.commonjava service-parent - 4 + 5-SNAPSHOT 4.0.0 org.commonjava.indy.service indy-ui-service - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT Indy UI https://github.com/Commonjava/indy-ui-service Indy UI @@ -42,7 +42,7 @@ 1 https://github.com/Commonjava/indy-ui-service - 1.1 + 1.2-SNAPSHOT false false @@ -124,7 +124,7 @@ io.quarkiverse.quinoa quarkus-quinoa - 1.2.9 + 2.3.2 @@ -137,6 +137,11 @@ quarkus-test-security test + + io.quarkus + quarkus-test-oidc-server + test + io.rest-assured diff --git a/src/main/java/org/commonjava/indy/service/ui/client/AuthClientRequestFilter.java b/src/main/java/org/commonjava/indy/service/ui/client/AuthClientRequestFilter.java index 90910b1..83f97ed 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/AuthClientRequestFilter.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/AuthClientRequestFilter.java @@ -20,13 +20,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.annotation.Priority; -import javax.inject.Inject; -import javax.ws.rs.Priorities; -import javax.ws.rs.client.ClientRequestContext; -import javax.ws.rs.client.ClientRequestFilter; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.ext.Provider; +import jakarta.annotation.Priority; +import jakarta.inject.Inject; +import jakarta.ws.rs.Priorities; +import jakarta.ws.rs.client.ClientRequestContext; +import jakarta.ws.rs.client.ClientRequestFilter; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.ext.Provider; @Provider @Priority( Priorities.AUTHENTICATION ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/admin/MaintenanceServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/admin/MaintenanceServiceClient.java index 511ca73..6561bde 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/admin/MaintenanceServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/admin/MaintenanceServiceClient.java @@ -18,19 +18,19 @@ import org.commonjava.indy.service.ui.models.admin.BatchDeleteRequest; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Path( "/api/admin/maint" ) @RegisterRestClient( configKey = "service-api" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/content/ContentBrowseReGenClient.java b/src/main/java/org/commonjava/indy/service/ui/client/content/ContentBrowseReGenClient.java index 4a5a5de..303f9eb 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/content/ContentBrowseReGenClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/content/ContentBrowseReGenClient.java @@ -20,11 +20,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; import java.util.stream.Collectors; import static org.apache.commons.lang3.StringUtils.isNotBlank; diff --git a/src/main/java/org/commonjava/indy/service/ui/client/content/ContentBrowseServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/content/ContentBrowseServiceClient.java index f9c73bc..756c983 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/content/ContentBrowseServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/content/ContentBrowseServiceClient.java @@ -17,16 +17,16 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Path( "/api/browse/{packageType}/{type: (hosted|group|remote)}/{name}" ) @RegisterRestClient( configKey = "service-api" ) public interface ContentBrowseServiceClient diff --git a/src/main/java/org/commonjava/indy/service/ui/client/content/GenericContentAccessServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/content/GenericContentAccessServiceClient.java index 8a3baf2..9f5698b 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/content/GenericContentAccessServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/content/GenericContentAccessServiceClient.java @@ -17,17 +17,17 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; import static org.commonjava.indy.service.ui.client.Constants.CHECK_CACHE_ONLY; diff --git a/src/main/java/org/commonjava/indy/service/ui/client/content/MavenContentAccessServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/content/MavenContentAccessServiceClient.java index 83d5781..0aae6d5 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/content/MavenContentAccessServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/content/MavenContentAccessServiceClient.java @@ -17,17 +17,17 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; import static org.commonjava.indy.service.ui.client.Constants.CHECK_CACHE_ONLY; diff --git a/src/main/java/org/commonjava/indy/service/ui/client/content/NPMContentAccessServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/content/NPMContentAccessServiceClient.java index 681c4de..750cc4f 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/content/NPMContentAccessServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/content/NPMContentAccessServiceClient.java @@ -18,17 +18,17 @@ import org.commonjava.indy.service.ui.client.Constants; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; @Path( "/api/content/npm/{type: (hosted|group|remote)}/{name}" ) @RegisterRestClient( configKey = "service-api" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/diag/DiagnosticsServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/diag/DiagnosticsServiceClient.java index 5dd547f..84e5b6b 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/diag/DiagnosticsServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/diag/DiagnosticsServiceClient.java @@ -17,12 +17,12 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Response; -import static javax.ws.rs.core.MediaType.TEXT_PLAIN; +import static jakarta.ws.rs.core.MediaType.TEXT_PLAIN; @Path( "/api/diag" ) @RegisterRestClient( configKey = "service-api" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/koji/KojiRepairServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/koji/KojiRepairServiceClient.java index 5a65cab..be7bf8f 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/koji/KojiRepairServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/koji/KojiRepairServiceClient.java @@ -20,17 +20,17 @@ import org.commonjava.indy.service.ui.models.koji.KojiRepairResult; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.SecurityContext; -import javax.ws.rs.core.UriInfo; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.SecurityContext; +import jakarta.ws.rs.core.UriInfo; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Path( "/api/repair/koji" ) @Produces( APPLICATION_JSON ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/nfc/NFCServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/nfc/NFCServiceClient.java index f16cb28..d0b2414 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/nfc/NFCServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/nfc/NFCServiceClient.java @@ -17,15 +17,15 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Response; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Path( "/api/nfc" ) @RegisterRestClient( configKey = "service-api" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/pathmap/PathMappedServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/pathmap/PathMappedServiceClient.java index 41c99b1..f062353 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/pathmap/PathMappedServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/pathmap/PathMappedServiceClient.java @@ -19,18 +19,18 @@ import org.commonjava.indy.service.ui.models.pathmap.PathMappedListResult; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.SecurityContext; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Path( "/api/admin/pathmapped" ) @RegisterRestClient( configKey = "service-api" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/promote/PromoteAdminServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/promote/PromoteAdminServiceClient.java index 763ca72..52fa8ad 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/promote/PromoteAdminServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/promote/PromoteAdminServiceClient.java @@ -17,16 +17,16 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -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.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; -import javax.ws.rs.core.UriInfo; +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.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.SecurityContext; +import jakarta.ws.rs.core.UriInfo; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Path( PromoteAdminServiceClient.PROMOTION_ADMIN_API ) @RegisterRestClient( configKey = "service-api" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/promote/PromoteServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/promote/PromoteServiceClient.java index f4e1d81..5c09af1 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/promote/PromoteServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/promote/PromoteServiceClient.java @@ -18,15 +18,15 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; import org.jboss.resteasy.spi.HttpRequest; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Path( "/api/promotion" ) @Produces( APPLICATION_JSON ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/repository/RepositoryAdminServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/repository/RepositoryAdminServiceClient.java index 1d7f027..01ba033 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/repository/RepositoryAdminServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/repository/RepositoryAdminServiceClient.java @@ -20,20 +20,20 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; import org.jboss.resteasy.spi.HttpRequest; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; @Path( "/api/admin/stores/{packageType}/{type: (hosted|group|remote)}" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/repository/RepositoryMaintServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/repository/RepositoryMaintServiceClient.java index 24c9ea9..ea9ef7d 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/repository/RepositoryMaintServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/repository/RepositoryMaintServiceClient.java @@ -18,15 +18,15 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; import org.jboss.resteasy.spi.HttpRequest; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Path( "/api/admin/stores/maint" ) @RegisterRestClient( configKey = "service-api" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/repository/RepositoryQueryServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/repository/RepositoryQueryServiceClient.java index e5a3746..da6d2fa 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/repository/RepositoryQueryServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/repository/RepositoryQueryServiceClient.java @@ -18,15 +18,15 @@ import org.eclipse.microprofile.openapi.annotations.parameters.Parameter; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.ws.rs.Encoded; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Response; - -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import jakarta.ws.rs.Encoded; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Response; + +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Path( "/api/admin/stores/query" ) @RegisterRestClient( configKey = "service-api" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/schedule/SchedulerServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/schedule/SchedulerServiceClient.java index 800320a..c56ba41 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/schedule/SchedulerServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/schedule/SchedulerServiceClient.java @@ -23,13 +23,13 @@ import org.eclipse.microprofile.openapi.annotations.parameters.Parameter; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -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.Response; +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.Response; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Path( "/api/admin/schedule" ) @Produces( APPLICATION_JSON ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/stats/StatsClient.java b/src/main/java/org/commonjava/indy/service/ui/client/stats/StatsClient.java index 8785b90..7dc36e2 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/stats/StatsClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/stats/StatsClient.java @@ -17,14 +17,14 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; - -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; + +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Path( "/api/stats" ) @RegisterRestClient( configKey = "service-api" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloAdminClient.java b/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloAdminClient.java index cbb2789..674f3d9 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloAdminClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloAdminClient.java @@ -21,21 +21,21 @@ import org.eclipse.microprofile.openapi.annotations.responses.APIResponse; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; import java.io.File; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; @Path( "/api/folo/admin" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloGenericContentAccessServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloGenericContentAccessServiceClient.java index 9da1640..80386b4 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloGenericContentAccessServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloGenericContentAccessServiceClient.java @@ -18,16 +18,16 @@ import org.commonjava.indy.service.ui.client.Constants; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; @Path( "/api/folo/track/{id}/generic-http/{type: (hosted|group|remote)}/{name}" ) @RegisterRestClient( configKey = "service-api" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloMavenContentAccessServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloMavenContentAccessServiceClient.java index 2850422..6a7a61f 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloMavenContentAccessServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloMavenContentAccessServiceClient.java @@ -18,16 +18,16 @@ import org.commonjava.indy.service.ui.client.Constants; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; @Path( "/api/folo/track/{id}/maven/{type: (hosted|group|remote)}/{name}" ) @RegisterRestClient( configKey = "service-api" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloNPMContentAccessServiceClient.java b/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloNPMContentAccessServiceClient.java index 348f6b2..749643f 100644 --- a/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloNPMContentAccessServiceClient.java +++ b/src/main/java/org/commonjava/indy/service/ui/client/tracking/FoloNPMContentAccessServiceClient.java @@ -18,16 +18,16 @@ import org.commonjava.indy.service.ui.client.Constants; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; @Path( "/api/folo/track/{id}/npm/{type: (hosted|group|remote)}/{name}" ) @RegisterRestClient( configKey = "service-api" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/conf/ContentBrowseConfig.java b/src/main/java/org/commonjava/indy/service/ui/conf/ContentBrowseConfig.java index c4a133b..3bbd05d 100644 --- a/src/main/java/org/commonjava/indy/service/ui/conf/ContentBrowseConfig.java +++ b/src/main/java/org/commonjava/indy/service/ui/conf/ContentBrowseConfig.java @@ -19,7 +19,7 @@ import io.smallrye.config.WithDefault; import io.smallrye.config.WithName; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import java.util.Optional; @ApplicationScoped diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/ResponseHelper.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/ResponseHelper.java index 90323fe..fdda382 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/ResponseHelper.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/ResponseHelper.java @@ -21,18 +21,18 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.ResponseBuilder; -import javax.ws.rs.core.Response.Status; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.ResponseBuilder; +import jakarta.ws.rs.core.Response.Status; import java.io.PrintWriter; import java.io.StringWriter; import java.util.function.Consumer; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @ApplicationScoped public class ResponseHelper diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/admin/MaintenanceResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/admin/MaintenanceResource.java index 4daa503..e41806a 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/admin/MaintenanceResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/admin/MaintenanceResource.java @@ -27,20 +27,20 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Tag( name = "Maintenance", description = "Basic repository maintenance functions" ) @Path( "/api/admin/maint" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/auth/AuthResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/auth/AuthResource.java index 8335a8d..3528c54 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/auth/AuthResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/auth/AuthResource.java @@ -26,14 +26,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; import java.net.URI; import java.security.Principal; import java.util.Collections; diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/ContentBrowseResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/ContentBrowseResource.java index 6caef13..dd07e7a 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/ContentBrowseResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/ContentBrowseResource.java @@ -26,17 +26,17 @@ import org.eclipse.microprofile.openapi.annotations.responses.APIResponses; import org.eclipse.microprofile.openapi.annotations.tags.Tag; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; @Tag( name = "Indy Directory Content Browse", description = "Browse directory content in indy repository" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/GenericContentAccessResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/GenericContentAccessResource.java index f2dc2ff..acb1621 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/GenericContentAccessResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/GenericContentAccessResource.java @@ -28,20 +28,20 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.StreamingOutput; -import javax.ws.rs.core.UriInfo; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.StreamingOutput; +import jakarta.ws.rs.core.UriInfo; import static org.commonjava.indy.service.ui.client.Constants.CHECK_CACHE_ONLY; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/MavenContentAccessResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/MavenContentAccessResource.java index 4460779..29aaa16 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/MavenContentAccessResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/MavenContentAccessResource.java @@ -31,19 +31,19 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.StreamingOutput; -import javax.ws.rs.core.UriInfo; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.StreamingOutput; +import jakarta.ws.rs.core.UriInfo; import java.io.InputStream; import static org.commonjava.indy.service.ui.client.Constants.CHECK_CACHE_ONLY; diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/NPMContentAccessResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/NPMContentAccessResource.java index 4db5639..d58d345 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/NPMContentAccessResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/content/NPMContentAccessResource.java @@ -28,20 +28,20 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.StreamingOutput; -import javax.ws.rs.core.UriInfo; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.StreamingOutput; +import jakarta.ws.rs.core.UriInfo; import static org.commonjava.indy.service.ui.client.Constants.CHECK_CACHE_ONLY; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/diag/DiagnosticsResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/diag/DiagnosticsResource.java index 80125fa..4f31651 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/diag/DiagnosticsResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/diag/DiagnosticsResource.java @@ -23,16 +23,16 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.StreamingOutput; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.StreamingOutput; import java.io.InputStream; -import static javax.ws.rs.core.MediaType.TEXT_PLAIN; +import static jakarta.ws.rs.core.MediaType.TEXT_PLAIN; /** * REST resource to expose diagnostic retrieval options diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/koji/KojiRepairResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/koji/KojiRepairResource.java index 2f66c74..d9db00a 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/koji/KojiRepairResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/koji/KojiRepairResource.java @@ -28,18 +28,18 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.SecurityContext; -import javax.ws.rs.core.UriInfo; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.SecurityContext; +import jakarta.ws.rs.core.UriInfo; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.QUERY; @Tag( name = "Koji repairVolume operation", description = "Repair Koji remote repositories." ) diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/nfc/NfcResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/nfc/NfcResource.java index 13d475d..3c5e870 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/nfc/NfcResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/nfc/NfcResource.java @@ -26,16 +26,16 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.inject.Inject; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Response; +import jakarta.inject.Inject; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Response; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; @Tag( description = "REST resource that manages the not-found cache", name = "Not-Found Cache" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/pathmap/PathMappedResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/pathmap/PathMappedResource.java index 96fe94c..4735af6 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/pathmap/PathMappedResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/pathmap/PathMappedResource.java @@ -28,19 +28,19 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.SecurityContext; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static org.commonjava.indy.service.ui.client.pathmap.PathMappedServiceClient.BROWSE_BASE; import static org.commonjava.indy.service.ui.client.pathmap.PathMappedServiceClient.CONCRETE_CONTENT_PATH; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/promote/PromoteAdminResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/promote/PromoteAdminResource.java index a5eaa48..7a998fb 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/promote/PromoteAdminResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/promote/PromoteAdminResource.java @@ -23,18 +23,18 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -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.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; -import javax.ws.rs.core.UriInfo; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +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.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.SecurityContext; +import jakarta.ws.rs.core.UriInfo; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Tag( name = "Promote Administration", description = "Resource for managing configurations for promotion." ) @Path( PromoteAdminServiceClient.PROMOTION_ADMIN_API ) diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/promote/PromoteResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/promote/PromoteResource.java index 27beea3..9a47051 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/promote/PromoteResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/promote/PromoteResource.java @@ -27,17 +27,17 @@ import org.eclipse.microprofile.rest.client.inject.RestClient; import org.jboss.resteasy.spi.HttpRequest; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Tag( name = "Content Promotion", description = "Promote content from a source repository to a target repository." ) @Path( "/api/promotion" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/repository/RepositoryAdminResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/repository/RepositoryAdminResource.java index 4dd06ab..4d037d6 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/repository/RepositoryAdminResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/repository/RepositoryAdminResource.java @@ -33,27 +33,27 @@ import org.eclipse.microprofile.rest.client.inject.RestClient; import org.jboss.resteasy.spi.HttpRequest; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; import java.io.IOException; import java.nio.charset.Charset; import java.util.Map; import java.util.function.Function; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; @Tag( name = "Store Administration", description = "Resource for accessing and managing artifact store definitions" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/repository/RepositoryMaintenanceResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/repository/RepositoryMaintenanceResource.java index 5ba6041..5397680 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/repository/RepositoryMaintenanceResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/repository/RepositoryMaintenanceResource.java @@ -22,17 +22,17 @@ import org.eclipse.microprofile.rest.client.inject.RestClient; import org.jboss.resteasy.spi.HttpRequest; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static org.commonjava.indy.service.ui.client.repository.RepositoryMaintServiceClient.MEDIATYPE_APPLICATION_ZIP; @Tag( name = "Store Administration", description = "Resource for accessing and managing artifact store definitions" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/repository/RepositoryQueryResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/repository/RepositoryQueryResource.java index 995994c..99cb37f 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/repository/RepositoryQueryResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/repository/RepositoryQueryResource.java @@ -29,18 +29,18 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.Encoded; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Encoded; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Response; import java.util.Map; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.QUERY; diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/schedule/SchedulerResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/schedule/SchedulerResource.java index 268d120..586d040 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/schedule/SchedulerResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/schedule/SchedulerResource.java @@ -28,14 +28,14 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.inject.Inject; -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.Response; +import jakarta.inject.Inject; +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.Response; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @Tag( name = "Schedules and Expirations", description = "Retrieve and manipulate scheduled expirations for various parts of Indy" ) diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/stats/StatsResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/stats/StatsResource.java index 7b54c49..c8f3615 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/stats/StatsResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/stats/StatsResource.java @@ -31,16 +31,16 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; import java.util.Map; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static org.commonjava.indy.service.ui.util.ResourceUtils.loadClasspathContent; @Tag( description = "Various read-only operations for retrieving information about the system.", diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloAdminResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloAdminResource.java index 1698124..b479684 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloAdminResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloAdminResource.java @@ -26,23 +26,23 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; import java.io.File; import java.util.List; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static org.commonjava.indy.service.ui.client.tracking.FoloAdminClient.MEDIATYPE_APPLICATION_ZIP; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloGenericContentAccessResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloGenericContentAccessResource.java index 17e317f..71c6c4c 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloGenericContentAccessResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloGenericContentAccessResource.java @@ -27,18 +27,18 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.StreamingOutput; -import javax.ws.rs.core.UriInfo; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.StreamingOutput; +import jakarta.ws.rs.core.UriInfo; import static org.commonjava.indy.service.ui.client.Constants.CHECK_CACHE_ONLY; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloMavenContentAccessResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloMavenContentAccessResource.java index 054e647..ff70f59 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloMavenContentAccessResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloMavenContentAccessResource.java @@ -27,18 +27,18 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.StreamingOutput; -import javax.ws.rs.core.UriInfo; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.StreamingOutput; +import jakarta.ws.rs.core.UriInfo; import static org.commonjava.indy.service.ui.client.Constants.CHECK_CACHE_ONLY; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; diff --git a/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloNPMContentAccessResource.java b/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloNPMContentAccessResource.java index 4199301..80467c3 100644 --- a/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloNPMContentAccessResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/jaxrs/tracking/FoloNPMContentAccessResource.java @@ -27,18 +27,18 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.StreamingOutput; -import javax.ws.rs.core.UriInfo; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.StreamingOutput; +import jakarta.ws.rs.core.UriInfo; import static org.commonjava.indy.service.ui.client.Constants.CHECK_CACHE_ONLY; import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH; diff --git a/src/main/java/org/commonjava/indy/service/ui/keycloak/KeycloakConfig.java b/src/main/java/org/commonjava/indy/service/ui/keycloak/KeycloakConfig.java index 74ddafb..c536d43 100644 --- a/src/main/java/org/commonjava/indy/service/ui/keycloak/KeycloakConfig.java +++ b/src/main/java/org/commonjava/indy/service/ui/keycloak/KeycloakConfig.java @@ -20,7 +20,7 @@ import io.smallrye.config.WithDefault; import io.smallrye.config.WithName; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import java.util.Optional; import java.util.Properties; diff --git a/src/main/java/org/commonjava/indy/service/ui/keycloak/SecurityController.java b/src/main/java/org/commonjava/indy/service/ui/keycloak/SecurityController.java index cb7416b..c32c54b 100644 --- a/src/main/java/org/commonjava/indy/service/ui/keycloak/SecurityController.java +++ b/src/main/java/org/commonjava/indy/service/ui/keycloak/SecurityController.java @@ -22,7 +22,7 @@ import org.commonjava.indy.service.ui.exception.IndyUIException; import org.commonjava.indy.service.ui.util.UrlUtils; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; diff --git a/src/main/java/org/commonjava/indy/service/ui/keycloak/SecurityResource.java b/src/main/java/org/commonjava/indy/service/ui/keycloak/SecurityResource.java index f53a7bc..bbc6af1 100644 --- a/src/main/java/org/commonjava/indy/service/ui/keycloak/SecurityResource.java +++ b/src/main/java/org/commonjava/indy/service/ui/keycloak/SecurityResource.java @@ -24,16 +24,16 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import java.net.URI; import java.net.URISyntaxException; -import static javax.ws.rs.core.HttpHeaders.CACHE_CONTROL; +import static jakarta.ws.rs.core.HttpHeaders.CACHE_CONTROL; /** * @deprecated Will use quarkus native oidc implementation. This is not needed anymore diff --git a/src/main/java/org/commonjava/indy/service/ui/models/stats/IndyVersioning.java b/src/main/java/org/commonjava/indy/service/ui/models/stats/IndyVersioning.java index e097455..c9050c9 100644 --- a/src/main/java/org/commonjava/indy/service/ui/models/stats/IndyVersioning.java +++ b/src/main/java/org/commonjava/indy/service/ui/models/stats/IndyVersioning.java @@ -18,8 +18,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import javax.enterprise.inject.Alternative; -import javax.inject.Named; +import jakarta.enterprise.inject.Alternative; +import jakarta.inject.Named; @Alternative @Named diff --git a/src/main/java/org/commonjava/indy/service/ui/util/MimeTyper.java b/src/main/java/org/commonjava/indy/service/ui/util/MimeTyper.java index a531c0b..f118b30 100644 --- a/src/main/java/org/commonjava/indy/service/ui/util/MimeTyper.java +++ b/src/main/java/org/commonjava/indy/service/ui/util/MimeTyper.java @@ -18,8 +18,8 @@ import org.apache.commons.io.IOUtils; import org.slf4j.LoggerFactory; -import javax.activation.MimetypesFileTypeMap; -import javax.enterprise.context.ApplicationScoped; +import jakarta.activation.MimetypesFileTypeMap; +import jakarta.enterprise.context.ApplicationScoped; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; diff --git a/src/main/java/org/commonjava/indy/service/ui/util/jackson/JacksonCustomizer.java b/src/main/java/org/commonjava/indy/service/ui/util/jackson/JacksonCustomizer.java index debc5fe..5c5bb47 100644 --- a/src/main/java/org/commonjava/indy/service/ui/util/jackson/JacksonCustomizer.java +++ b/src/main/java/org/commonjava/indy/service/ui/util/jackson/JacksonCustomizer.java @@ -26,9 +26,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import java.util.HashSet; import java.util.Set; diff --git a/src/main/java/org/commonjava/indy/service/ui/web/ContentBrowseUIServlet.java b/src/main/java/org/commonjava/indy/service/ui/web/ContentBrowseUIServlet.java index c9483c2..230e1e5 100644 --- a/src/main/java/org/commonjava/indy/service/ui/web/ContentBrowseUIServlet.java +++ b/src/main/java/org/commonjava/indy/service/ui/web/ContentBrowseUIServlet.java @@ -23,15 +23,15 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.spi.CDI; -import javax.inject.Inject; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.core.MediaType; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.spi.CDI; +import jakarta.inject.Inject; +import jakarta.servlet.ServletException; +import jakarta.servlet.annotation.WebServlet; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.ws.rs.core.MediaType; import java.io.File; import java.io.FilenameFilter; import java.io.IOException; @@ -44,11 +44,11 @@ import java.nio.file.Path; import java.nio.file.Paths; -import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST; -import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR; -import static javax.servlet.http.HttpServletResponse.SC_METHOD_NOT_ALLOWED; -import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND; -import static javax.servlet.http.HttpServletResponse.SC_OK; +import static jakarta.servlet.http.HttpServletResponse.SC_BAD_REQUEST; +import static jakarta.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR; +import static jakarta.servlet.http.HttpServletResponse.SC_METHOD_NOT_ALLOWED; +import static jakarta.servlet.http.HttpServletResponse.SC_NOT_FOUND; +import static jakarta.servlet.http.HttpServletResponse.SC_OK; @ApplicationScoped @WebServlet( urlPatterns = { ContentBrowseUIServlet.PATH } ) diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index cef88c0..c28279d 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -52,7 +52,7 @@ quarkus: security: auth: enabled-in-dev-mode: false - opentelemetry: + otel: enabled: true log: level: INFO @@ -99,8 +99,8 @@ quarkus: package-manager-command: install-env: strict-ssl: false - install: "npm config set strict-ssl false && npm ci" - build: "npm run build-no-test" + install: "config set strict-ssl false && npm ci" + build: "run build-no-test" # These REST APIs are not needed to show in rest docs mp: @@ -118,7 +118,7 @@ indy_security: ## [rest client] service-api/mp-rest/uri: http://localhost:8080/ -service-api/mp-rest/scope: javax.inject.Singleton +service-api/mp-rest/scope: jakarta.inject.Singleton service-api/mp-rest/connectTimeout: 60000 service-api/mp-rest/readTimeout: 60000 service-api/mp-rest/providers: org.commonjava.indy.service.ui.client.AuthClientRequestFilter diff --git a/src/test/java/org/commonjava/indy/service/ui/jaxrs/auth/AuthResourceTest.java b/src/test/java/org/commonjava/indy/service/ui/jaxrs/auth/AuthResourceTest.java index ee10331..c1d83dd 100644 --- a/src/test/java/org/commonjava/indy/service/ui/jaxrs/auth/AuthResourceTest.java +++ b/src/test/java/org/commonjava/indy/service/ui/jaxrs/auth/AuthResourceTest.java @@ -15,14 +15,15 @@ */ package org.commonjava.indy.service.ui.jaxrs.auth; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.TestProfile; +import io.quarkus.test.oidc.server.OidcWiremockTestResource; import io.quarkus.test.security.TestSecurity; import io.restassured.path.json.JsonPath; +import jakarta.ws.rs.core.Response; import org.junit.jupiter.api.Test; -import javax.ws.rs.core.Response; - import static io.restassured.RestAssured.given; import static org.hamcrest.CoreMatchers.hasItems; import static org.hamcrest.CoreMatchers.is; @@ -30,6 +31,7 @@ @QuarkusTest @TestProfile( AuthTestProfile.class ) +@QuarkusTestResource( OidcWiremockTestResource.class) public class AuthResourceTest { @TestSecurity( roles = { "power", "admin" }, user = "user" ) @@ -43,12 +45,4 @@ public void testGetUserInfo() assertThat( resultPath.getList( "roles" ), hasItems( "power", "admin" ) ); } - @Test - public void testGetUserInfoNotAuth() - { - given().when() - .get( "/api/admin/auth/userinfo" ) - .then() - .statusCode( Response.Status.UNAUTHORIZED.getStatusCode() ); - } } diff --git a/src/test/java/org/commonjava/indy/service/ui/jaxrs/auth/AuthTestProfile.java b/src/test/java/org/commonjava/indy/service/ui/jaxrs/auth/AuthTestProfile.java index ede9109..bac8a63 100644 --- a/src/test/java/org/commonjava/indy/service/ui/jaxrs/auth/AuthTestProfile.java +++ b/src/test/java/org/commonjava/indy/service/ui/jaxrs/auth/AuthTestProfile.java @@ -28,7 +28,9 @@ public Map getConfigOverrides() { Map configs = new HashMap<>(); configs.put( "quarkus.oidc.enabled", "true" ); - configs.put( "quarkus.oidc.auth-server-url", "http://localhost:8180/realms/test" ); + configs.put( "quarkus.oidc.auth-server-url", "${keycloak.url}/realms/quarkus/" ); + configs.put( "quarkus.oidc.client-id", "quarkus-service-app" ); + configs.put( "quarkus.oidc.application-type", "web-app" ); return configs; } }