diff --git a/docs/modules/ROOT/examples/components/xslt-saxon.yml b/docs/modules/ROOT/examples/components/xslt-saxon.yml index 48637302a242..30d4286a15d7 100644 --- a/docs/modules/ROOT/examples/components/xslt-saxon.yml +++ b/docs/modules/ROOT/examples/components/xslt-saxon.yml @@ -2,11 +2,11 @@ # This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page cqArtifactId: camel-quarkus-xslt-saxon cqArtifactIdBase: xslt-saxon -cqNativeSupported: false -cqStatus: Preview +cqNativeSupported: true +cqStatus: Stable cqDeprecated: false cqJvmSince: 1.1.0 -cqNativeSince: n/a +cqNativeSince: 3.0.0 cqCamelPartName: xslt-saxon cqCamelPartTitle: XSLT Saxon cqCamelPartDescription: Transform XML payloads using an XSLT template using Saxon. diff --git a/docs/modules/ROOT/pages/reference/extensions/xslt-saxon.adoc b/docs/modules/ROOT/pages/reference/extensions/xslt-saxon.adoc index 2a0775472d95..73b9d70db730 100644 --- a/docs/modules/ROOT/pages/reference/extensions/xslt-saxon.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/xslt-saxon.adoc @@ -4,17 +4,17 @@ = XSLT Saxon :linkattrs: :cq-artifact-id: camel-quarkus-xslt-saxon -: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 XML payloads using an XSLT template using Saxon. :cq-deprecated: false :cq-jvm-since: 1.1.0 -:cq-native-since: n/a +:cq-native-since: 3.0.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.0.0## endif::[] Transform XML payloads using an XSLT template using Saxon. @@ -29,6 +29,10 @@ Please refer to the above link for usage and configuration details. [id="extensions-xslt-saxon-maven-coordinates"] == Maven coordinates +https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-xslt-saxon[Create a new project with this extension on {link-quarkus-code-generator}, window="_blank"] + +Or add the coordinates to your existing project: + [source,xml] ---- diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml index ec56a2f55f2e..278a4f9a429a 100644 --- a/extensions-jvm/pom.xml +++ b/extensions-jvm/pom.xml @@ -102,7 +102,6 @@ workday xj xmpp - xslt-saxon zookeeper zookeeper-master diff --git a/extensions/pom.xml b/extensions/pom.xml index c8262d670475..eb51ecc44b4f 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -248,6 +248,7 @@ xmlsecurity xpath xslt + xslt-saxon zendesk zip-deflater zipfile diff --git a/extensions-jvm/xslt-saxon/deployment/pom.xml b/extensions/xslt-saxon/deployment/pom.xml similarity index 100% rename from extensions-jvm/xslt-saxon/deployment/pom.xml rename to extensions/xslt-saxon/deployment/pom.xml diff --git a/extensions-jvm/xslt-saxon/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/saxon/deployment/XsltSaxonProcessor.java b/extensions/xslt-saxon/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/saxon/deployment/XsltSaxonProcessor.java similarity index 52% rename from extensions-jvm/xslt-saxon/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/saxon/deployment/XsltSaxonProcessor.java rename to extensions/xslt-saxon/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/saxon/deployment/XsltSaxonProcessor.java index 26a253d16a58..dbb03724df97 100644 --- a/extensions-jvm/xslt-saxon/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/saxon/deployment/XsltSaxonProcessor.java +++ b/extensions/xslt-saxon/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/saxon/deployment/XsltSaxonProcessor.java @@ -16,13 +16,18 @@ */ package org.apache.camel.quarkus.component.xslt.saxon.deployment; +import io.quarkus.deployment.annotations.BuildProducer; 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.NativeBuild; -import org.apache.camel.quarkus.core.JvmOnlyRecorder; +import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; +import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; +import net.sf.saxon.Configuration; +import net.sf.saxon.functions.StringJoin; +import net.sf.saxon.functions.String_1; +import net.sf.saxon.functions.Tokenize_1; +import org.apache.camel.component.xslt.saxon.XsltSaxonBuilder; import org.jboss.logging.Logger; +import org.xmlresolver.loaders.XmlLoader; class XsltSaxonProcessor { @@ -34,13 +39,15 @@ FeatureBuildItem feature() { return new FeatureBuildItem(FEATURE); } - /** - * Remove this once this extension starts supporting the native mode. - */ - @BuildStep(onlyIf = NativeBuild.class) - @Record(value = ExecutionTime.RUNTIME_INIT) - void warnJvmInNative(JvmOnlyRecorder recorder) { - JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time - recorder.warnJvmInNative(FEATURE); // warn at runtime + @BuildStep + void build(BuildProducer reflectiveClasses, + BuildProducer runtimeInitializedClasses) { + reflectiveClasses.produce(ReflectiveClassBuildItem + .builder(Configuration.class, String_1.class, Tokenize_1.class, StringJoin.class).build()); + reflectiveClasses.produce(ReflectiveClassBuildItem.builder(XmlLoader.class).build()); + reflectiveClasses.produce(ReflectiveClassBuildItem.builder(XsltSaxonBuilder.class).build()); + + runtimeInitializedClasses + .produce(new RuntimeInitializedClassBuildItem("org.apache.hc.client5.http.impl.auth.NTLMEngineImpl")); } } diff --git a/extensions-jvm/xslt-saxon/pom.xml b/extensions/xslt-saxon/pom.xml similarity index 96% rename from extensions-jvm/xslt-saxon/pom.xml rename to extensions/xslt-saxon/pom.xml index f466460f90df..d405cc2ee662 100644 --- a/extensions-jvm/xslt-saxon/pom.xml +++ b/extensions/xslt-saxon/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.camel.quarkus - camel-quarkus-extensions-jvm + camel-quarkus-extensions 3.0.0-SNAPSHOT ../pom.xml diff --git a/extensions-jvm/xslt-saxon/runtime/pom.xml b/extensions/xslt-saxon/runtime/pom.xml similarity index 95% rename from extensions-jvm/xslt-saxon/runtime/pom.xml rename to extensions/xslt-saxon/runtime/pom.xml index 1153b0e460f3..a708e601beb2 100644 --- a/extensions-jvm/xslt-saxon/runtime/pom.xml +++ b/extensions/xslt-saxon/runtime/pom.xml @@ -32,6 +32,7 @@ 1.1.0 + 3.0.0 @@ -43,6 +44,10 @@ org.apache.camel camel-xslt-saxon + + org.brotli + dec + diff --git a/extensions-jvm/xslt-saxon/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/xslt-saxon/runtime/src/main/resources/META-INF/quarkus-extension.yaml similarity index 100% rename from extensions-jvm/xslt-saxon/runtime/src/main/resources/META-INF/quarkus-extension.yaml rename to extensions/xslt-saxon/runtime/src/main/resources/META-INF/quarkus-extension.yaml diff --git a/integration-tests-jvm/pom.xml b/integration-tests-jvm/pom.xml index f512624870fd..7e8c1241a858 100644 --- a/integration-tests-jvm/pom.xml +++ b/integration-tests-jvm/pom.xml @@ -102,7 +102,6 @@ xj xml-grouped xmpp - xslt-saxon zookeeper zookeeper-master diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index b9fb9472dfd4..b4f8dba44b16 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -235,6 +235,7 @@ xml-grouped xmlsecurity xpath + xslt-saxon zendesk diff --git a/integration-tests-jvm/xslt-saxon/pom.xml b/integration-tests/xslt-saxon/pom.xml similarity index 77% rename from integration-tests-jvm/xslt-saxon/pom.xml rename to integration-tests/xslt-saxon/pom.xml index 1aa30e2160d8..47ac7249dc05 100644 --- a/integration-tests-jvm/xslt-saxon/pom.xml +++ b/integration-tests/xslt-saxon/pom.xml @@ -78,6 +78,33 @@ + + native + + + native + + + + native + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + integration-test + verify + + + + + + + diff --git a/integration-tests-jvm/xslt-saxon/src/main/java/org/apache/camel/quarkus/component/xslt/saxon/it/XsltSaxonResource.java b/integration-tests/xslt-saxon/src/main/java/org/apache/camel/quarkus/component/xslt/saxon/it/XsltSaxonResource.java similarity index 100% rename from integration-tests-jvm/xslt-saxon/src/main/java/org/apache/camel/quarkus/component/xslt/saxon/it/XsltSaxonResource.java rename to integration-tests/xslt-saxon/src/main/java/org/apache/camel/quarkus/component/xslt/saxon/it/XsltSaxonResource.java diff --git a/integration-tests/xslt-saxon/src/test/java/org/apache/camel/quarkus/component/xslt/saxon/it/XsltSaxonIT.java b/integration-tests/xslt-saxon/src/test/java/org/apache/camel/quarkus/component/xslt/saxon/it/XsltSaxonIT.java new file mode 100644 index 000000000000..0947e5a1f0b8 --- /dev/null +++ b/integration-tests/xslt-saxon/src/test/java/org/apache/camel/quarkus/component/xslt/saxon/it/XsltSaxonIT.java @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.xslt.saxon.it; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +class XsltSaxonIT extends XsltSaxonTest { + +} diff --git a/integration-tests-jvm/xslt-saxon/src/test/java/org/apache/camel/quarkus/component/xslt/saxon/it/XsltSaxonTest.java b/integration-tests/xslt-saxon/src/test/java/org/apache/camel/quarkus/component/xslt/saxon/it/XsltSaxonTest.java similarity index 100% rename from integration-tests-jvm/xslt-saxon/src/test/java/org/apache/camel/quarkus/component/xslt/saxon/it/XsltSaxonTest.java rename to integration-tests/xslt-saxon/src/test/java/org/apache/camel/quarkus/component/xslt/saxon/it/XsltSaxonTest.java diff --git a/tooling/scripts/test-categories.yaml b/tooling/scripts/test-categories.yaml index 60147a98516b..d5762c07b498 100644 --- a/tooling/scripts/test-categories.yaml +++ b/tooling/scripts/test-categories.yaml @@ -183,6 +183,7 @@ group-11: - univocity-parsers - velocity - xml-grouped + - xslt-saxon group-12: - aws2-grouped - csimple