From 6856a5f76fd9cf70a43297c24209f484b201ade3 Mon Sep 17 00:00:00 2001 From: Luca Roffia Date: Wed, 17 Jul 2024 11:40:15 +0200 Subject: [PATCH] fix: setting endpoint and engine jpars --- Dockerfile | 14 +++++++------- client-api/pom.xml | 10 +--------- .../unibo/arces/wot/sepa/engine/core/Engine.java | 2 +- .../wot/sepa/engine/core/EngineProperties.java | 7 +++++++ 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index ec25ed80..78d33a95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ # docker build -t vaimeedock/sepa:v0.15.0 -t vaimeedock/sepa:latest . # docker push vaimeedock/sepa --all-tag -FROM maven:3.6-jdk-11 as BUILD +FROM maven:3.6-jdk-11 AS build COPY . . ENV JMX_HOSTNAME=0.0.0.0 @@ -16,13 +16,13 @@ RUN mvn clean package FROM openjdk:11.0-jre -COPY --from=BUILD ./engine/target/engine-1.0.0-SNAPSHOT.jar /engine.jar -COPY --from=BUILD ./engine/src/main/resources/jmxremote.password /jmxremote.password -COPY --from=BUILD ./engine/src/main/resources/jmxremote.access /jmxremote.access -COPY --from=BUILD ./engine/src/main/resources/jmx.properties /jmx.properties -COPY --from=BUILD ./engine/src/main/resources/endpoint.jpar /endpoint.jpar +COPY --from=build ./engine/target/engine-1.0.0-SNAPSHOT.jar /engine.jar +COPY --from=build ./engine/src/main/resources/jmxremote.password /jmxremote.password +COPY --from=build ./engine/src/main/resources/jmxremote.access /jmxremote.access +COPY --from=build ./engine/src/main/resources/jmx.properties /jmx.properties +COPY --from=build ./engine/src/main/resources/endpoint.jpar /endpoint.jpar # COPY ALL ENDPOINTS TO ALLOW CMD LINE CUSTOMIZATION -COPY --from=BUILD ./engine/src/main/resources/endpoints /endpoints +COPY --from=build ./engine/src/main/resources/endpoints /endpoints RUN chmod 600 /jmxremote.password diff --git a/client-api/pom.xml b/client-api/pom.xml index 7e08061a..6924a656 100644 --- a/client-api/pom.xml +++ b/client-api/pom.xml @@ -9,15 +9,7 @@ client-api - - - - - - - - - + org.apache.commons diff --git a/engine/src/main/java/it/unibo/arces/wot/sepa/engine/core/Engine.java b/engine/src/main/java/it/unibo/arces/wot/sepa/engine/core/Engine.java index 45907f42..4c61aadf 100644 --- a/engine/src/main/java/it/unibo/arces/wot/sepa/engine/core/Engine.java +++ b/engine/src/main/java/it/unibo/arces/wot/sepa/engine/core/Engine.java @@ -41,7 +41,7 @@ */ public class Engine implements EngineMBean { - private final static String version = "v0.15.2"; + private final static String version = "v0.15.3"; private EngineProperties properties = null; diff --git a/engine/src/main/java/it/unibo/arces/wot/sepa/engine/core/EngineProperties.java b/engine/src/main/java/it/unibo/arces/wot/sepa/engine/core/EngineProperties.java index 74b6b627..bcb815a8 100644 --- a/engine/src/main/java/it/unibo/arces/wot/sepa/engine/core/EngineProperties.java +++ b/engine/src/main/java/it/unibo/arces/wot/sepa/engine/core/EngineProperties.java @@ -518,6 +518,13 @@ private void setParameter(String key,String value) { case "-host": endpointProperties.setHost(value); break; + case "-engine": + engineJpar = value; + break; + case "-endpoint": + endpointJpar = value; + break; + case "-sparql11protocol.protocol": if (value.toLowerCase().equals("http")) endpointProperties.setProtocolScheme(ProtocolScheme.http); else if (value.toLowerCase().equals("https")) endpointProperties.setProtocolScheme(ProtocolScheme.https);