You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/04/14 10:17:22 UTC
[camel-quarkus] branch 2.16.x updated (fa5fd0cae1 -> 0280ea8f84)
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a change to branch 2.16.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
from fa5fd0cae1 Ref #4749 - java-joor-dsl - Add templated route support to native mode
new a726b92998 Fix #4710 to register reflection for FastStringBuffer and resource bundle for XMLErrorResources (#4720)
new 8e89f985aa Fix #4043 to group xml tests (#4753)
new 5b25b14a76 Fix #4667 to use quay.io/jbosstm/lra-coordinator
new 0280ea8f84 Use QUARKUS_HTTP_PORT env in LraTestResource (#4670)
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
catalog/pom.xml | 13 ++
.../deployment/XalanNativeImageProcessor.java | 5 +-
.../component/xslt/deployment/XsltProcessor.java | 8 --
integration-test-groups/pom.xml | 1 +
integration-test-groups/xml/jvm/aggregate/pom.xml | 135 +++++++++++++++++++++
.../component/xml/it/XsltAggregateBuilder.java | 15 ++-
.../component/xml/it/XsltAggregateResource.java | 55 +++++++++
.../src/main/resources/application.properties | 2 -
.../src/main/resources/xslt/aggregate.xsl | 0
.../component/xml/it/XsltAggregateTest.java | 23 +++-
integration-test-groups/xml/jvm/bean/pom.xml | 115 ++++++++++++++++++
.../component/xml/it/XsltBeanProducers.java | 35 +-----
.../quarkus/component/xml/it/XsltBeanResource.java | 23 +++-
.../src/main/resources/application.properties | 3 +-
.../main/resources/xslt/classpath-transform.xsl | 0
.../quarkus/component/xml/it/XsltBeanTest.java | 43 +++++++
integration-test-groups/xml/jvm/file/pom.xml | 98 +++++++++++++++
.../quarkus/component/xml/it/XsltFileResource.java | 50 ++++++++
.../src/main/resources/application.properties | 3 +-
.../main/resources/xslt/classpath-transform.xsl | 0
.../quarkus/component/xml/it/XsltFileTest.java | 43 +++++++
integration-test-groups/xml/jvm/http/pom.xml | 103 ++++++++++++++++
.../quarkus/component/xml/it/XsltHttpResource.java | 27 ++++-
.../src/main/resources/application.properties | 3 +-
.../main/resources/xslt/classpath-transform.xsl | 0
.../component/xml/it/XmlHttpTestResource.java | 2 +-
.../quarkus/component/xml/it/XsltHttpTest.java | 45 +++++++
integration-test-groups/xml/jvm/ref/pom.xml | 98 +++++++++++++++
.../quarkus/component/xml/it/XsltRefProducers.java | 22 +++-
.../quarkus/component/xml/it/XsltRefResource.java | 23 +++-
.../ref}/src/main/resources/application.properties | 3 +-
.../main/resources/xslt/classpath-transform.xsl | 0
.../quarkus/component/xml/it/XsltRefTest.java | 43 +++++++
.../xml/native/classpath}/pom.xml | 67 +++-------
.../component/xml/it/FunctionsConfiguration.java | 0
.../quarkus/component/xml/it/XsltProducers.java | 25 +---
.../quarkus/component/xml/it/XsltResource.java | 53 +-------
.../quarkus/component/xml/it/XsltRouteBuilder.java | 25 ++--
.../src/main/resources/application.properties | 0
.../src/main/resources/xslt/aggregate.xsl | 0
.../main/resources/xslt/classpath-transform.xsl | 0
.../src/main/resources/xslt/extension-function.xsl | 0
.../src/main/resources/xslt/html-to-text.xsl | 0
.../src/main/resources/xslt/html-transform.xsl | 0
.../classpath}/src/main/resources/xslt/include.xsl | 0
.../xslt/include_not_existing_resource.xsl | 0
.../src/main/resources/xslt/terminate.xsl | 0
.../camel/quarkus/component/xml/it/XsltIT.java | 2 +-
.../camel/quarkus/component/xml/it/XsltTest.java | 33 +----
.../native/classpath}/src/test/resources/test.html | 0
integration-test-groups/{ => xml}/pom.xml | 22 ++--
integration-tests-jvm/pom.xml | 3 +-
integration-tests-jvm/xml-grouped/.gitignore | 3 +
.../xml-grouped}/pom.xml | 132 +++++++++++++-------
.../quarkus/component/lra/it/LraTestResource.java | 6 +-
integration-tests/pom.xml | 2 +-
integration-tests/xml-grouped/.gitignore | 3 +
integration-tests/{xml => xml-grouped}/pom.xml | 125 ++++++++++---------
pom.xml | 19 +++
tooling/scripts/test-categories.yaml | 2 +-
60 files changed, 1201 insertions(+), 360 deletions(-)
create mode 100644 integration-test-groups/xml/jvm/aggregate/pom.xml
copy integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java => integration-test-groups/xml/jvm/aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateBuilder.java (62%)
create mode 100644 integration-test-groups/xml/jvm/aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateResource.java
copy {integration-tests/xml => integration-test-groups/xml/jvm/aggregate}/src/main/resources/application.properties (77%)
copy {integration-tests/xml => integration-test-groups/xml/jvm/aggregate}/src/main/resources/xslt/aggregate.xsl (100%)
copy integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java => integration-test-groups/xml/jvm/aggregate/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateTest.java (51%)
create mode 100644 integration-test-groups/xml/jvm/bean/pom.xml
copy integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java => integration-test-groups/xml/jvm/bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanProducers.java (55%)
copy integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java => integration-test-groups/xml/jvm/bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanResource.java (59%)
copy {integration-tests/xml => integration-test-groups/xml/jvm/bean}/src/main/resources/application.properties (77%)
copy {integration-tests/xml => integration-test-groups/xml/jvm/bean}/src/main/resources/xslt/classpath-transform.xsl (100%)
create mode 100644 integration-test-groups/xml/jvm/bean/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltBeanTest.java
create mode 100644 integration-test-groups/xml/jvm/file/pom.xml
create mode 100644 integration-test-groups/xml/jvm/file/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltFileResource.java
copy {integration-tests/xml => integration-test-groups/xml/jvm/file}/src/main/resources/application.properties (77%)
copy {integration-tests/xml => integration-test-groups/xml/jvm/file}/src/main/resources/xslt/classpath-transform.xsl (100%)
create mode 100644 integration-test-groups/xml/jvm/file/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltFileTest.java
create mode 100644 integration-test-groups/xml/jvm/http/pom.xml
copy integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java => integration-test-groups/xml/jvm/http/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltHttpResource.java (53%)
copy {integration-tests/xml => integration-test-groups/xml/jvm/http}/src/main/resources/application.properties (77%)
copy {integration-tests/xml => integration-test-groups/xml/jvm/http}/src/main/resources/xslt/classpath-transform.xsl (100%)
rename integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlTestResource.java => integration-test-groups/xml/jvm/http/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlHttpTestResource.java (96%)
create mode 100644 integration-test-groups/xml/jvm/http/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltHttpTest.java
create mode 100644 integration-test-groups/xml/jvm/ref/pom.xml
copy integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java => integration-test-groups/xml/jvm/ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefProducers.java (58%)
copy integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java => integration-test-groups/xml/jvm/ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefResource.java (60%)
copy {integration-tests/xml => integration-test-groups/xml/jvm/ref}/src/main/resources/application.properties (77%)
copy {integration-tests/xml => integration-test-groups/xml/jvm/ref}/src/main/resources/xslt/classpath-transform.xsl (100%)
create mode 100644 integration-test-groups/xml/jvm/ref/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltRefTest.java
copy {integration-tests/xml => integration-test-groups/xml/native/classpath}/pom.xml (80%)
rename {integration-tests/xml => integration-test-groups/xml/native/classpath}/src/main/java/org/apache/camel/quarkus/component/xml/it/FunctionsConfiguration.java (100%)
rename {integration-tests/xml => integration-test-groups/xml/native/classpath}/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java (76%)
rename integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlResource.java => integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltResource.java (73%)
rename integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java => integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRouteBuilder.java (67%)
rename {integration-tests/xml => integration-test-groups/xml/native/classpath}/src/main/resources/application.properties (100%)
rename {integration-tests/xml => integration-test-groups/xml/native/classpath}/src/main/resources/xslt/aggregate.xsl (100%)
rename {integration-tests/xml => integration-test-groups/xml/native/classpath}/src/main/resources/xslt/classpath-transform.xsl (100%)
rename {integration-tests/xml => integration-test-groups/xml/native/classpath}/src/main/resources/xslt/extension-function.xsl (100%)
rename {integration-tests/xml => integration-test-groups/xml/native/classpath}/src/main/resources/xslt/html-to-text.xsl (100%)
rename {integration-tests/xml => integration-test-groups/xml/native/classpath}/src/main/resources/xslt/html-transform.xsl (100%)
rename {integration-tests/xml => integration-test-groups/xml/native/classpath}/src/main/resources/xslt/include.xsl (100%)
rename {integration-tests/xml => integration-test-groups/xml/native/classpath}/src/main/resources/xslt/include_not_existing_resource.xsl (100%)
rename {integration-tests/xml => integration-test-groups/xml/native/classpath}/src/main/resources/xslt/terminate.xsl (100%)
rename integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java => integration-test-groups/xml/native/classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltIT.java (96%)
rename integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlTest.java => integration-test-groups/xml/native/classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltTest.java (85%)
rename {integration-tests/xml => integration-test-groups/xml/native/classpath}/src/test/resources/test.html (100%)
copy integration-test-groups/{ => xml}/pom.xml (70%)
create mode 100644 integration-tests-jvm/xml-grouped/.gitignore
copy {integration-tests/xml => integration-tests-jvm/xml-grouped}/pom.xml (72%)
create mode 100644 integration-tests/xml-grouped/.gitignore
rename integration-tests/{xml => xml-grouped}/pom.xml (73%)
[camel-quarkus] 02/04: Fix #4043 to group xml tests (#4753)
Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch 2.16.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 8e89f985aa64605d3c08ec17b6eb2debea460ba0
Author: Zheng Feng <zh...@gmail.com>
AuthorDate: Fri Apr 7 21:48:56 2023 +0800
Fix #4043 to group xml tests (#4753)
---
catalog/pom.xml | 13 ++
.../component/xslt/deployment/XsltProcessor.java | 8 --
integration-test-groups/pom.xml | 1 +
integration-test-groups/xml/jvm/aggregate/pom.xml | 135 +++++++++++++++++++++
.../component/xml/it/XsltAggregateBuilder.java | 15 ++-
.../component/xml/it/XsltAggregateResource.java | 55 +++++++++
.../src/main/resources/application.properties | 2 -
.../src/main/resources/xslt/aggregate.xsl | 0
.../component/xml/it/XsltAggregateTest.java | 23 +++-
integration-test-groups/xml/jvm/bean/pom.xml | 115 ++++++++++++++++++
.../component/xml/it/XsltBeanProducers.java | 35 +-----
.../quarkus/component/xml/it/XsltBeanResource.java | 23 +++-
.../src/main/resources/application.properties | 3 +-
.../main/resources/xslt/classpath-transform.xsl | 0
.../quarkus/component/xml/it/XsltBeanTest.java | 43 +++++++
integration-test-groups/xml/jvm/file/pom.xml | 98 +++++++++++++++
.../quarkus/component/xml/it/XsltFileResource.java | 50 ++++++++
.../src/main/resources/application.properties | 3 +-
.../main/resources/xslt/classpath-transform.xsl | 0
.../quarkus/component/xml/it/XsltFileTest.java | 43 +++++++
integration-test-groups/xml/jvm/http/pom.xml | 103 ++++++++++++++++
.../quarkus/component/xml/it/XsltHttpResource.java | 27 ++++-
.../src/main/resources/application.properties | 3 +-
.../main/resources/xslt/classpath-transform.xsl | 0
.../component/xml/it/XmlHttpTestResource.java | 2 +-
.../quarkus/component/xml/it/XsltHttpTest.java | 45 +++++++
integration-test-groups/xml/jvm/ref/pom.xml | 98 +++++++++++++++
.../quarkus/component/xml/it/XsltRefProducers.java | 22 +++-
.../quarkus/component/xml/it/XsltRefResource.java | 23 +++-
.../ref}/src/main/resources/application.properties | 3 +-
.../main/resources/xslt/classpath-transform.xsl | 0
.../quarkus/component/xml/it/XsltRefTest.java | 43 +++++++
.../xml/native/classpath}/pom.xml | 67 +++-------
.../component/xml/it/FunctionsConfiguration.java | 0
.../quarkus/component/xml/it/XsltProducers.java | 25 +---
.../quarkus/component/xml/it/XsltResource.java | 53 +-------
.../quarkus/component/xml/it/XsltRouteBuilder.java | 18 +--
.../src/main/resources/application.properties | 0
.../src/main/resources/xslt/aggregate.xsl | 0
.../main/resources/xslt/classpath-transform.xsl | 0
.../src/main/resources/xslt/extension-function.xsl | 0
.../src/main/resources/xslt/html-to-text.xsl | 0
.../src/main/resources/xslt/html-transform.xsl | 0
.../classpath}/src/main/resources/xslt/include.xsl | 0
.../xslt/include_not_existing_resource.xsl | 0
.../src/main/resources/xslt/terminate.xsl | 0
.../camel/quarkus/component/xml/it/XsltIT.java | 2 +-
.../camel/quarkus/component/xml/it/XsltTest.java | 33 +----
.../native/classpath}/src/test/resources/test.html | 0
integration-test-groups/{ => xml}/pom.xml | 22 ++--
integration-tests-jvm/pom.xml | 3 +-
integration-tests-jvm/xml-grouped/.gitignore | 3 +
.../xml-grouped}/pom.xml | 132 +++++++++++++-------
integration-tests/pom.xml | 2 +-
integration-tests/xml-grouped/.gitignore | 3 +
integration-tests/{xml => xml-grouped}/pom.xml | 125 ++++++++++---------
pom.xml | 19 +++
tooling/scripts/test-categories.yaml | 2 +-
58 files changed, 1189 insertions(+), 354 deletions(-)
diff --git a/catalog/pom.xml b/catalog/pom.xml
index b8681fa3df..9afb8b831f 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -3711,6 +3711,19 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-support-dsl</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-support-google-cloud</artifactId>
diff --git a/extensions/xslt/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/deployment/XsltProcessor.java b/extensions/xslt/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/deployment/XsltProcessor.java
index 02afa701e4..5fcfe02357 100644
--- a/extensions/xslt/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/deployment/XsltProcessor.java
+++ b/extensions/xslt/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/deployment/XsltProcessor.java
@@ -36,7 +36,6 @@ import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.GeneratedClassBuildItem;
-import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
import io.quarkus.runtime.RuntimeValue;
import org.apache.camel.component.xslt.XsltComponent;
import org.apache.camel.quarkus.component.xslt.CamelXsltConfig;
@@ -149,11 +148,4 @@ class XsltProcessor {
}
}
}
-
- //It should be removed with fixing https://github.com/apache/camel-quarkus/issues/1615
- @BuildStep
- RuntimeInitializedClassBuildItem runtimeInit() {
- return new RuntimeInitializedClassBuildItem("org.apache.hc.client5.http.impl.auth.NTLMEngineImpl");
- }
-
}
diff --git a/integration-test-groups/pom.xml b/integration-test-groups/pom.xml
index 2fa89e1618..9f0afae7b5 100644
--- a/integration-test-groups/pom.xml
+++ b/integration-test-groups/pom.xml
@@ -45,6 +45,7 @@
<module>cxf-soap</module>
<module>foundation</module>
<module>mongodb</module>
+ <module>xml</module>
</modules>
</project>
diff --git a/integration-test-groups/xml/jvm/aggregate/pom.xml b/integration-test-groups/xml/jvm/aggregate/pom.xml
new file mode 100644
index 0000000000..55626ba496
--- /dev/null
+++ b/integration-test-groups/xml/jvm/aggregate/pom.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-build-parent-it</artifactId>
+ <version>2.16.0</version>
+ <relativePath>../../../../poms/build-parent-it/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-xslt-aggregate</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: Xslt Aggregate</name>
+ <description>Integration tests for Camel Quarkus Xslt with aggregate</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt-saxon</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-direct</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-mock</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-integration-tests-support-xslt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>virtualDependencies</id>
+ <activation>
+ <property>
+ <name>!noVirtualDependencies</name>
+ </property>
+ </activation>
+ <dependencies>
+ <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-direct-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-mock-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
+ </profiles>
+</project>
diff --git a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java b/integration-test-groups/xml/jvm/aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateBuilder.java
similarity index 62%
copy from integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
copy to integration-test-groups/xml/jvm/aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateBuilder.java
index f5312ad7dd..93b9c21193 100644
--- a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
+++ b/integration-test-groups/xml/jvm/aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateBuilder.java
@@ -16,9 +16,18 @@
*/
package org.apache.camel.quarkus.component.xml.it;
-import io.quarkus.test.junit.QuarkusIntegrationTest;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.xslt.saxon.XsltSaxonAggregationStrategy;
-@QuarkusIntegrationTest
-class XmlIT extends XmlTest {
+public class XsltAggregateBuilder extends RouteBuilder {
+ @Override
+ public void configure() {
+ from("direct:aggregate")
+ .aggregate(new XsltSaxonAggregationStrategy("xslt/aggregate.xsl"))
+ .constant(true)
+ .completionSize(3)
+ .log("after aggregate body: ${body}")
+ .to("mock:transformed");
+ }
}
diff --git a/integration-test-groups/xml/jvm/aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateResource.java b/integration-test-groups/xml/jvm/aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateResource.java
new file mode 100644
index 0000000000..572d70a180
--- /dev/null
+++ b/integration-test-groups/xml/jvm/aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateResource.java
@@ -0,0 +1,55 @@
+/*
+ * 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.xml.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.mock.MockEndpoint;
+
+@Path("/xml")
+@ApplicationScoped
+public class XsltAggregateResource {
+
+ @Inject
+ ProducerTemplate producerTemplate;
+
+ @Inject
+ CamelContext camelContext;
+
+ @Path("/aggregate")
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public String aggregate() throws Exception {
+ MockEndpoint mock = camelContext.getEndpoint("mock:transformed", MockEndpoint.class);
+ mock.expectedMessageCount(1);
+
+ producerTemplate.sendBody("direct:aggregate", "<item>A</item>");
+ producerTemplate.sendBody("direct:aggregate", "<item>B</item>");
+ producerTemplate.sendBody("direct:aggregate", "<item>C</item>");
+
+ mock.assertIsSatisfied();
+ return mock.getExchanges().get(0).getIn().getBody(String.class);
+
+ }
+}
diff --git a/integration-tests/xml/src/main/resources/application.properties b/integration-test-groups/xml/jvm/aggregate/src/main/resources/application.properties
similarity index 77%
copy from integration-tests/xml/src/main/resources/application.properties
copy to integration-test-groups/xml/jvm/aggregate/src/main/resources/application.properties
index e3c54d8308..8f1cf7eb00 100644
--- a/integration-tests/xml/src/main/resources/application.properties
+++ b/integration-test-groups/xml/jvm/aggregate/src/main/resources/application.properties
@@ -23,5 +23,3 @@ quarkus.log.category."org.apache.camel.quarkus.core.deployment".level = INFO
#
# Quarkus - Camel
#
-quarkus.camel.xslt.sources = xslt/classpath-transform.xsl,xslt/html-transform.xsl,xslt/html-to-text.xsl,xslt/extension-function.xsl,xslt/include_not_existing_resource.xsl,xslt/aggregate.xsl,xslt/terminate.xsl
-quarkus.camel.xslt.features."http\://javax.xml.XMLConstants/feature/secure-processing" = false
diff --git a/integration-tests/xml/src/main/resources/xslt/aggregate.xsl b/integration-test-groups/xml/jvm/aggregate/src/main/resources/xslt/aggregate.xsl
similarity index 100%
copy from integration-tests/xml/src/main/resources/xslt/aggregate.xsl
copy to integration-test-groups/xml/jvm/aggregate/src/main/resources/xslt/aggregate.xsl
diff --git a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java b/integration-test-groups/xml/jvm/aggregate/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateTest.java
similarity index 51%
copy from integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
copy to integration-test-groups/xml/jvm/aggregate/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateTest.java
index f5312ad7dd..a4eedb6451 100644
--- a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
+++ b/integration-test-groups/xml/jvm/aggregate/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateTest.java
@@ -16,9 +16,26 @@
*/
package org.apache.camel.quarkus.component.xml.it;
-import io.quarkus.test.junit.QuarkusIntegrationTest;
+import io.quarkus.test.junit.DisabledOnIntegrationTest;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
-@QuarkusIntegrationTest
-class XmlIT extends XmlTest {
+@QuarkusTest
+public class XsltAggregateTest {
+ @Test
+ @DisabledOnIntegrationTest("Generating xslt templates dynamically does not be supported in native mode")
+ public void aggregate() {
+ final String actual = RestAssured.given()
+ .accept(ContentType.TEXT)
+ .get("/xml/aggregate")
+ .then()
+ .statusCode(200)
+ .extract().body().asString().trim().replaceAll(">\\s+<", "><");
+
+ Assertions.assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?><item>ABC</item>", actual);
+ }
}
diff --git a/integration-test-groups/xml/jvm/bean/pom.xml b/integration-test-groups/xml/jvm/bean/pom.xml
new file mode 100644
index 0000000000..5558a75935
--- /dev/null
+++ b/integration-test-groups/xml/jvm/bean/pom.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-build-parent-it</artifactId>
+ <version>2.16.0</version>
+ <relativePath>../../../../poms/build-parent-it/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-xslt-bean</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: Xslt Bean</name>
+ <description>Integration tests for Camel Quarkus Xslt with bean schema</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-bean</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-integration-tests-support-xslt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>virtualDependencies</id>
+ <activation>
+ <property>
+ <name>!noVirtualDependencies</name>
+ </property>
+ </activation>
+ <dependencies>
+ <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-bean-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java b/integration-test-groups/xml/jvm/bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanProducers.java
similarity index 55%
copy from integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java
copy to integration-test-groups/xml/jvm/bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanProducers.java
index 35147bbaa0..356f964f79 100644
--- a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java
+++ b/integration-test-groups/xml/jvm/bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanProducers.java
@@ -17,53 +17,20 @@
package org.apache.camel.quarkus.component.xml.it;
-import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import javax.enterprise.context.Dependent;
import javax.inject.Inject;
import javax.inject.Named;
-import javax.xml.transform.Source;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.URIResolver;
-import javax.xml.transform.stream.StreamSource;
import org.apache.camel.CamelContext;
-import org.apache.camel.support.ResourceHelper;
@Dependent
-public class XsltProducers {
- public static final String EXPECTED_XML_CONSTANT = "<data>FOO DATA</data>";
+public class XsltBeanProducers {
@Inject
CamelContext context;
- @Named("customURIResolver")
- public URIResolver getCustomURIResolver() {
- return new URIResolver() {
-
- @Override
- public Source resolve(String href, String base) throws TransformerException {
- if (href.equals("xslt/include_not_existing_resource.xsl")) {
- try {
- InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(context, href);
- return new StreamSource(is);
- } catch (Exception e) {
- throw new TransformerException(e);
- }
- }
-
- Source constantResult = new StreamSource(new ByteArrayInputStream(EXPECTED_XML_CONSTANT.getBytes()));
- return constantResult;
- }
- };
- }
-
- @Named("xslt_resource")
- public String getXsltResource() throws Exception {
- return getXsltContent();
- }
-
@Named("xslt_bean")
public XsltBean getXsltBean() {
return new XsltBean();
diff --git a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java b/integration-test-groups/xml/jvm/bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanResource.java
similarity index 59%
copy from integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
copy to integration-test-groups/xml/jvm/bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanResource.java
index f5312ad7dd..3c6f836448 100644
--- a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
+++ b/integration-test-groups/xml/jvm/bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanResource.java
@@ -16,9 +16,26 @@
*/
package org.apache.camel.quarkus.component.xml.it;
-import io.quarkus.test.junit.QuarkusIntegrationTest;
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
-@QuarkusIntegrationTest
-class XmlIT extends XmlTest {
+import org.apache.camel.ProducerTemplate;
+@Path("/xml")
+@ApplicationScoped
+public class XsltBeanResource {
+
+ @Inject
+ ProducerTemplate producerTemplate;
+
+ @Path("/xslt-bean")
+ @POST
+ @Produces(MediaType.TEXT_PLAIN)
+ public String xsltBean(String body) {
+ return producerTemplate.requestBody("xslt:bean:xslt_bean.getXsltResource", body, String.class);
+ }
}
diff --git a/integration-tests/xml/src/main/resources/application.properties b/integration-test-groups/xml/jvm/bean/src/main/resources/application.properties
similarity index 77%
copy from integration-tests/xml/src/main/resources/application.properties
copy to integration-test-groups/xml/jvm/bean/src/main/resources/application.properties
index e3c54d8308..6ef0ccc909 100644
--- a/integration-tests/xml/src/main/resources/application.properties
+++ b/integration-test-groups/xml/jvm/bean/src/main/resources/application.properties
@@ -23,5 +23,4 @@ quarkus.log.category."org.apache.camel.quarkus.core.deployment".level = INFO
#
# Quarkus - Camel
#
-quarkus.camel.xslt.sources = xslt/classpath-transform.xsl,xslt/html-transform.xsl,xslt/html-to-text.xsl,xslt/extension-function.xsl,xslt/include_not_existing_resource.xsl,xslt/aggregate.xsl,xslt/terminate.xsl
-quarkus.camel.xslt.features."http\://javax.xml.XMLConstants/feature/secure-processing" = false
+quarkus.camel.xslt.sources = xslt/classpath-transform.xsl
diff --git a/integration-tests/xml/src/main/resources/xslt/classpath-transform.xsl b/integration-test-groups/xml/jvm/bean/src/main/resources/xslt/classpath-transform.xsl
similarity index 100%
copy from integration-tests/xml/src/main/resources/xslt/classpath-transform.xsl
copy to integration-test-groups/xml/jvm/bean/src/main/resources/xslt/classpath-transform.xsl
diff --git a/integration-test-groups/xml/jvm/bean/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltBeanTest.java b/integration-test-groups/xml/jvm/bean/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltBeanTest.java
new file mode 100644
index 0000000000..4e0345df92
--- /dev/null
+++ b/integration-test-groups/xml/jvm/bean/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltBeanTest.java
@@ -0,0 +1,43 @@
+/*
+ * 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.xml.it;
+
+import io.quarkus.test.junit.DisabledOnIntegrationTest;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class XsltBeanTest {
+ private static final String BODY = "<mail><subject>Hey</subject><body>Hello world!</body></mail>";
+
+ @Test
+ @DisabledOnIntegrationTest("Generating xslt templates dynamically does not be supported in native mode")
+ public void xsltBean() {
+ final String actual = RestAssured.given()
+ .body(BODY)
+ .post("/xml/xslt-bean")
+ .then()
+ .statusCode(200)
+ .extract().body().asString().trim().replaceAll(">\\s+<", "><");
+
+ Assertions.assertEquals(
+ "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><classpath-xsl subject=\"Hey\"><cheese><mail><subject>Hey</subject><body>Hello world!</body></mail></cheese></classpath-xsl>",
+ actual);
+ }
+}
diff --git a/integration-test-groups/xml/jvm/file/pom.xml b/integration-test-groups/xml/jvm/file/pom.xml
new file mode 100644
index 0000000000..44728114ae
--- /dev/null
+++ b/integration-test-groups/xml/jvm/file/pom.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-build-parent-it</artifactId>
+ <version>2.16.0</version>
+ <relativePath>../../../../poms/build-parent-it/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-xslt-file</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: Xslt File</name>
+ <description>Integration tests for Camel Quarkus Xslt with file schema</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-integration-tests-support-xslt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>virtualDependencies</id>
+ <activation>
+ <property>
+ <name>!noVirtualDependencies</name>
+ </property>
+ </activation>
+ <dependencies>
+ <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/integration-test-groups/xml/jvm/file/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltFileResource.java b/integration-test-groups/xml/jvm/file/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltFileResource.java
new file mode 100644
index 0000000000..2cbf6e39f9
--- /dev/null
+++ b/integration-test-groups/xml/jvm/file/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltFileResource.java
@@ -0,0 +1,50 @@
+/*
+ * 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.xml.it;
+
+import java.io.File;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.StandardCopyOption;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.camel.ProducerTemplate;
+
+@Path("/xml")
+@ApplicationScoped
+public class XsltFileResource {
+
+ @Inject
+ ProducerTemplate producerTemplate;
+
+ @Path("/xslt-file")
+ @POST
+ @Produces(MediaType.TEXT_PLAIN)
+ public String xsltFile(String body) throws Exception {
+ try (InputStream in = getClass().getClassLoader().getResourceAsStream("xslt/classpath-transform.xsl")) {
+ File file = File.createTempFile("xslt", ".xsl");
+ Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
+ return producerTemplate.requestBody("xslt:file:" + file, body, String.class);
+ }
+ }
+}
diff --git a/integration-tests/xml/src/main/resources/application.properties b/integration-test-groups/xml/jvm/file/src/main/resources/application.properties
similarity index 77%
copy from integration-tests/xml/src/main/resources/application.properties
copy to integration-test-groups/xml/jvm/file/src/main/resources/application.properties
index e3c54d8308..6ef0ccc909 100644
--- a/integration-tests/xml/src/main/resources/application.properties
+++ b/integration-test-groups/xml/jvm/file/src/main/resources/application.properties
@@ -23,5 +23,4 @@ quarkus.log.category."org.apache.camel.quarkus.core.deployment".level = INFO
#
# Quarkus - Camel
#
-quarkus.camel.xslt.sources = xslt/classpath-transform.xsl,xslt/html-transform.xsl,xslt/html-to-text.xsl,xslt/extension-function.xsl,xslt/include_not_existing_resource.xsl,xslt/aggregate.xsl,xslt/terminate.xsl
-quarkus.camel.xslt.features."http\://javax.xml.XMLConstants/feature/secure-processing" = false
+quarkus.camel.xslt.sources = xslt/classpath-transform.xsl
diff --git a/integration-tests/xml/src/main/resources/xslt/classpath-transform.xsl b/integration-test-groups/xml/jvm/file/src/main/resources/xslt/classpath-transform.xsl
similarity index 100%
copy from integration-tests/xml/src/main/resources/xslt/classpath-transform.xsl
copy to integration-test-groups/xml/jvm/file/src/main/resources/xslt/classpath-transform.xsl
diff --git a/integration-test-groups/xml/jvm/file/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltFileTest.java b/integration-test-groups/xml/jvm/file/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltFileTest.java
new file mode 100644
index 0000000000..08cec8e46c
--- /dev/null
+++ b/integration-test-groups/xml/jvm/file/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltFileTest.java
@@ -0,0 +1,43 @@
+/*
+ * 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.xml.it;
+
+import io.quarkus.test.junit.DisabledOnIntegrationTest;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class XsltFileTest {
+ private static final String BODY = "<mail><subject>Hey</subject><body>Hello world!</body></mail>";
+
+ @Test
+ @DisabledOnIntegrationTest("Generating xslt templates dynamically does not be supported in native mode")
+ public void xsltFile() {
+ final String actual = RestAssured.given()
+ .body(BODY)
+ .post("/xml/xslt-file")
+ .then()
+ .statusCode(200)
+ .extract().body().asString().trim().replaceAll(">\\s+<", "><");
+
+ Assertions.assertEquals(
+ "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><classpath-xsl subject=\"Hey\"><cheese><mail><subject>Hey</subject><body>Hello world!</body></mail></cheese></classpath-xsl>",
+ actual);
+ }
+}
diff --git a/integration-test-groups/xml/jvm/http/pom.xml b/integration-test-groups/xml/jvm/http/pom.xml
new file mode 100644
index 0000000000..68b595a0fc
--- /dev/null
+++ b/integration-test-groups/xml/jvm/http/pom.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-build-parent-it</artifactId>
+ <version>2.16.0</version>
+ <relativePath>../../../../poms/build-parent-it/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-xslt-http</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: Xslt HTTP</name>
+ <description>Integration tests for Camel Quarkus Xslt with http schema</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-integration-tests-support-xslt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-integration-wiremock-support</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>virtualDependencies</id>
+ <activation>
+ <property>
+ <name>!noVirtualDependencies</name>
+ </property>
+ </activation>
+ <dependencies>
+ <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java b/integration-test-groups/xml/jvm/http/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltHttpResource.java
similarity index 53%
copy from integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
copy to integration-test-groups/xml/jvm/http/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltHttpResource.java
index f5312ad7dd..dd9ce4dcbf 100644
--- a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
+++ b/integration-test-groups/xml/jvm/http/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltHttpResource.java
@@ -16,9 +16,30 @@
*/
package org.apache.camel.quarkus.component.xml.it;
-import io.quarkus.test.junit.QuarkusIntegrationTest;
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
-@QuarkusIntegrationTest
-class XmlIT extends XmlTest {
+import org.apache.camel.ProducerTemplate;
+import org.eclipse.microprofile.config.ConfigProvider;
+@Path("/xml")
+@ApplicationScoped
+public class XsltHttpResource {
+
+ @Inject
+ ProducerTemplate producerTemplate;
+
+ @Path("/xslt-http")
+ @POST
+ @Produces(MediaType.TEXT_PLAIN)
+ public String xsltHttp(String body) {
+ String serverURL = ConfigProvider.getConfig()
+ .getConfigValue("xslt.server-url")
+ .getRawValue();
+ return producerTemplate.requestBody("xslt:" + serverURL + "/xslt", body, String.class);
+ }
}
diff --git a/integration-tests/xml/src/main/resources/application.properties b/integration-test-groups/xml/jvm/http/src/main/resources/application.properties
similarity index 77%
copy from integration-tests/xml/src/main/resources/application.properties
copy to integration-test-groups/xml/jvm/http/src/main/resources/application.properties
index e3c54d8308..6ef0ccc909 100644
--- a/integration-tests/xml/src/main/resources/application.properties
+++ b/integration-test-groups/xml/jvm/http/src/main/resources/application.properties
@@ -23,5 +23,4 @@ quarkus.log.category."org.apache.camel.quarkus.core.deployment".level = INFO
#
# Quarkus - Camel
#
-quarkus.camel.xslt.sources = xslt/classpath-transform.xsl,xslt/html-transform.xsl,xslt/html-to-text.xsl,xslt/extension-function.xsl,xslt/include_not_existing_resource.xsl,xslt/aggregate.xsl,xslt/terminate.xsl
-quarkus.camel.xslt.features."http\://javax.xml.XMLConstants/feature/secure-processing" = false
+quarkus.camel.xslt.sources = xslt/classpath-transform.xsl
diff --git a/integration-tests/xml/src/main/resources/xslt/classpath-transform.xsl b/integration-test-groups/xml/jvm/http/src/main/resources/xslt/classpath-transform.xsl
similarity index 100%
copy from integration-tests/xml/src/main/resources/xslt/classpath-transform.xsl
copy to integration-test-groups/xml/jvm/http/src/main/resources/xslt/classpath-transform.xsl
diff --git a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlTestResource.java b/integration-test-groups/xml/jvm/http/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlHttpTestResource.java
similarity index 96%
rename from integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlTestResource.java
rename to integration-test-groups/xml/jvm/http/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlHttpTestResource.java
index c8b228f928..1e5dffe377 100644
--- a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlTestResource.java
+++ b/integration-test-groups/xml/jvm/http/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlHttpTestResource.java
@@ -29,7 +29,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.get;
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
-public class XmlTestResource implements QuarkusTestResourceLifecycleManager {
+public class XmlHttpTestResource implements QuarkusTestResourceLifecycleManager {
private WireMockServer server;
@Override
diff --git a/integration-test-groups/xml/jvm/http/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltHttpTest.java b/integration-test-groups/xml/jvm/http/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltHttpTest.java
new file mode 100644
index 0000000000..a5468b7208
--- /dev/null
+++ b/integration-test-groups/xml/jvm/http/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltHttpTest.java
@@ -0,0 +1,45 @@
+/*
+ * 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.xml.it;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.DisabledOnIntegrationTest;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+@QuarkusTestResource(XmlHttpTestResource.class)
+class XsltHttpTest {
+ private static final String BODY = "<mail><subject>Hey</subject><body>Hello world!</body></mail>";
+
+ @Test
+ @DisabledOnIntegrationTest("Generating xslt templates dynamically does not be supported in native mode")
+ public void xsltBean() {
+ final String actual = RestAssured.given()
+ .body(BODY)
+ .post("/xml/xslt-http")
+ .then()
+ .statusCode(200)
+ .extract().body().asString().trim().replaceAll(">\\s+<", "><");
+
+ Assertions.assertEquals(
+ "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><classpath-xsl subject=\"Hey\"><cheese><mail><subject>Hey</subject><body>Hello world!</body></mail></cheese></classpath-xsl>",
+ actual);
+ }
+}
diff --git a/integration-test-groups/xml/jvm/ref/pom.xml b/integration-test-groups/xml/jvm/ref/pom.xml
new file mode 100644
index 0000000000..fe7f909a79
--- /dev/null
+++ b/integration-test-groups/xml/jvm/ref/pom.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-build-parent-it</artifactId>
+ <version>2.16.0</version>
+ <relativePath>../../../../poms/build-parent-it/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-xslt-ref</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: Xslt Ref</name>
+ <description>Integration tests for Camel Quarkus Xslt with ref schema</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-integration-tests-support-xslt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>virtualDependencies</id>
+ <activation>
+ <property>
+ <name>!noVirtualDependencies</name>
+ </property>
+ </activation>
+ <dependencies>
+ <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java b/integration-test-groups/xml/jvm/ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefProducers.java
similarity index 58%
copy from integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
copy to integration-test-groups/xml/jvm/ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefProducers.java
index f5312ad7dd..b9b6adc68b 100644
--- a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
+++ b/integration-test-groups/xml/jvm/ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefProducers.java
@@ -14,11 +14,27 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.apache.camel.quarkus.component.xml.it;
-import io.quarkus.test.junit.QuarkusIntegrationTest;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+
+import javax.enterprise.context.Dependent;
+import javax.inject.Named;
+
+@Dependent
+public class XsltRefProducers {
-@QuarkusIntegrationTest
-class XmlIT extends XmlTest {
+ @Named("xslt_resource")
+ public String getXsltResource() throws Exception {
+ return getXsltContent();
+ }
+ private static String getXsltContent() throws Exception {
+ try (InputStream in = Thread.currentThread().getContextClassLoader()
+ .getResourceAsStream("xslt/classpath-transform.xsl")) {
+ return new String(in.readAllBytes(), StandardCharsets.UTF_8);
+ }
+ }
}
diff --git a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java b/integration-test-groups/xml/jvm/ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefResource.java
similarity index 60%
copy from integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
copy to integration-test-groups/xml/jvm/ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefResource.java
index f5312ad7dd..0ef35f408a 100644
--- a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
+++ b/integration-test-groups/xml/jvm/ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefResource.java
@@ -16,9 +16,26 @@
*/
package org.apache.camel.quarkus.component.xml.it;
-import io.quarkus.test.junit.QuarkusIntegrationTest;
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
-@QuarkusIntegrationTest
-class XmlIT extends XmlTest {
+import org.apache.camel.ProducerTemplate;
+@Path("/xml")
+@ApplicationScoped
+public class XsltRefResource {
+
+ @Inject
+ ProducerTemplate producerTemplate;
+
+ @Path("/xslt-ref")
+ @POST
+ @Produces(MediaType.TEXT_PLAIN)
+ public String xsltBean(String body) {
+ return producerTemplate.requestBody("xslt:ref:xslt_resource", body, String.class);
+ }
}
diff --git a/integration-tests/xml/src/main/resources/application.properties b/integration-test-groups/xml/jvm/ref/src/main/resources/application.properties
similarity index 77%
copy from integration-tests/xml/src/main/resources/application.properties
copy to integration-test-groups/xml/jvm/ref/src/main/resources/application.properties
index e3c54d8308..6ef0ccc909 100644
--- a/integration-tests/xml/src/main/resources/application.properties
+++ b/integration-test-groups/xml/jvm/ref/src/main/resources/application.properties
@@ -23,5 +23,4 @@ quarkus.log.category."org.apache.camel.quarkus.core.deployment".level = INFO
#
# Quarkus - Camel
#
-quarkus.camel.xslt.sources = xslt/classpath-transform.xsl,xslt/html-transform.xsl,xslt/html-to-text.xsl,xslt/extension-function.xsl,xslt/include_not_existing_resource.xsl,xslt/aggregate.xsl,xslt/terminate.xsl
-quarkus.camel.xslt.features."http\://javax.xml.XMLConstants/feature/secure-processing" = false
+quarkus.camel.xslt.sources = xslt/classpath-transform.xsl
diff --git a/integration-tests/xml/src/main/resources/xslt/classpath-transform.xsl b/integration-test-groups/xml/jvm/ref/src/main/resources/xslt/classpath-transform.xsl
similarity index 100%
copy from integration-tests/xml/src/main/resources/xslt/classpath-transform.xsl
copy to integration-test-groups/xml/jvm/ref/src/main/resources/xslt/classpath-transform.xsl
diff --git a/integration-test-groups/xml/jvm/ref/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltRefTest.java b/integration-test-groups/xml/jvm/ref/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltRefTest.java
new file mode 100644
index 0000000000..ff852d9294
--- /dev/null
+++ b/integration-test-groups/xml/jvm/ref/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltRefTest.java
@@ -0,0 +1,43 @@
+/*
+ * 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.xml.it;
+
+import io.quarkus.test.junit.DisabledOnIntegrationTest;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class XsltRefTest {
+ private static final String BODY = "<mail><subject>Hey</subject><body>Hello world!</body></mail>";
+
+ @Test
+ @DisabledOnIntegrationTest("Generating xslt templates dynamically does not be supported in native mode")
+ public void xsltRef() {
+ final String actual = RestAssured.given()
+ .body(BODY)
+ .post("/xml/xslt-ref")
+ .then()
+ .statusCode(200)
+ .extract().body().asString().trim().replaceAll(">\\s+<", "><");
+
+ Assertions.assertEquals(
+ "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><classpath-xsl subject=\"Hey\"><cheese><mail><subject>Hey</subject><body>Hello world!</body></mail></cheese></classpath-xsl>",
+ actual);
+ }
+}
diff --git a/integration-tests/xml/pom.xml b/integration-test-groups/xml/native/classpath/pom.xml
similarity index 80%
copy from integration-tests/xml/pom.xml
copy to integration-test-groups/xml/native/classpath/pom.xml
index b5f944f5f7..27fdcf1099 100644
--- a/integration-tests/xml/pom.xml
+++ b/integration-test-groups/xml/native/classpath/pom.xml
@@ -23,33 +23,29 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-build-parent-it</artifactId>
<version>2.16.0</version>
- <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
+ <relativePath>../../../../poms/build-parent-it/pom.xml</relativePath>
</parent>
- <artifactId>camel-quarkus-integration-test-xml</artifactId>
- <name>Camel Quarkus :: Integration Tests :: XML</name>
- <description>Integration tests for various XML related extensions</description>
+ <artifactId>camel-quarkus-integration-test-xslt-classpath</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: Xslt Classpath</name>
+ <description>Integration tests for Camel Quarkus Xslt with classpath schema</description>
<dependencies>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-xslt</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-xslt-saxon</artifactId>
- </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-xpath</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-stax</artifactId>
+ <artifactId>camel-quarkus-language</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-bean</artifactId>
+ <artifactId>camel-quarkus-stax</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
@@ -63,10 +59,6 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-seda</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-support-stax</artifactId>
- </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-integration-tests-support-xslt</artifactId>
@@ -87,14 +79,8 @@
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-integration-wiremock-support</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
-
<profiles>
<profile>
<id>native</id>
@@ -134,7 +120,7 @@
<!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-bean-deployment</artifactId>
+ <artifactId>camel-quarkus-direct-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
@@ -147,7 +133,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-direct-deployment</artifactId>
+ <artifactId>camel-quarkus-language-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
@@ -197,19 +183,6 @@
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-support-stax-deployment</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>*</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-xpath-deployment</artifactId>
@@ -236,21 +209,19 @@
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-xslt-saxon-deployment</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>*</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/FunctionsConfiguration.java b/integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/FunctionsConfiguration.java
similarity index 100%
rename from integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/FunctionsConfiguration.java
rename to integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/FunctionsConfiguration.java
diff --git a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java b/integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java
similarity index 76%
rename from integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java
rename to integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java
index 35147bbaa0..36bbf36cbe 100644
--- a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java
+++ b/integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java
@@ -19,7 +19,6 @@ package org.apache.camel.quarkus.component.xml.it;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
-import java.nio.charset.StandardCharsets;
import javax.enterprise.context.Dependent;
import javax.inject.Inject;
@@ -35,6 +34,7 @@ import org.apache.camel.support.ResourceHelper;
@Dependent
public class XsltProducers {
public static final String EXPECTED_XML_CONSTANT = "<data>FOO DATA</data>";
+
@Inject
CamelContext context;
@@ -58,27 +58,4 @@ public class XsltProducers {
}
};
}
-
- @Named("xslt_resource")
- public String getXsltResource() throws Exception {
- return getXsltContent();
- }
-
- @Named("xslt_bean")
- public XsltBean getXsltBean() {
- return new XsltBean();
- }
-
- public static class XsltBean {
- public String getXsltResource() throws Exception {
- return getXsltContent();
- }
- }
-
- private static String getXsltContent() throws Exception {
- try (InputStream in = Thread.currentThread().getContextClassLoader()
- .getResourceAsStream("xslt/classpath-transform.xsl")) {
- return new String(in.readAllBytes(), StandardCharsets.UTF_8);
- }
- }
}
diff --git a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlResource.java b/integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltResource.java
similarity index 73%
rename from integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlResource.java
rename to integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltResource.java
index 21b9da6b3d..961362dda8 100644
--- a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlResource.java
+++ b/integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltResource.java
@@ -16,10 +16,6 @@
*/
package org.apache.camel.quarkus.component.xml.it;
-import java.io.File;
-import java.io.InputStream;
-import java.nio.file.Files;
-import java.nio.file.StandardCopyOption;
import java.util.StringJoiner;
import javax.enterprise.context.ApplicationScoped;
@@ -38,14 +34,13 @@ import org.apache.camel.ConsumerTemplate;
import org.apache.camel.Exchange;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.component.mock.MockEndpoint;
-import org.eclipse.microprofile.config.ConfigProvider;
import org.jboss.logging.Logger;
@Path("/xml")
@ApplicationScoped
-public class XmlResource {
+public class XsltResource {
- private static final Logger LOG = Logger.getLogger(XmlResource.class);
+ private static final Logger LOG = Logger.getLogger(XsltResource.class);
@Inject
ProducerTemplate producerTemplate;
@@ -98,41 +93,6 @@ public class XmlResource {
String.class);
}
- @Path("/xslt-ref")
- @POST
- @Produces(MediaType.TEXT_PLAIN)
- public String xsltRef(String body) {
- return producerTemplate.requestBody("xslt:ref:xslt_resource", body, String.class);
- }
-
- @Path("/xslt-bean")
- @POST
- @Produces(MediaType.TEXT_PLAIN)
- public String xsltBean(String body) {
- return producerTemplate.requestBody("xslt:bean:xslt_bean.getXsltResource", body, String.class);
- }
-
- @Path("/xslt-file")
- @POST
- @Produces(MediaType.TEXT_PLAIN)
- public String xsltFile(String body) throws Exception {
- try (InputStream in = getClass().getClassLoader().getResourceAsStream("xslt/classpath-transform.xsl")) {
- File file = File.createTempFile("xslt", ".xsl");
- Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
- return producerTemplate.requestBody("xslt:file:" + file, body, String.class);
- }
- }
-
- @Path("/xslt-http")
- @POST
- @Produces(MediaType.TEXT_PLAIN)
- public String xsltHttp(String body) {
- String serverURL = ConfigProvider.getConfig()
- .getConfigValue("xslt.server-url")
- .getRawValue();
- return producerTemplate.requestBody("xslt:" + serverURL + "/xslt", body, String.class);
- }
-
@Path("/aggregate")
@GET
@Produces(MediaType.TEXT_PLAIN)
@@ -156,7 +116,7 @@ public class XmlResource {
public String htmlTransform(String html) {
LOG.debugf("Parsing HTML %s", html);
return producerTemplate.requestBody(
- XmlRouteBuilder.DIRECT_HTML_TRANSFORM,
+ XsltRouteBuilder.DIRECT_HTML_TRANSFORM,
html,
String.class);
}
@@ -168,7 +128,7 @@ public class XmlResource {
public String htmlToText(String html) {
LOG.debugf("Parsing HTML %s", html);
return producerTemplate.requestBody(
- XmlRouteBuilder.DIRECT_HTML_TO_TEXT,
+ XsltRouteBuilder.DIRECT_HTML_TO_TEXT,
html,
String.class);
}
@@ -178,7 +138,7 @@ public class XmlResource {
@Consumes(MediaType.APPLICATION_XML)
@Produces(MediaType.TEXT_PLAIN)
public String xpath(String message) {
- return producerTemplate.requestBody(XmlRouteBuilder.DIRECT_XML_CBR, message, String.class);
+ return producerTemplate.requestBody(XsltRouteBuilder.DIRECT_XML_CBR, message, String.class);
}
@Path("/xtokenize")
@@ -186,7 +146,7 @@ public class XmlResource {
@Consumes(MediaType.APPLICATION_XML)
@Produces(MediaType.TEXT_PLAIN)
public String tokenize(String message) {
- producerTemplate.sendBody(XmlRouteBuilder.DIRECT_XTOKENIZE, message);
+ producerTemplate.sendBody(XsltRouteBuilder.DIRECT_XTOKENIZE, message);
StringJoiner joiner = new StringJoiner(",");
String tokenizedXML;
@@ -195,5 +155,4 @@ public class XmlResource {
}
return joiner.toString();
}
-
}
diff --git a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java b/integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRouteBuilder.java
similarity index 71%
rename from integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java
rename to integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRouteBuilder.java
index 4a186f396c..6ac82e302f 100644
--- a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java
+++ b/integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRouteBuilder.java
@@ -18,21 +18,11 @@ package org.apache.camel.quarkus.component.xml.it;
import org.w3c.dom.Document;
-import io.quarkus.runtime.annotations.RegisterForReflection;
import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.xslt.saxon.XsltSaxonAggregationStrategy;
import org.apache.camel.support.builder.Namespaces;
import org.apache.xpath.XPathAPI;
-// These reflections registrations should be removed with fixing https://github.com/apache/camel-quarkus/issues/1615
-@RegisterForReflection(classNames = {
- "net.sf.saxon.Configuration",
- "net.sf.saxon.functions.String_1",
- "net.sf.saxon.functions.Tokenize_1",
- "net.sf.saxon.functions.StringJoin",
- "org.xmlresolver.loaders.XmlLoader",
- "org.apache.camel.component.xslt.saxon.XsltSaxonBuilder" })
-public class XmlRouteBuilder extends RouteBuilder {
+public class XsltRouteBuilder extends RouteBuilder {
public static final String DIRECT_HTML_TRANSFORM = "direct:html-transform";
public static final String DIRECT_HTML_TO_TEXT = "direct:html-to-text";
public static final String DIRECT_XML_CBR = "direct:xml-cbr";
@@ -64,11 +54,5 @@ public class XmlRouteBuilder extends RouteBuilder {
.xtokenize("//C:child", new Namespaces("C", "urn:c"))
.to("seda:xtokenize-result");
- from("direct:aggregate")
- .aggregate(new XsltSaxonAggregationStrategy("xslt/aggregate.xsl"))
- .constant(true)
- .completionSize(3)
- .log("after aggregate body: ${body}")
- .to("mock:transformed");
}
}
diff --git a/integration-tests/xml/src/main/resources/application.properties b/integration-test-groups/xml/native/classpath/src/main/resources/application.properties
similarity index 100%
rename from integration-tests/xml/src/main/resources/application.properties
rename to integration-test-groups/xml/native/classpath/src/main/resources/application.properties
diff --git a/integration-tests/xml/src/main/resources/xslt/aggregate.xsl b/integration-test-groups/xml/native/classpath/src/main/resources/xslt/aggregate.xsl
similarity index 100%
rename from integration-tests/xml/src/main/resources/xslt/aggregate.xsl
rename to integration-test-groups/xml/native/classpath/src/main/resources/xslt/aggregate.xsl
diff --git a/integration-tests/xml/src/main/resources/xslt/classpath-transform.xsl b/integration-test-groups/xml/native/classpath/src/main/resources/xslt/classpath-transform.xsl
similarity index 100%
rename from integration-tests/xml/src/main/resources/xslt/classpath-transform.xsl
rename to integration-test-groups/xml/native/classpath/src/main/resources/xslt/classpath-transform.xsl
diff --git a/integration-tests/xml/src/main/resources/xslt/extension-function.xsl b/integration-test-groups/xml/native/classpath/src/main/resources/xslt/extension-function.xsl
similarity index 100%
rename from integration-tests/xml/src/main/resources/xslt/extension-function.xsl
rename to integration-test-groups/xml/native/classpath/src/main/resources/xslt/extension-function.xsl
diff --git a/integration-tests/xml/src/main/resources/xslt/html-to-text.xsl b/integration-test-groups/xml/native/classpath/src/main/resources/xslt/html-to-text.xsl
similarity index 100%
rename from integration-tests/xml/src/main/resources/xslt/html-to-text.xsl
rename to integration-test-groups/xml/native/classpath/src/main/resources/xslt/html-to-text.xsl
diff --git a/integration-tests/xml/src/main/resources/xslt/html-transform.xsl b/integration-test-groups/xml/native/classpath/src/main/resources/xslt/html-transform.xsl
similarity index 100%
rename from integration-tests/xml/src/main/resources/xslt/html-transform.xsl
rename to integration-test-groups/xml/native/classpath/src/main/resources/xslt/html-transform.xsl
diff --git a/integration-tests/xml/src/main/resources/xslt/include.xsl b/integration-test-groups/xml/native/classpath/src/main/resources/xslt/include.xsl
similarity index 100%
rename from integration-tests/xml/src/main/resources/xslt/include.xsl
rename to integration-test-groups/xml/native/classpath/src/main/resources/xslt/include.xsl
diff --git a/integration-tests/xml/src/main/resources/xslt/include_not_existing_resource.xsl b/integration-test-groups/xml/native/classpath/src/main/resources/xslt/include_not_existing_resource.xsl
similarity index 100%
rename from integration-tests/xml/src/main/resources/xslt/include_not_existing_resource.xsl
rename to integration-test-groups/xml/native/classpath/src/main/resources/xslt/include_not_existing_resource.xsl
diff --git a/integration-tests/xml/src/main/resources/xslt/terminate.xsl b/integration-test-groups/xml/native/classpath/src/main/resources/xslt/terminate.xsl
similarity index 100%
rename from integration-tests/xml/src/main/resources/xslt/terminate.xsl
rename to integration-test-groups/xml/native/classpath/src/main/resources/xslt/terminate.xsl
diff --git a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java b/integration-test-groups/xml/native/classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltIT.java
similarity index 96%
rename from integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
rename to integration-test-groups/xml/native/classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltIT.java
index f5312ad7dd..c5f24a5fff 100644
--- a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlIT.java
+++ b/integration-test-groups/xml/native/classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltIT.java
@@ -19,6 +19,6 @@ package org.apache.camel.quarkus.component.xml.it;
import io.quarkus.test.junit.QuarkusIntegrationTest;
@QuarkusIntegrationTest
-class XmlIT extends XmlTest {
+class XsltIT extends XsltTest {
}
diff --git a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlTest.java b/integration-test-groups/xml/native/classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltTest.java
similarity index 85%
rename from integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlTest.java
rename to integration-test-groups/xml/native/classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltTest.java
index b629e6117f..a8852cb855 100644
--- a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlTest.java
+++ b/integration-test-groups/xml/native/classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltTest.java
@@ -20,7 +20,6 @@ import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
-import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.DisabledOnIntegrationTest;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
@@ -34,8 +33,7 @@ import org.junit.jupiter.params.provider.ValueSource;
import static org.hamcrest.Matchers.is;
@QuarkusTest
-@QuarkusTestResource(XmlTestResource.class)
-class XmlTest {
+public class XsltTest {
private static final String BODY = "<mail><subject>Hey</subject><body>Hello world!</body></mail>";
@ParameterizedTest
@@ -94,35 +92,6 @@ class XmlTest {
actual);
}
- @ParameterizedTest
- @ValueSource(strings = { "ref", "bean", "http", "file" })
- @DisabledOnIntegrationTest("Generating xslt templates dynamically does not be supported in native mode")
- public void xsltSchemas(String schema) {
- final String actual = RestAssured.given()
- .body(BODY)
- .post("/xml/xslt-{schema}", schema)
- .then()
- .statusCode(200)
- .extract().body().asString().trim().replaceAll(">\\s+<", "><");
-
- Assertions.assertEquals(
- "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><classpath-xsl subject=\"Hey\"><cheese><mail><subject>Hey</subject><body>Hello world!</body></mail></cheese></classpath-xsl>",
- actual);
- }
-
- @Test
- @DisabledOnIntegrationTest("Generating xslt templates dynamically does not be supported in native mode")
- public void aggregate() {
- final String actual = RestAssured.given()
- .accept(ContentType.TEXT)
- .get("/xml/aggregate")
- .then()
- .statusCode(200)
- .extract().body().asString().trim().replaceAll(">\\s+<", "><");
-
- Assertions.assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?><item>ABC</item>", actual);
- }
-
@Test
@DisabledOnIntegrationTest("Generating xslt templates dynamically does not be supported in native mode")
public void xsltInclude() {
diff --git a/integration-tests/xml/src/test/resources/test.html b/integration-test-groups/xml/native/classpath/src/test/resources/test.html
similarity index 100%
rename from integration-tests/xml/src/test/resources/test.html
rename to integration-test-groups/xml/native/classpath/src/test/resources/test.html
diff --git a/integration-test-groups/pom.xml b/integration-test-groups/xml/pom.xml
similarity index 70%
copy from integration-test-groups/pom.xml
copy to integration-test-groups/xml/pom.xml
index 2fa89e1618..fc57a8d91a 100644
--- a/integration-test-groups/pom.xml
+++ b/integration-test-groups/xml/pom.xml
@@ -22,29 +22,27 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus</artifactId>
+ <artifactId>camel-quarkus-integration-test-groups</artifactId>
<version>2.16.0</version>
- <relativePath>../pom.xml</relativePath>
</parent>
- <artifactId>camel-quarkus-integration-test-groups</artifactId>
+ <artifactId>camel-quarkus-integration-tests-xml</artifactId>
<packaging>pom</packaging>
- <name>Camel Quarkus :: Integration Test Groups</name>
+ <name>Camel Quarkus :: XML Integration Tests</name>
<properties>
<quarkus.banner.enabled>false</quarkus.banner.enabled>
</properties>
<modules>
- <!-- test groups a..z; do not remove this comment, it is important when sorting via mvn process-resources -Pformat -->
- <module>aws2</module>
- <module>aws2-quarkus-client</module>
- <module>azure</module>
- <module>compression</module>
- <module>cxf-soap</module>
- <module>foundation</module>
- <module>mongodb</module>
+ <!-- extensions a..z; do not remove this comment, it is important when sorting via mvn process-resources -Pformat -->
+ <module>jvm/aggregate</module>
+ <module>jvm/bean</module>
+ <module>jvm/file</module>
+ <module>jvm/http</module>
+ <module>jvm/ref</module>
+ <module>native/classpath</module>
</modules>
</project>
diff --git a/integration-tests-jvm/pom.xml b/integration-tests-jvm/pom.xml
index dfbd15a99e..437979a04a 100644
--- a/integration-tests-jvm/pom.xml
+++ b/integration-tests-jvm/pom.xml
@@ -50,8 +50,8 @@
<module>cmis</module>
<module>coap</module>
<module>cometd</module>
- <module>controlbus-statistics</module>
<module>console</module>
+ <module>controlbus-statistics</module>
<module>corda</module>
<module>couchbase</module>
<module>debug</module>
@@ -111,6 +111,7 @@
<module>wordpress</module>
<module>workday</module>
<module>xj</module>
+ <module>xml-grouped</module>
<module>xmpp</module>
<module>xslt-saxon</module>
<module>zookeeper</module>
diff --git a/integration-tests-jvm/xml-grouped/.gitignore b/integration-tests-jvm/xml-grouped/.gitignore
new file mode 100644
index 0000000000..6119608b19
--- /dev/null
+++ b/integration-tests-jvm/xml-grouped/.gitignore
@@ -0,0 +1,3 @@
+
+# src/main and src/test are copied from the underlying isolated modules by group-tests.groovy
+/src/
diff --git a/integration-tests/xml/pom.xml b/integration-tests-jvm/xml-grouped/pom.xml
similarity index 72%
copy from integration-tests/xml/pom.xml
copy to integration-tests-jvm/xml-grouped/pom.xml
index b5f944f5f7..458e46166e 100644
--- a/integration-tests/xml/pom.xml
+++ b/integration-tests-jvm/xml-grouped/pom.xml
@@ -26,57 +26,60 @@
<relativePath>../../poms/build-parent-it/pom.xml</relativePath>
</parent>
- <artifactId>camel-quarkus-integration-test-xml</artifactId>
- <name>Camel Quarkus :: Integration Tests :: XML</name>
- <description>Integration tests for various XML related extensions</description>
+ <artifactId>camel-quarkus-integration-test-xml-jvm-grouped</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: XML JVM Grouped</name>
+ <description>XML tests from ../integration-test-groups/xml/jvm merged together</description>
+ <!-- Regenerate the dependencies via `mvn process-resources -Pformat -N` from the source tree root directory -->
<dependencies>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-xslt</artifactId>
+ <artifactId>camel-quarkus-bean</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-xslt-saxon</artifactId>
+ <artifactId>camel-quarkus-direct</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-xpath</artifactId>
+ <artifactId>camel-quarkus-integration-tests-support-xslt</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-stax</artifactId>
+ <artifactId>camel-quarkus-language</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-bean</artifactId>
+ <artifactId>camel-quarkus-mock</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-direct</artifactId>
+ <artifactId>camel-quarkus-seda</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-mock</artifactId>
+ <artifactId>camel-quarkus-support-stax</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-seda</artifactId>
+ <artifactId>camel-quarkus-stax</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-support-stax</artifactId>
+ <artifactId>camel-quarkus-xpath</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-integration-tests-support-xslt</artifactId>
+ <artifactId>camel-quarkus-xslt</artifactId>
</dependency>
<dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-resteasy</artifactId>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt-saxon</artifactId>
</dependency>
-
- <!-- test dependencies -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
@@ -94,35 +97,63 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/src/main/java</source>
+ </sources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>add-test-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/src/test/java</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>groovy-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>group-sources</id>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <phase>generate-sources</phase>
+ <configuration>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</source>
+ <properties>
+ <group-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/xml/jvm</group-tests.source.dir>
+ <group-tests.dest.module.dir>${project.basedir}</group-tests.dest.module.dir>
+ <group-tests.concat.rel.paths>src/main/resources/application.properties</group-tests.concat.rel.paths>
+ </properties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
<profiles>
- <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>
<profile>
<id>virtualDependencies</id>
<activation>
@@ -158,6 +189,19 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-language-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-mock-deployment</artifactId>
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 824170124e..a465dc5609 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -225,7 +225,7 @@
<module>vertx-websocket</module>
<module>weather</module>
<module>xchange</module>
- <module>xml</module>
+ <module>xml-grouped</module>
<module>xmlsecurity</module>
<module>xpath</module>
<module>xstream</module>
diff --git a/integration-tests/xml-grouped/.gitignore b/integration-tests/xml-grouped/.gitignore
new file mode 100644
index 0000000000..6119608b19
--- /dev/null
+++ b/integration-tests/xml-grouped/.gitignore
@@ -0,0 +1,3 @@
+
+# src/main and src/test are copied from the underlying isolated modules by group-tests.groovy
+/src/
diff --git a/integration-tests/xml/pom.xml b/integration-tests/xml-grouped/pom.xml
similarity index 73%
rename from integration-tests/xml/pom.xml
rename to integration-tests/xml-grouped/pom.xml
index b5f944f5f7..a030e09d5b 100644
--- a/integration-tests/xml/pom.xml
+++ b/integration-tests/xml-grouped/pom.xml
@@ -26,34 +26,27 @@
<relativePath>../../poms/build-parent-it/pom.xml</relativePath>
</parent>
- <artifactId>camel-quarkus-integration-test-xml</artifactId>
- <name>Camel Quarkus :: Integration Tests :: XML</name>
- <description>Integration tests for various XML related extensions</description>
+ <artifactId>camel-quarkus-integration-test-xml-grouped</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: XML Native Grouped</name>
+ <description>XML tests from ../integration-test-groups/xml/native merged together</description>
+ <!-- Regenerate the dependencies via `mvn process-resources -Pformat -N` from the source tree root directory -->
<dependencies>
<dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-xslt</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-xslt-saxon</artifactId>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-xpath</artifactId>
+ <artifactId>camel-quarkus-direct</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-stax</artifactId>
+ <artifactId>camel-quarkus-integration-tests-support-xslt</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-bean</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-direct</artifactId>
+ <artifactId>camel-quarkus-language</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
@@ -65,18 +58,16 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-support-stax</artifactId>
+ <artifactId>camel-quarkus-stax</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-integration-tests-support-xslt</artifactId>
+ <artifactId>camel-quarkus-xpath</artifactId>
</dependency>
<dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-resteasy</artifactId>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-xslt</artifactId>
</dependency>
-
- <!-- test dependencies -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
@@ -87,13 +78,63 @@
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-integration-wiremock-support</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/src/main/java</source>
+ </sources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>add-test-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/src/test/java</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>groovy-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>group-sources</id>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <phase>generate-sources</phase>
+ <configuration>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</source>
+ <properties>
+ <group-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/xml/native</group-tests.source.dir>
+ <group-tests.dest.module.dir>${project.basedir}</group-tests.dest.module.dir>
+ <group-tests.concat.rel.paths>src/main/resources/application.properties</group-tests.concat.rel.paths>
+ </properties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
<profiles>
<profile>
@@ -134,7 +175,7 @@
<!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-bean-deployment</artifactId>
+ <artifactId>camel-quarkus-direct-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
@@ -147,7 +188,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-direct-deployment</artifactId>
+ <artifactId>camel-quarkus-language-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
@@ -197,19 +238,6 @@
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-support-stax-deployment</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>*</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-xpath-deployment</artifactId>
@@ -236,19 +264,6 @@
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-xslt-saxon-deployment</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>*</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
</dependencies>
</profile>
</profiles>
diff --git a/pom.xml b/pom.xml
index ddabe524c8..57256bdc63 100644
--- a/pom.xml
+++ b/pom.xml
@@ -874,6 +874,7 @@
<sortModulesPath>integration-test-groups/compression/pom.xml</sortModulesPath>
<sortModulesPath>integration-test-groups/foundation/pom.xml</sortModulesPath>
<sortModulesPath>integration-test-groups/mongodb/pom.xml</sortModulesPath>
+ <sortModulesPath>integration-test-groups/xml/pom.xml</sortModulesPath>
</sortModulesPaths>
<sortDependencyManagementPaths>
<sortDependencyManagementPath>poms/bom/pom.xml</sortDependencyManagementPath>
@@ -958,6 +959,24 @@
</sourcePoms>
<destinationPom>${basedir}/integration-tests/mongodb-grouped/pom.xml</destinationPom>
</mergePom>
+ <mergePom>
+ <sourcePoms>
+ <directory>${basedir}/integration-test-groups/xml/native</directory>
+ <includes>
+ <include>*/pom.xml</include>
+ </includes>
+ </sourcePoms>
+ <destinationPom>${basedir}/integration-tests/xml-grouped/pom.xml</destinationPom>
+ </mergePom>
+ <mergePom>
+ <sourcePoms>
+ <directory>${basedir}/integration-test-groups/xml/jvm</directory>
+ <includes>
+ <include>*/pom.xml</include>
+ </includes>
+ </sourcePoms>
+ <destinationPom>${basedir}/integration-tests-jvm/xml-grouped/pom.xml</destinationPom>
+ </mergePom>
</mergePoms>
</configuration>
</execution>
diff --git a/tooling/scripts/test-categories.yaml b/tooling/scripts/test-categories.yaml
index 304ace2eed..59f46a38f5 100644
--- a/tooling/scripts/test-categories.yaml
+++ b/tooling/scripts/test-categories.yaml
@@ -180,7 +180,7 @@ group-11:
- tarfile
- univocity-parsers
- velocity
- - xml
+ - xml-grouped
group-12:
- aws2-grouped
- csimple
[camel-quarkus] 01/04: Fix #4710 to register reflection for FastStringBuffer and resource bundle for XMLErrorResources (#4720)
Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch 2.16.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit a726b92998eaab0947eb6187949fa330f2fd450c
Author: Zheng Feng <zh...@gmail.com>
AuthorDate: Thu Mar 30 21:05:47 2023 +0800
Fix #4710 to register reflection for FastStringBuffer and resource bundle for XMLErrorResources (#4720)
---
.../support/xalan/deployment/XalanNativeImageProcessor.java | 5 +++--
.../org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java | 7 ++++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/extensions-support/xalan/deployment/src/main/java/org/apache/camel/quarkus/support/xalan/deployment/XalanNativeImageProcessor.java b/extensions-support/xalan/deployment/src/main/java/org/apache/camel/quarkus/support/xalan/deployment/XalanNativeImageProcessor.java
index 46d2664dba..959df1d121 100644
--- a/extensions-support/xalan/deployment/src/main/java/org/apache/camel/quarkus/support/xalan/deployment/XalanNativeImageProcessor.java
+++ b/extensions-support/xalan/deployment/src/main/java/org/apache/camel/quarkus/support/xalan/deployment/XalanNativeImageProcessor.java
@@ -56,7 +56,7 @@ class XalanNativeImageProcessor {
"org.apache.xml.dtm.ref.DTMManagerDefault",
"org.apache.xml.serializer.OutputPropertiesFactory",
"org.apache.xml.serializer.CharInfo",
- "org.apache.xml.serializer.XMLEntities");
+ "org.apache.xml.utils.FastStringBuffer");
}
@BuildStep
@@ -64,7 +64,8 @@ class XalanNativeImageProcessor {
return Arrays.asList(
new NativeImageResourceBundleBuildItem("org.apache.xalan.xsltc.compiler.util.ErrorMessages"),
new NativeImageResourceBundleBuildItem("org.apache.xml.serializer.utils.SerializerMessages"),
- new NativeImageResourceBundleBuildItem("org.apache.xml.serializer.XMLEntities"));
+ new NativeImageResourceBundleBuildItem("org.apache.xml.serializer.XMLEntities"),
+ new NativeImageResourceBundleBuildItem("org.apache.xml.res.XMLErrorResources"));
}
@BuildStep
diff --git a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java b/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java
index 1383f2172e..4a186f396c 100644
--- a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java
+++ b/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java
@@ -22,6 +22,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.xslt.saxon.XsltSaxonAggregationStrategy;
import org.apache.camel.support.builder.Namespaces;
+import org.apache.xpath.XPathAPI;
// These reflections registrations should be removed with fixing https://github.com/apache/camel-quarkus/issues/1615
@RegisterForReflection(classNames = {
@@ -50,7 +51,11 @@ public class XmlRouteBuilder extends RouteBuilder {
from(DIRECT_XML_CBR)
.choice()
.when(xpath("//order/country = 'UK'"))
- .setBody(constant("Country UK"))
+ .process(exchange -> {
+ Document body = exchange.getIn().getBody(Document.class);
+ String country = XPathAPI.eval(body, "//order/country").toString();
+ exchange.getIn().setBody("Country " + country);
+ })
.otherwise()
.setBody(constant("Invalid country code"));
[camel-quarkus] 03/04: Fix #4667 to use quay.io/jbosstm/lra-coordinator
Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch 2.16.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 5b25b14a76455b19b71dba4c85e9a00aadd6bff3
Author: Zheng Feng <zh...@gmail.com>
AuthorDate: Fri Mar 17 23:49:41 2023 +0800
Fix #4667 to use quay.io/jbosstm/lra-coordinator
---
.../org/apache/camel/quarkus/component/lra/it/LraTestResource.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java b/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
index bd5f6f73a1..72c856ec57 100644
--- a/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
+++ b/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
@@ -28,7 +28,7 @@ import org.testcontainers.containers.wait.strategy.Wait;
public class LraTestResource implements QuarkusTestResourceLifecycleManager {
private static final Integer LRA_PORT = AvailablePortFinder.getNextAvailable();
- private static final String LRA_IMAGE = "jbosstm/lra-coordinator:5.12.0.Final";
+ private static final String LRA_IMAGE = "quay.io/jbosstm/lra-coordinator:5.13.1.Final-2.16.4.Final";
private GenericContainer container;
private String hostname;
@@ -41,7 +41,7 @@ public class LraTestResource implements QuarkusTestResourceLifecycleManager {
hostname = "localhost";
container = new GenericContainer(LRA_IMAGE)
.withNetworkMode("host")
- .withEnv("JAVA_OPTS", "-Dquarkus.http.port=" + LRA_PORT)
+ .withEnv("quarkus.http.port", String.valueOf(LRA_PORT))
.waitingFor(Wait.forLogMessage(".*lra-coordinator-quarkus.*", 1));
container.start();
lraPort = LRA_PORT;
@@ -50,7 +50,7 @@ public class LraTestResource implements QuarkusTestResourceLifecycleManager {
container = new GenericContainer(LRA_IMAGE)
.withNetworkMode("bridge")
.withExposedPorts(LRA_PORT)
- .withEnv("JAVA_OPTS", "-Dquarkus.http.port=" + LRA_PORT)
+ .withEnv("quarkus.http.port", String.valueOf(LRA_PORT))
.waitingFor(Wait.forLogMessage(".*lra-coordinator-quarkus.*", 1));
container.start();
lraPort = container.getMappedPort(LRA_PORT);
[camel-quarkus] 04/04: Use QUARKUS_HTTP_PORT env in LraTestResource (#4670)
Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch 2.16.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 0280ea8f84f4392b488f50154c5b81a4c955fb98
Author: Zheng Feng <zh...@gmail.com>
AuthorDate: Mon Mar 20 16:37:18 2023 +0800
Use QUARKUS_HTTP_PORT env in LraTestResource (#4670)
---
.../org/apache/camel/quarkus/component/lra/it/LraTestResource.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java b/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
index 72c856ec57..a9fb8ae379 100644
--- a/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
+++ b/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
@@ -41,7 +41,7 @@ public class LraTestResource implements QuarkusTestResourceLifecycleManager {
hostname = "localhost";
container = new GenericContainer(LRA_IMAGE)
.withNetworkMode("host")
- .withEnv("quarkus.http.port", String.valueOf(LRA_PORT))
+ .withEnv("QUARKUS_HTTP_PORT", String.valueOf(LRA_PORT))
.waitingFor(Wait.forLogMessage(".*lra-coordinator-quarkus.*", 1));
container.start();
lraPort = LRA_PORT;
@@ -50,7 +50,7 @@ public class LraTestResource implements QuarkusTestResourceLifecycleManager {
container = new GenericContainer(LRA_IMAGE)
.withNetworkMode("bridge")
.withExposedPorts(LRA_PORT)
- .withEnv("quarkus.http.port", String.valueOf(LRA_PORT))
+ .withEnv("QUARKUS_HTTP_PORT", String.valueOf(LRA_PORT))
.waitingFor(Wait.forLogMessage(".*lra-coordinator-quarkus.*", 1));
container.start();
lraPort = container.getMappedPort(LRA_PORT);