From 05810033d7de791bab58ed2070f01486ceb6992e Mon Sep 17 00:00:00 2001 From: Jiehong Ma Date: Mon, 9 Jan 2023 21:18:07 +0100 Subject: [PATCH] feature: provide jackson jq extra as an independent module (#68) --- README.md | 12 +++++++++++- deployment/pom.xml | 5 +++++ integration-tests/pom.xml | 5 +++++ .../jackson/jq/it/JacksonJqLoaderTest.java | 10 +++++++++- pom.xml | 1 + runtime-extra/pom.xml | 19 +++++++++++++++++++ 6 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 runtime-extra/pom.xml diff --git a/README.md b/README.md index d3f1d65..c8d24fd 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ integrate it in your Quarkus application! Simply add the dependency to your Quarkus project: ```xml - io.quarkiverse.jackson-jq quarkus-jackson-jq @@ -45,6 +44,17 @@ public class JacksonJqResource { } ``` +## Jackson Jq Extra Module + +You can also make use of the [extra module](https://github.com/eiiches/jackson-jq#using-jackson-jqextras-module) by +adding the following dependency: + +```xml + + io.quarkiverse.jackson-jq + quarkus-jackson-jq-extra + +``` ## Adding Custom functions diff --git a/deployment/pom.xml b/deployment/pom.xml index 6a29b19..97b1aa6 100644 --- a/deployment/pom.xml +++ b/deployment/pom.xml @@ -18,6 +18,11 @@ quarkus-jackson-jq ${project.version} + + io.quarkiverse.jackson-jq + quarkus-jackson-jq-extra + ${project.version} + io.quarkus quarkus-junit5-internal diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 8c0118b..459aeb4 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -18,6 +18,11 @@ quarkus-jackson-jq ${project.version} + + io.quarkiverse.jackson-jq + quarkus-jackson-jq-extra + ${project.version} + io.quarkus quarkus-junit5 diff --git a/integration-tests/src/test/java/io/quarkiverse/jackson/jq/it/JacksonJqLoaderTest.java b/integration-tests/src/test/java/io/quarkiverse/jackson/jq/it/JacksonJqLoaderTest.java index 711bfd7..7337775 100644 --- a/integration-tests/src/test/java/io/quarkiverse/jackson/jq/it/JacksonJqLoaderTest.java +++ b/integration-tests/src/test/java/io/quarkiverse/jackson/jq/it/JacksonJqLoaderTest.java @@ -27,6 +27,14 @@ public void functionsTest() { .body("$", hasItem("paths/1")) // built-in function not filtered .body("$", hasItem("delpaths/1")) // built-in function not filtered .body("$", hasItem("myFunction/1")) // custom function not filtered - .body("$", hasItem("myFunction/2")); // custom function not filtered + .body("$", hasItem("myFunction/2")) // custom function not filtered + .body("$", hasItem("strftime/1")) // extra function not filtered + .body("$", hasItem("strftime/2")) // extra function not filtered + .body("$", hasItem("uridecode/0")) // extra function not filtered + .body("$", hasItem("uriparse/0")) // extra function not filtered + .body("$", hasItem("strptime/1")) // extra function not filtered + .body("$", hasItem("strptime/2")) // extra function not filtered + .body("$", hasItem("timestamp/0")) // extra function not filtered + .body("$", hasItem("uuid4/0")); // extra function not filtered } } diff --git a/pom.xml b/pom.xml index dd9809b..b6cce2d 100644 --- a/pom.xml +++ b/pom.xml @@ -14,6 +14,7 @@ deployment runtime + runtime-extra 3.8.1 diff --git a/runtime-extra/pom.xml b/runtime-extra/pom.xml new file mode 100644 index 0000000..ff28bf4 --- /dev/null +++ b/runtime-extra/pom.xml @@ -0,0 +1,19 @@ + + + 4.0.0 + + io.quarkiverse.jackson-jq + quarkus-jackson-jq-parent + 1.2.0-SNAPSHOT + + quarkus-jackson-jq-extra + Quarkus - Jackson Jq - Runtime - Extra + + + net.thisptr + jackson-jq-extra + jar + ${jackson-jq.version} + + +