This is an automated email from the ASF dual-hosted git repository. zhfeng pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push: new 9335f3c5e6 Fix #5667 to add native support for camel-quarkus-xj (#5669) 9335f3c5e6 is described below commit 9335f3c5e6a6fba95e615d85054e90c7cf7405c9 Author: Zheng Feng <zh.f...@gmail.com> AuthorDate: Wed Jan 24 13:54:57 2024 +0800 Fix #5667 to add native support for camel-quarkus-xj (#5669) --- docs/modules/ROOT/examples/components/xj.yml | 6 ++--- .../ROOT/pages/reference/extensions/xj.adoc | 14 +++++++---- extensions-jvm/pom.xml | 1 - extensions/pom.xml | 1 + .../xj/deployment/pom.xml | 6 ++++- .../component/xj/deployment/XjProcessor.java | 14 ----------- {extensions-jvm => extensions}/xj/pom.xml | 2 +- {extensions-jvm => extensions}/xj/runtime/pom.xml | 7 +++++- .../main/resources/META-INF/quarkus-extension.yaml | 2 +- integration-tests-jvm/pom.xml | 1 - integration-tests/pom.xml | 1 + .../xj/pom.xml | 27 ++++++++++++++++++++++ .../camel/quarkus/component/xj/it/XjResource.java | 0 .../apache/camel/quarkus/component/xj/it/XjIT.java | 16 +++---------- .../camel/quarkus/component/xj/it/XjTest.java | 0 tooling/scripts/test-categories.yaml | 1 + 16 files changed, 58 insertions(+), 41 deletions(-) diff --git a/docs/modules/ROOT/examples/components/xj.yml b/docs/modules/ROOT/examples/components/xj.yml index b2758e1053..a105b2757a 100644 --- a/docs/modules/ROOT/examples/components/xj.yml +++ b/docs/modules/ROOT/examples/components/xj.yml @@ -2,11 +2,11 @@ # This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page cqArtifactId: camel-quarkus-xj cqArtifactIdBase: xj -cqNativeSupported: false -cqStatus: Preview +cqNativeSupported: true +cqStatus: Stable cqDeprecated: false cqJvmSince: 1.1.0 -cqNativeSince: n/a +cqNativeSince: 3.7.0 cqCamelPartName: xj cqCamelPartTitle: XJ cqCamelPartDescription: Transform JSON and XML message using a XSLT. diff --git a/docs/modules/ROOT/pages/reference/extensions/xj.adoc b/docs/modules/ROOT/pages/reference/extensions/xj.adoc index bfbf328345..f16a0b3beb 100644 --- a/docs/modules/ROOT/pages/reference/extensions/xj.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/xj.adoc @@ -4,17 +4,17 @@ = XJ :linkattrs: :cq-artifact-id: camel-quarkus-xj -:cq-native-supported: false -:cq-status: Preview -:cq-status-deprecation: Preview +:cq-native-supported: true +:cq-status: Stable +:cq-status-deprecation: Stable :cq-description: Transform JSON and XML message using a XSLT. :cq-deprecated: false :cq-jvm-since: 1.1.0 -:cq-native-since: n/a +:cq-native-since: 3.7.0 ifeval::[{doc-show-badges} == true] [.badges] -[.badge-key]##JVM since##[.badge-supported]##1.1.0## [.badge-key]##Native##[.badge-unsupported]##unsupported## +[.badge-key]##JVM since##[.badge-supported]##1.1.0## [.badge-key]##Native since##[.badge-supported]##3.7.0## endif::[] Transform JSON and XML message using a XSLT. @@ -29,6 +29,10 @@ Please refer to the above link for usage and configuration details. [id="extensions-xj-maven-coordinates"] == Maven coordinates +https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-xj[Create a new project with this extension on {link-quarkus-code-generator}, window="_blank"] + +Or add the coordinates to your existing project: + [source,xml] ---- <dependency> diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml index b7df58059e..277bfbf7f3 100644 --- a/extensions-jvm/pom.xml +++ b/extensions-jvm/pom.xml @@ -98,7 +98,6 @@ <module>web3j</module> <module>wordpress</module> <module>workday</module> - <module>xj</module> <module>xmpp</module> <module>zookeeper</module> <module>zookeeper-master</module> diff --git a/extensions/pom.xml b/extensions/pom.xml index d62e53113f..0c593ff64c 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -246,6 +246,7 @@ <module>vertx-websocket</module> <module>weather</module> <module>xchange</module> + <module>xj</module> <module>xmlsecurity</module> <module>xpath</module> <module>xslt</module> diff --git a/extensions-jvm/xj/deployment/pom.xml b/extensions/xj/deployment/pom.xml similarity index 91% rename from extensions-jvm/xj/deployment/pom.xml rename to extensions/xj/deployment/pom.xml index ec158d805d..563425c253 100644 --- a/extensions-jvm/xj/deployment/pom.xml +++ b/extensions/xj/deployment/pom.xml @@ -32,7 +32,11 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-core-deployment</artifactId> + <artifactId>camel-quarkus-xslt-saxon-deployment</artifactId> + </dependency> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-jackson-deployment</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/extensions-jvm/xj/deployment/src/main/java/org/apache/camel/quarkus/component/xj/deployment/XjProcessor.java b/extensions/xj/deployment/src/main/java/org/apache/camel/quarkus/component/xj/deployment/XjProcessor.java similarity index 66% rename from extensions-jvm/xj/deployment/src/main/java/org/apache/camel/quarkus/component/xj/deployment/XjProcessor.java rename to extensions/xj/deployment/src/main/java/org/apache/camel/quarkus/component/xj/deployment/XjProcessor.java index 21b2949511..316197e5d0 100644 --- a/extensions-jvm/xj/deployment/src/main/java/org/apache/camel/quarkus/component/xj/deployment/XjProcessor.java +++ b/extensions/xj/deployment/src/main/java/org/apache/camel/quarkus/component/xj/deployment/XjProcessor.java @@ -17,11 +17,7 @@ package org.apache.camel.quarkus.component.xj.deployment; import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.annotations.ExecutionTime; -import io.quarkus.deployment.annotations.Record; import io.quarkus.deployment.builditem.FeatureBuildItem; -import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild; -import org.apache.camel.quarkus.core.JvmOnlyRecorder; import org.jboss.logging.Logger; class XjProcessor { @@ -33,14 +29,4 @@ class XjProcessor { FeatureBuildItem feature() { return new FeatureBuildItem(FEATURE); } - - /** - * Remove this once this extension starts supporting the native mode. - */ - @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class) - @Record(value = ExecutionTime.RUNTIME_INIT) - void warnJvmInNative(JvmOnlyRecorder recorder) { - JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time - recorder.warnJvmInNative(FEATURE); // warn at runtime - } } diff --git a/extensions-jvm/xj/pom.xml b/extensions/xj/pom.xml similarity index 96% rename from extensions-jvm/xj/pom.xml rename to extensions/xj/pom.xml index d719db637b..4cc75daf7a 100644 --- a/extensions-jvm/xj/pom.xml +++ b/extensions/xj/pom.xml @@ -21,7 +21,7 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-extensions-jvm</artifactId> + <artifactId>camel-quarkus-extensions</artifactId> <version>3.7.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> diff --git a/extensions-jvm/xj/runtime/pom.xml b/extensions/xj/runtime/pom.xml similarity index 93% rename from extensions-jvm/xj/runtime/pom.xml rename to extensions/xj/runtime/pom.xml index 7a38fd21c7..889eee5b89 100644 --- a/extensions-jvm/xj/runtime/pom.xml +++ b/extensions/xj/runtime/pom.xml @@ -32,12 +32,17 @@ <properties> <camel.quarkus.jvmSince>1.1.0</camel.quarkus.jvmSince> + <camel.quarkus.nativeSince>3.7.0</camel.quarkus.nativeSince> </properties> <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-core</artifactId> + <artifactId>camel-quarkus-xslt-saxon</artifactId> + </dependency> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-jackson</artifactId> </dependency> <dependency> <groupId>org.apache.camel</groupId> diff --git a/extensions-jvm/xj/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/xj/runtime/src/main/resources/META-INF/quarkus-extension.yaml similarity index 98% rename from extensions-jvm/xj/runtime/src/main/resources/META-INF/quarkus-extension.yaml rename to extensions/xj/runtime/src/main/resources/META-INF/quarkus-extension.yaml index 59a0a91f46..ad94bb15b6 100644 --- a/extensions-jvm/xj/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/xj/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -30,4 +30,4 @@ metadata: categories: - "integration" status: - - "preview" + - "stable" diff --git a/integration-tests-jvm/pom.xml b/integration-tests-jvm/pom.xml index 90a716f733..cabd8985a3 100644 --- a/integration-tests-jvm/pom.xml +++ b/integration-tests-jvm/pom.xml @@ -97,7 +97,6 @@ <module>web3j</module> <module>wordpress</module> <module>workday</module> - <module>xj</module> <module>xml-grouped</module> <module>xmpp</module> <module>zookeeper</module> diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 33c3cb6319..8a64dcb437 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -232,6 +232,7 @@ <module>vertx-websocket</module> <module>weather</module> <!--<module>xchange</module> https://github.com/apache/camel-quarkus/issues/4516 --> + <module>xj</module> <module>xml-grouped</module> <module>xml-jaxp</module> <module>xmlsecurity</module> diff --git a/integration-tests-jvm/xj/pom.xml b/integration-tests/xj/pom.xml similarity index 77% rename from integration-tests-jvm/xj/pom.xml rename to integration-tests/xj/pom.xml index 88f637d19a..bd327d1d3d 100644 --- a/integration-tests-jvm/xj/pom.xml +++ b/integration-tests/xj/pom.xml @@ -78,6 +78,33 @@ </dependency> </dependencies> </profile> + <profile> + <id>native</id> + <activation> + <property> + <name>native</name> + </property> + </activation> + <properties> + <quarkus.package.type>native</quarkus.package.type> + </properties> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> </profiles> </project> diff --git a/integration-tests-jvm/xj/src/main/java/org/apache/camel/quarkus/component/xj/it/XjResource.java b/integration-tests/xj/src/main/java/org/apache/camel/quarkus/component/xj/it/XjResource.java similarity index 100% rename from integration-tests-jvm/xj/src/main/java/org/apache/camel/quarkus/component/xj/it/XjResource.java rename to integration-tests/xj/src/main/java/org/apache/camel/quarkus/component/xj/it/XjResource.java diff --git a/integration-tests-jvm/xj/src/test/java/org/apache/camel/quarkus/component/xj/it/XjTest.java b/integration-tests/xj/src/test/java/org/apache/camel/quarkus/component/xj/it/XjIT.java similarity index 71% copy from integration-tests-jvm/xj/src/test/java/org/apache/camel/quarkus/component/xj/it/XjTest.java copy to integration-tests/xj/src/test/java/org/apache/camel/quarkus/component/xj/it/XjIT.java index 445bfd6e58..b5f54d8358 100644 --- a/integration-tests-jvm/xj/src/test/java/org/apache/camel/quarkus/component/xj/it/XjTest.java +++ b/integration-tests/xj/src/test/java/org/apache/camel/quarkus/component/xj/it/XjIT.java @@ -16,19 +16,9 @@ */ package org.apache.camel.quarkus.component.xj.it; -import io.quarkus.test.junit.QuarkusTest; -import io.restassured.RestAssured; -import org.junit.jupiter.api.Test; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@QuarkusTest -class XjTest { - - @Test - public void loadComponentXj() { - /* A simple autogenerated test */ - RestAssured.get("/xj/load/component/xj") - .then() - .statusCode(200); - } +@QuarkusIntegrationTest +class XjIT extends XjTest { } diff --git a/integration-tests-jvm/xj/src/test/java/org/apache/camel/quarkus/component/xj/it/XjTest.java b/integration-tests/xj/src/test/java/org/apache/camel/quarkus/component/xj/it/XjTest.java similarity index 100% rename from integration-tests-jvm/xj/src/test/java/org/apache/camel/quarkus/component/xj/it/XjTest.java rename to integration-tests/xj/src/test/java/org/apache/camel/quarkus/component/xj/it/XjTest.java diff --git a/tooling/scripts/test-categories.yaml b/tooling/scripts/test-categories.yaml index 1efecea2a9..0d7a21f32a 100644 --- a/tooling/scripts/test-categories.yaml +++ b/tooling/scripts/test-categories.yaml @@ -184,6 +184,7 @@ group-11: - tarfile - univocity-parsers - velocity + - xj - xml-grouped - xslt-saxon group-12: