You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2021/03/18 20:09:51 UTC

[camel-quarkus] 03/13: dsl: support for xml-io-dsl

This is an automated email from the ASF dual-hosted git repository.

ppalaga pushed a commit to branch camel-master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 064fe73c3be38e3ed9f25dc8c734ff34cc468034
Author: Luca Burgazzoli <lb...@gmail.com>
AuthorDate: Tue Mar 2 15:15:23 2021 +0100

    dsl: support for xml-io-dsl
---
 .../pages/reference/extensions/xml-io-dsl.adoc     |  28 +++++
 extensions-core/pom.xml                            |   1 +
 extensions-core/xml-io-dsl/deployment/pom.xml      |  65 ++++++++++++
 extensions-core/{ => xml-io-dsl}/pom.xml           |  22 ++--
 extensions-core/xml-io-dsl/runtime/pom.xml         | 114 +++++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  31 ++++++
 integration-tests/csimple/pom.xml                  |   2 +-
 integration-tests/dataformats-json/pom.xml         |   2 +-
 integration-tests/main-devmode/pom.xml             |   2 +-
 integration-tests/main-xml-io/pom.xml              |   2 +-
 .../camel/quarkus/main/CoreMainXmlIoResource.java  |   2 +-
 .../camel/quarkus/main/CoreMainXmlIoTest.java      |   2 +-
 integration-tests/main-xml-jaxb/pom.xml            |   4 +-
 .../quarkus/main/CoreMainXmlJaxbResource.java      |   2 +-
 .../camel/quarkus/main/CoreMainXmlJaxbTest.java    |   2 +-
 poms/bom/pom.xml                                   |  15 +++
 16 files changed, 270 insertions(+), 26 deletions(-)

diff --git a/docs/modules/ROOT/pages/reference/extensions/xml-io-dsl.adoc b/docs/modules/ROOT/pages/reference/extensions/xml-io-dsl.adoc
new file mode 100644
index 0000000..c76bd4a
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/xml-io-dsl.adoc
@@ -0,0 +1,28 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+= XML IO DSL
+:page-aliases: extensions/xml-io-dsl.adoc
+:cq-artifact-id: camel-quarkus-xml-io-dsl
+:cq-native-supported: true
+:cq-status: Stable
+:cq-description: An XML stack for parsing XML route definitions
+:cq-deprecated: false
+:cq-jvm-since: 1.0.0
+:cq-native-since: 1.0.0
+
+[.badges]
+[.badge-key]##JVM since##[.badge-supported]##1.0.0## [.badge-key]##Native since##[.badge-supported]##1.0.0##
+
+An XML stack for parsing XML route definitions
+
+== Maven coordinates
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.camel.quarkus</groupId>
+    <artifactId>camel-quarkus-xml-io-dsl</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/extensions-core/pom.xml b/extensions-core/pom.xml
index 92bee84..ded3939 100644
--- a/extensions-core/pom.xml
+++ b/extensions-core/pom.xml
@@ -38,6 +38,7 @@
         <module>reactive-executor</module>
         <module>threadpoolfactory-vertx</module>
         <module>xml-io</module>
+        <module>xml-io-dsl</module>
         <module>xml-jaxb</module>
         <module>xml-jaxp</module>
         <module>caffeine-lrucache</module>
diff --git a/extensions-core/xml-io-dsl/deployment/pom.xml b/extensions-core/xml-io-dsl/deployment/pom.xml
new file mode 100644
index 0000000..b33000f
--- /dev/null
+++ b/extensions-core/xml-io-dsl/deployment/pom.xml
@@ -0,0 +1,65 @@
+<?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-xml-io-dsl-parent</artifactId>
+        <version>1.8.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-xml-io-dsl-deployment</artifactId>
+    <name>Camel Quarkus :: XML IO DSL :: Deployment</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core-deployment</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-xml-io-deployment</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-xml-io-dsl</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <annotationProcessorPaths>
+                        <path>
+                            <groupId>io.quarkus</groupId>
+                            <artifactId>quarkus-extension-processor</artifactId>
+                            <version>${quarkus.version}</version>
+                        </path>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/extensions-core/pom.xml b/extensions-core/xml-io-dsl/pom.xml
similarity index 70%
copy from extensions-core/pom.xml
copy to extensions-core/xml-io-dsl/pom.xml
index 92bee84..b284429 100644
--- a/extensions-core/pom.xml
+++ b/extensions-core/xml-io-dsl/pom.xml
@@ -18,30 +18,20 @@
 
 -->
 <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</artifactId>
+        <artifactId>camel-quarkus-build-parent</artifactId>
         <version>1.8.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
     </parent>
 
-    <artifactId>camel-quarkus-extensions-core</artifactId>
+    <artifactId>camel-quarkus-xml-io-dsl-parent</artifactId>
+    <name>Camel Quarkus :: XML IO DSL</name>
     <packaging>pom</packaging>
 
-    <name>Camel Quarkus :: Extensions :: Core</name>
-
     <modules>
-        <module>core</module>
-        <module>core-cloud</module>
-        <module>http-common</module>
-        <module>reactive-executor</module>
-        <module>threadpoolfactory-vertx</module>
-        <module>xml-io</module>
-        <module>xml-jaxb</module>
-        <module>xml-jaxp</module>
-        <module>caffeine-lrucache</module>
-        <module>main</module>
+        <module>deployment</module>
+        <module>runtime</module>
     </modules>
-
 </project>
diff --git a/extensions-core/xml-io-dsl/runtime/pom.xml b/extensions-core/xml-io-dsl/runtime/pom.xml
new file mode 100644
index 0000000..3bd775d
--- /dev/null
+++ b/extensions-core/xml-io-dsl/runtime/pom.xml
@@ -0,0 +1,114 @@
+<?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-xml-io-dsl-parent</artifactId>
+        <version>1.8.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-xml-io-dsl</artifactId>
+    <name>Camel Quarkus :: XML IO DSL :: Runtime</name>
+    <description>An XML stack for parsing XML route definitions</description>
+
+    <properties>
+        <camel.quarkus.jvmSince>1.0.0</camel.quarkus.jvmSince>
+        <camel.quarkus.nativeSince>1.0.0</camel.quarkus.nativeSince>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-xml-io</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-xml-io-dsl</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-bootstrap-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <annotationProcessorPaths>
+                        <path>
+                            <groupId>io.quarkus</groupId>
+                            <artifactId>quarkus-extension-processor</artifactId>
+                            <version>${quarkus.version}</version>
+                        </path>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>full</id>
+            <activation>
+                <property>
+                    <name>!quickly</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.camel.quarkus</groupId>
+                        <artifactId>camel-quarkus-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>update-extension-doc-page</id>
+                                <goals>
+                                    <goal>update-extension-doc-page</goal>
+                                </goals>
+                                <phase>process-classes</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/extensions-core/xml-io-dsl/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-core/xml-io-dsl/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..afab50f
--- /dev/null
+++ b/extensions-core/xml-io-dsl/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+
+# This is a generated file. Do not edit directly!
+# To re-generate, run the following command from the top level directory:
+#
+#   mvn -N cq:update-quarkus-metadata
+#
+---
+name: "Camel XML IO DSL"
+description: "An XML stack for parsing XML route definitions"
+metadata:
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/xml-io-dsl.html"
+  categories:
+  - "integration"
+  status:
+  - "stable"
diff --git a/integration-tests/csimple/pom.xml b/integration-tests/csimple/pom.xml
index 67a31b2..75f1712 100644
--- a/integration-tests/csimple/pom.xml
+++ b/integration-tests/csimple/pom.xml
@@ -61,7 +61,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-xml-io</artifactId>
+            <artifactId>camel-quarkus-xml-io-dsl</artifactId>
         </dependency>
 
         <!-- test dependencies -->
diff --git a/integration-tests/dataformats-json/pom.xml b/integration-tests/dataformats-json/pom.xml
index 3f6feed..d6e1968 100644
--- a/integration-tests/dataformats-json/pom.xml
+++ b/integration-tests/dataformats-json/pom.xml
@@ -36,7 +36,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-xml-io</artifactId>
+            <artifactId>camel-quarkus-xml-io-dsl</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
diff --git a/integration-tests/main-devmode/pom.xml b/integration-tests/main-devmode/pom.xml
index 32d3dbf..d2143bb 100644
--- a/integration-tests/main-devmode/pom.xml
+++ b/integration-tests/main-devmode/pom.xml
@@ -36,7 +36,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-xml-io</artifactId>
+            <artifactId>camel-quarkus-xml-io-dsl</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
diff --git a/integration-tests/main-xml-io/pom.xml b/integration-tests/main-xml-io/pom.xml
index 150c662..a621855 100644
--- a/integration-tests/main-xml-io/pom.xml
+++ b/integration-tests/main-xml-io/pom.xml
@@ -36,7 +36,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-xml-io</artifactId>
+            <artifactId>camel-quarkus-xml-io-dsl</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
diff --git a/integration-tests/main-xml-io/src/main/java/org/apache/camel/quarkus/main/CoreMainXmlIoResource.java b/integration-tests/main-xml-io/src/main/java/org/apache/camel/quarkus/main/CoreMainXmlIoResource.java
index 54b3dee..a9ea868 100644
--- a/integration-tests/main-xml-io/src/main/java/org/apache/camel/quarkus/main/CoreMainXmlIoResource.java
+++ b/integration-tests/main-xml-io/src/main/java/org/apache/camel/quarkus/main/CoreMainXmlIoResource.java
@@ -31,8 +31,8 @@ import javax.ws.rs.core.MediaType;
 import org.apache.camel.ExtendedCamelContext;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.TemplatedRouteBuilder;
+import org.apache.camel.dsl.xml.io.XmlRoutesBuilderLoader;
 import org.apache.camel.spi.RoutesBuilderLoader;
-import org.apache.camel.xml.in.XmlRoutesBuilderLoader;
 
 @Path("/test")
 @ApplicationScoped
diff --git a/integration-tests/main-xml-io/src/test/java/org/apache/camel/quarkus/main/CoreMainXmlIoTest.java b/integration-tests/main-xml-io/src/test/java/org/apache/camel/quarkus/main/CoreMainXmlIoTest.java
index 239e9b1..b731df8 100644
--- a/integration-tests/main-xml-io/src/test/java/org/apache/camel/quarkus/main/CoreMainXmlIoTest.java
+++ b/integration-tests/main-xml-io/src/test/java/org/apache/camel/quarkus/main/CoreMainXmlIoTest.java
@@ -24,10 +24,10 @@ import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
 import io.restassured.http.ContentType;
 import io.restassured.path.json.JsonPath;
+import org.apache.camel.dsl.xml.io.XmlRoutesBuilderLoader;
 import org.apache.camel.quarkus.core.DisabledModelJAXBContextFactory;
 import org.apache.camel.quarkus.core.DisabledModelToXMLDumper;
 import org.apache.camel.xml.in.ModelParserXMLRoutesDefinitionLoader;
-import org.apache.camel.xml.in.XmlRoutesBuilderLoader;
 import org.junit.jupiter.api.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
diff --git a/integration-tests/main-xml-jaxb/pom.xml b/integration-tests/main-xml-jaxb/pom.xml
index e74a92b..aa4b4b3 100644
--- a/integration-tests/main-xml-jaxb/pom.xml
+++ b/integration-tests/main-xml-jaxb/pom.xml
@@ -40,7 +40,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-xml-io</artifactId>
+            <artifactId>camel-quarkus-xml-io-dsl</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
@@ -153,7 +153,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-xml-io-deployment</artifactId>
+            <artifactId>camel-quarkus-xml-io-dsl-deployment</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
             <scope>test</scope>
diff --git a/integration-tests/main-xml-jaxb/src/main/java/org/apache/camel/quarkus/main/CoreMainXmlJaxbResource.java b/integration-tests/main-xml-jaxb/src/main/java/org/apache/camel/quarkus/main/CoreMainXmlJaxbResource.java
index 9645e7b..a710b46 100644
--- a/integration-tests/main-xml-jaxb/src/main/java/org/apache/camel/quarkus/main/CoreMainXmlJaxbResource.java
+++ b/integration-tests/main-xml-jaxb/src/main/java/org/apache/camel/quarkus/main/CoreMainXmlJaxbResource.java
@@ -28,8 +28,8 @@ import javax.ws.rs.core.MediaType;
 
 import org.apache.camel.ExtendedCamelContext;
 import org.apache.camel.builder.TemplatedRouteBuilder;
+import org.apache.camel.dsl.xml.io.XmlRoutesBuilderLoader;
 import org.apache.camel.spi.RoutesBuilderLoader;
-import org.apache.camel.xml.in.XmlRoutesBuilderLoader;
 
 @Path("/test")
 @ApplicationScoped
diff --git a/integration-tests/main-xml-jaxb/src/test/java/org/apache/camel/quarkus/main/CoreMainXmlJaxbTest.java b/integration-tests/main-xml-jaxb/src/test/java/org/apache/camel/quarkus/main/CoreMainXmlJaxbTest.java
index a1accb2..fc9f0f3 100644
--- a/integration-tests/main-xml-jaxb/src/test/java/org/apache/camel/quarkus/main/CoreMainXmlJaxbTest.java
+++ b/integration-tests/main-xml-jaxb/src/test/java/org/apache/camel/quarkus/main/CoreMainXmlJaxbTest.java
@@ -23,8 +23,8 @@ import javax.ws.rs.core.MediaType;
 import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
 import io.restassured.path.json.JsonPath;
+import org.apache.camel.dsl.xml.io.XmlRoutesBuilderLoader;
 import org.apache.camel.xml.in.ModelParserXMLRoutesDefinitionLoader;
-import org.apache.camel.xml.in.XmlRoutesBuilderLoader;
 import org.apache.camel.xml.jaxb.DefaultModelJAXBContextFactory;
 import org.apache.camel.xml.jaxb.JaxbModelToXMLDumper;
 import org.junit.jupiter.api.Test;
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 993dfa7..bcbb9dd 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -2050,6 +2050,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-xml-io-dsl</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-xml-jaxb</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -5247,6 +5252,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-xml-io-dsl</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-xml-io-dsl-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-xml-jaxb</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>