Skip to content

Commit

Permalink
Revert "Spike/move to quarkus 3 (#1682)"
Browse files Browse the repository at this point in the history
This reverts commit 869f957.
  • Loading branch information
chris-dickson committed Aug 10, 2023
1 parent 869f957 commit b10db7b
Show file tree
Hide file tree
Showing 75 changed files with 272 additions and 279 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
quarkusPluginId=io.quarkus
quarkusPlatformGroupId=io.quarkus.platform
quarkusPlatformArtifactId=quarkus-bom
quarkusVersion=3.2.3.Final
quarkusVersion=2.16.6.Final
lombokVersion=1.18.26
elasticsearchVersion=8.7.0
2 changes: 1 addition & 1 deletion packages/services/hmi-server/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
quarkusPluginId=io.quarkus
quarkusPlatformGroupId=io.quarkus.platform
quarkusPlatformArtifactId=quarkus-bom
quarkusVersion=3.2.3.Final
quarkusVersion=2.16.8.Final
lombokVersion=1.18.28
elasticsearchVersion=8.7.0
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package software.uncharted.terarium.hmiserver.annotations;

import jakarta.interceptor.InterceptorBinding;
import javax.interceptor.InterceptorBinding;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import software.uncharted.terarium.hmiserver.annotations.IgnoreRequestLogging;
import software.uncharted.terarium.hmiserver.services.StructuredLog;

import jakarta.inject.Inject;
import jakarta.ws.rs.container.ContainerRequestContext;
import jakarta.ws.rs.container.ContainerRequestFilter;
import jakarta.ws.rs.ext.Provider;
import javax.inject.Inject;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.ext.Provider;
import java.io.IOException;
import java.time.Instant;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import lombok.extern.slf4j.Slf4j;
import software.uncharted.terarium.hmiserver.services.StructuredLog;

import jakarta.inject.Inject;
import jakarta.ws.rs.container.ContainerRequestContext;
import jakarta.ws.rs.container.ContainerResponseContext;
import jakarta.ws.rs.container.ContainerResponseFilter;
import jakarta.ws.rs.ext.Provider;
import javax.inject.Inject;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.container.ContainerResponseFilter;
import javax.ws.rs.ext.Provider;
import java.io.IOException;
import java.time.Instant;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import lombok.experimental.Accessors;


import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Index;
import jakarta.persistence.Table;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.Instant;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
import software.uncharted.terarium.hmiserver.annotations.TSOptional;
import software.uncharted.terarium.hmiserver.models.EventType;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Index;
import jakarta.persistence.Table;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.Instant;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import lombok.EqualsAndHashCode;
import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper;

import jakarta.ws.rs.core.Response;
import javax.ws.rs.core.Response;

public class HmiResponseExceptionMapper implements ResponseExceptionMapper<RuntimeException> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
import software.uncharted.terarium.hmiserver.services.EventService;
import software.uncharted.terarium.hmiserver.services.StructuredLog;

import jakarta.annotation.Priority;
import jakarta.inject.Inject;
import jakarta.interceptor.AroundInvoke;
import jakarta.interceptor.Interceptor;
import jakarta.interceptor.InvocationContext;
import javax.annotation.Priority;
import javax.inject.Inject;
import javax.interceptor.AroundInvoke;
import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
import java.lang.reflect.Method;
import java.util.UUID;

Expand Down Expand Up @@ -90,19 +90,19 @@ public Object measureInvocationTime(InvocationContext context) throws Exception
* @return The method type (GET, POST, etc)
*/
private String getType(InvocationContext context) {
if (context.getMethod().getAnnotation(jakarta.ws.rs.GET.class) != null) {
if (context.getMethod().getAnnotation(javax.ws.rs.GET.class) != null) {
return "GET";
} else if (context.getMethod().getAnnotation(jakarta.ws.rs.POST.class) != null) {
} else if (context.getMethod().getAnnotation(javax.ws.rs.POST.class) != null) {
return "POST";
} else if (context.getMethod().getAnnotation(jakarta.ws.rs.PUT.class) != null) {
} else if (context.getMethod().getAnnotation(javax.ws.rs.PUT.class) != null) {
return "PUT";
} else if (context.getMethod().getAnnotation(jakarta.ws.rs.DELETE.class) != null) {
} else if (context.getMethod().getAnnotation(javax.ws.rs.DELETE.class) != null) {
return "DELETE";
} else if (context.getMethod().getAnnotation(jakarta.ws.rs.HEAD.class) != null) {
} else if (context.getMethod().getAnnotation(javax.ws.rs.HEAD.class) != null) {
return "HEAD";
} else if (context.getMethod().getAnnotation(jakarta.ws.rs.OPTIONS.class) != null) {
} else if (context.getMethod().getAnnotation(javax.ws.rs.OPTIONS.class) != null) {
return "OPTIONS";
} else if (context.getMethod().getAnnotation(jakarta.ws.rs.PATCH.class) != null) {
} else if (context.getMethod().getAnnotation(javax.ws.rs.PATCH.class) != null) {
return "PATCH";
}
return null;
Expand All @@ -128,8 +128,8 @@ private String getPath(InvocationContext context) {
* @return The value of the annotation or an empty string if it doesn't exist
*/
private String getPath(Class<?> clazz) {
if (clazz.getAnnotation(jakarta.ws.rs.Path.class) != null) {
return clazz.getAnnotation(jakarta.ws.rs.Path.class).value();
if (clazz.getAnnotation(javax.ws.rs.Path.class) != null) {
return clazz.getAnnotation(javax.ws.rs.Path.class).value();
}
return "";
}
Expand All @@ -140,8 +140,8 @@ private String getPath(Class<?> clazz) {
* @return The value of the annotation or an empty string if it doesn't exist
*/
private String getPath(Method method) {
if (method.getAnnotation(jakarta.ws.rs.Path.class) != null) {
return method.getAnnotation(jakarta.ws.rs.Path.class).value();
if (method.getAnnotation(javax.ws.rs.Path.class) != null) {
return method.getAnnotation(javax.ws.rs.Path.class).value();
}
return "";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import software.uncharted.terarium.hmiserver.models.dataservice.Artifact;
import software.uncharted.terarium.hmiserver.models.dataservice.dataset.PresignedURL;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import java.util.List;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@RegisterRestClient(configKey = "data-service")
@Path("/concepts")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import software.uncharted.terarium.hmiserver.models.dataservice.dataset.Dataset;
import software.uncharted.terarium.hmiserver.models.dataservice.dataset.PresignedURL;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.List;

@RegisterRestClient(configKey = "data-service")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import software.uncharted.terarium.hmiserver.models.dataservice.DocumentAsset;
import software.uncharted.terarium.hmiserver.models.dataservice.Software;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@RegisterRestClient(configKey = "data-service")
@Path("/external")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import software.uncharted.terarium.hmiserver.models.dataservice.Model;
import com.fasterxml.jackson.databind.JsonNode;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@RegisterRestClient(configKey = "data-service")
@Path("/model_configurations")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import software.uncharted.terarium.hmiserver.models.dataservice.ModelOperationCopy;
import software.uncharted.terarium.hmiserver.models.dataservice.ModelConfiguration;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.Map;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import software.uncharted.terarium.hmiserver.models.dataservice.Association;
import software.uncharted.terarium.hmiserver.models.dataservice.Person;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@RegisterRestClient(configKey = "data-service")
@Path("/persons")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import software.uncharted.terarium.hmiserver.models.dataservice.Project;
import software.uncharted.terarium.hmiserver.models.dataservice.ResourceType;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.*;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import software.uncharted.terarium.hmiserver.models.dataservice.Provenance;
import software.uncharted.terarium.hmiserver.models.dataservice.ProvenanceQueryParam;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@RegisterRestClient(configKey = "data-service")
@Path("/provenance")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import software.uncharted.terarium.hmiserver.models.dataservice.PresignedURL;
import software.uncharted.terarium.hmiserver.models.dataservice.dataset.Dataset;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

@RegisterRestClient(configKey = "data-service")
@Path("/simulations")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import software.uncharted.terarium.hmiserver.exceptions.HmiResponseExceptionMapper;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.*;

@RegisterRestClient(configKey = "data-service")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import software.uncharted.terarium.hmiserver.exceptions.HmiResponseExceptionMapper;
import software.uncharted.terarium.hmiserver.resources.documentservice.responses.*;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

@RegisterRestClient(configKey = "xdd-dev-service")
@Produces(MediaType.APPLICATION_JSON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import software.uncharted.terarium.hmiserver.annotations.LogRestClientTime;
import software.uncharted.terarium.hmiserver.exceptions.HmiResponseExceptionMapper;

import jakarta.ws.rs.HeaderParam;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
* This is a temporary proxy as currently the ES endpoint is just on xDD's development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import software.uncharted.terarium.hmiserver.resources.documentservice.responses.XDDExtractionsResponseOK;
import software.uncharted.terarium.hmiserver.resources.documentservice.responses.XDDResponse;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

@RegisterRestClient(configKey = "xdd-document-service")
@Produces(MediaType.APPLICATION_JSON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import org.eclipse.microprofile.openapi.annotations.tags.Tag;
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import jakarta.ws.rs.core.MediaType;
import javax.ws.rs.core.MediaType;
import software.uncharted.terarium.hmiserver.exceptions.HmiResponseExceptionMapper;
import software.uncharted.terarium.hmiserver.models.extractionservice.ExtractionResponse;

import java.util.List;
import java.util.Map;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;

@RegisterRestClient(configKey = "extraction-service-api")
@Produces(MediaType.APPLICATION_JSON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import software.uncharted.terarium.hmiserver.annotations.LogRestClientTime;
import software.uncharted.terarium.hmiserver.models.code.GithubFile;

import jakarta.ws.rs.*;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import javax.ws.rs.*;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import java.util.List;

@RegisterRestClient(configKey = "github")
Expand Down
Loading

0 comments on commit b10db7b

Please sign in to comment.