Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Saxon 12.5 #16

Merged
merged 4 commits into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
ENTRYPOINT ["/opt/app/entrypoint.sh"]
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec java $JAVA_OPTS -jar /opt/app/saxon.jar "$@"
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
</parent>
<groupId>io.github.willemvlh</groupId>
<artifactId>saxon-server</artifactId>
<version>2.5</version>
<version>2.6</version>
<name>saxon-server</name>
<description>Saxon server</description>
<properties>
<version>${project.version}</version>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
Expand All @@ -37,7 +36,7 @@
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>12.0</version>
<version>12.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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<String, Object> optionsMap = new HashMap<>();
optionsMap.put("server.port", options.getPort());
Expand Down
Loading