From c210eb54f0a68fb951fabcb6e39e95a802acb818 Mon Sep 17 00:00:00 2001 From: Willem Van Lishout Date: Sat, 24 Aug 2024 20:11:20 +0200 Subject: [PATCH 1/4] Modify Dockerfile so command-line arguments can be passed --- Dockerfile | 4 +++- docker/entrypoint.sh | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 docker/entrypoint.sh diff --git a/Dockerfile b/Dockerfile index df362c3..6bfa010 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM eclipse-temurin:17 RUN mkdir opt/app ADD ./target/*.jar opt/app/saxon.jar +COPY ./docker/entrypoint.sh /opt/app/entrypoint.sh +RUN chmod +x /opt/app/entrypoint.sh EXPOSE 5000 -CMD java $JAVA_OPTS -jar opt/app/saxon.jar \ No newline at end of file +ENTRYPOINT ["/opt/app/entrypoint.sh"] \ No newline at end of file diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100644 index 0000000..71c64ec --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec java $JAVA_OPTS -jar /opt/app/saxon.jar "$@" From ede8b9d15da9c8be5da5e2845e02aa22570ddb67 Mon Sep 17 00:00:00 2001 From: Willem Van Lishout Date: Sat, 24 Aug 2024 20:12:31 +0200 Subject: [PATCH 2/4] upgrade saxon to 12.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b3cba25..203096b 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ net.sf.saxon Saxon-HE - 12.0 + 12.5 junit From 75d7d64eafd770246864d29e46df5f149d836051 Mon Sep 17 00:00:00 2001 From: Willem Van Lishout Date: Sat, 24 Aug 2024 20:43:03 +0200 Subject: [PATCH 3/4] Log options on startup --- .../willemvlh/transformer/app/TransformerApplication.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/io/github/willemvlh/transformer/app/TransformerApplication.java b/src/main/java/io/github/willemvlh/transformer/app/TransformerApplication.java index 5c3a469..1397da6 100644 --- a/src/main/java/io/github/willemvlh/transformer/app/TransformerApplication.java +++ b/src/main/java/io/github/willemvlh/transformer/app/TransformerApplication.java @@ -1,5 +1,7 @@ package io.github.willemvlh.transformer.app; import org.apache.commons.cli.ParseException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.boot.Banner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -13,6 +15,8 @@ class TransformerApplication { public static void main(String[] args) { SpringApplication app = new SpringApplication(TransformerApplication.class); try { + Logger logger = LoggerFactory.getLogger(TransformerApplication.class); + logger.debug("Options: {}", String.join(", ", args)); ServerOptions options = ServerOptions.fromArgs(args); Map optionsMap = new HashMap<>(); optionsMap.put("server.port", options.getPort()); From baaa4af4f291f5e559b1f857f5c875b52e2bbfa5 Mon Sep 17 00:00:00 2001 From: Willem Van Lishout Date: Sat, 24 Aug 2024 20:43:30 +0200 Subject: [PATCH 4/4] Bump version to 2.6, remove obsolete demo link from readme --- README.md | 9 --------- pom.xml | 3 +-- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/README.md b/README.md index 9dffa6b..5bd93a6 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,6 @@ There are two ways of installing the application: * Download the JAR file from the Releases section on GitHub. * By using Docker: `$ docker pull ghcr.io/willemvlh/saxon-server:latest` -## Demo - -A live server is accessible at https://transform.bezdomny.net/. -For example, you can run following cURL command to get the current time of the server: - -`curl https://transform.bezdomny.net/query -X POST -F xsl="current-dateTime()" -F output="method=text"` - -Do not send sensitive information. - ## Running If you use Docker, use following command: diff --git a/pom.xml b/pom.xml index 203096b..4add433 100644 --- a/pom.xml +++ b/pom.xml @@ -10,12 +10,11 @@ io.github.willemvlh saxon-server - 2.5 + 2.6 saxon-server Saxon server ${project.version} - 1.8