From 42ae8c5d3ddb09452685ea79cb16c29b552c0fba Mon Sep 17 00:00:00 2001 From: lucio Date: Fri, 1 Mar 2024 18:11:44 +0100 Subject: [PATCH] solved issue with jakarta --- Dockerfile | 2 +- gcube/extra-resources/WEB-INF/web.xml | 9 ++++-- pom.xml | 21 +++++++++----- .../gcube/service/helloworld/HelloWorld.java | 29 ------------------- 4 files changed, 21 insertions(+), 40 deletions(-) delete mode 100644 src/main/java/org/gcube/service/helloworld/HelloWorld.java diff --git a/Dockerfile b/Dockerfile index 99c0481..74ca274 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM d4science/smartgears-distribution:4.0.0-SNAPSHOT-java11-tomcat9 +FROM d4science/smartgears-distribution:4.0.0-SNAPSHOT-java11-tomcat10.1.19 COPY ./docker/logback.xml /etc/ COPY ./docker/container.ini /etc/ diff --git a/gcube/extra-resources/WEB-INF/web.xml b/gcube/extra-resources/WEB-INF/web.xml index 7e7dfdc..67c7bc7 100644 --- a/gcube/extra-resources/WEB-INF/web.xml +++ b/gcube/extra-resources/WEB-INF/web.xml @@ -8,10 +8,15 @@ A gcube HelloWorld service - smartgears 4 - org.gcube.service.helloworld.HelloWorld + HelloWorld + org.glassfish.jersey.servlet.ServletContainer + + jersey.config.server.provider.packages + org.gcube.service.helloworld.services + - org.gcube.service.helloworld.HelloWorld + HelloWorld /* \ No newline at end of file diff --git a/pom.xml b/pom.xml index 6a3ed92..3328655 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - + org.gcube.service helloworld 0.0.1-SNAPSHOT @@ -31,7 +31,8 @@ scm:git:https://code-repo.d4science.org/gCubeSystem/hello-world-sg4-service.git scm:git:https://code-repo.d4science.org/gCubeSystem/hello-world-sg4-service.git - https://code-repo.d4science.org/gCubeSystem/hello-world-sg4-service.git + + https://code-repo.d4science.org/gCubeSystem/hello-world-sg4-service.git @@ -47,8 +48,8 @@ - - + + org.glassfish.jersey.inject jersey-cdi2-se - + @@ -104,7 +107,8 @@ ${project.artifactId} - - org.codehaus.mojo diff --git a/src/main/java/org/gcube/service/helloworld/HelloWorld.java b/src/main/java/org/gcube/service/helloworld/HelloWorld.java deleted file mode 100644 index 330a670..0000000 --- a/src/main/java/org/gcube/service/helloworld/HelloWorld.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.gcube.service.helloworld; - -import java.util.HashSet; -import java.util.Set; - -import jakarta.ws.rs.ApplicationPath; -import jakarta.ws.rs.core.Application; - -import org.gcube.service.helloworld.services.AuthenticatedService; -import org.gcube.service.helloworld.services.ExcludeAuthorizationService; -import org.gcube.service.helloworld.services.HelloService; - -/** - * - * @author Lucio Lelii (ISTI-CNR) - */ - -@ApplicationPath("") -public class HelloWorld extends Application { - - public Set> getClasses() { - final Set> classes = new HashSet>(); - // register resources classes implementing Servlets - classes.add(HelloService.class); - classes.add(ExcludeAuthorizationService.class); - classes.add(AuthenticatedService.class); - return classes; - } -}