From 80f7cc110da0e55de396a905a05e7a39d09bf57f Mon Sep 17 00:00:00 2001 From: Guillaume Grossetie Date: Wed, 4 Aug 2021 08:37:56 +0200 Subject: [PATCH] resolves #842 creates SVG and PNG error images Use svgSalamander to create SVG and PNG images. Batik adds ~7mb of dependencies. --- pom.xml | 2 +- server/pom.xml | 18 ++-- .../io/kroki/server/error/ErrorHandler.java | 63 +++++++++--- .../io/kroki/server/error/ErrorImage.java | 99 +++++++++++++++++++ .../java/io/kroki/server/ErrorImageTest.java | 24 +++++ .../kroki/server/error/ErrorHandlerTest.java | 46 ++++++++- 6 files changed, 225 insertions(+), 27 deletions(-) create mode 100644 server/src/main/java/io/kroki/server/error/ErrorImage.java create mode 100644 server/src/test/java/io/kroki/server/ErrorImageTest.java diff --git a/pom.xml b/pom.xml index 89b2f7884..e30885987 100644 --- a/pom.xml +++ b/pom.xml @@ -3,6 +3,7 @@ 4.0.0 io.kroki kroki + kroki pom 0.14.0 @@ -29,5 +30,4 @@ - kroki diff --git a/server/pom.xml b/server/pom.xml index a438ba4e1..57b5ce8eb 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -80,6 +80,11 @@ plantuml ${plantuml.version} + + guru.nidi.com.kitfox + svgSalamander + 1.1.3 + org.junit.jupiter junit-jupiter-api @@ -108,6 +113,7 @@ org.mockito mockito-core ${mockito-core.version} + test