Skip to content

Commit

Permalink
Support for camel-xml-io apache#847
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli committed Mar 5, 2020
1 parent 014697f commit 28394bf
Show file tree
Hide file tree
Showing 52 changed files with 1,021 additions and 112 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ jobs:
-pl :camel-quarkus-integration-test-core-impl \
-pl :camel-quarkus-integration-test-core-main \
-pl :camel-quarkus-integration-test-core-main-collector \
-pl :camel-quarkus-integration-test-core-main-xml
-pl :camel-quarkus-integration-test-core-main-xml-jaxb \
-pl :camel-quarkus-integration-test-core-main-xml-io \
foundation:
runs-on: ubuntu-latest
needs: build
Expand Down
12 changes: 8 additions & 4 deletions docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ Number of Camel data formats: 19 in 15 JAR artifacts (0 deprecated)
== Camel Languages

// languages: START
Number of Camel languages: 10 in 4 JAR artifacts (0 deprecated)
Number of Camel languages: 11 in 5 JAR artifacts (0 deprecated)

[width="100%",cols="4,1,5",options="header"]
|===
Expand All @@ -316,14 +316,16 @@ Number of Camel languages: 10 in 4 JAR artifacts (0 deprecated)

| link:https://camel.apache.org/components/latest/tokenize-language.html[Tokenize] (camel-quarkus-core) | 0.2.0 | To use Camel message body or header with a tokenizer in Camel expressions or predicates.

| link:https://camel.apache.org/components/latest/xtokenize-language.html[XML Tokenize] (camel-quarkus-xml-jaxp) | 0.3.0 | To use Camel message body or header with a XML tokenizer in Camel expressions or predicates.

| link:https://camel.apache.org/components/latest/xpath-language.html[XPath] (camel-quarkus-xpath) | 1.0.0-M4 | To use XPath (XML) in Camel expressions or predicates.
|===
// languages: END

== Miscellaneous Extensions

// others: START
Number of miscellaneous extensions: 9 in 9 JAR artifacts (0 deprecated)
Number of miscellaneous extensions: 10 in 10 JAR artifacts (0 deprecated)

[width="100%",cols="4,1,5",options="header"]
|===
Expand All @@ -333,8 +335,6 @@ Number of miscellaneous extensions: 9 in 9 JAR artifacts (0 deprecated)

| (camel-quarkus-core-cloud) | 0.2.0 | The Camel Quarkus core cloud module

| (camel-quarkus-core-xml) | 0.3.0 | Includes implementations of Java Architecture for XML Binding (JAXB) and Java API for XML Processing (JAXP)

| (camel-quarkus-endpointdsl) | 1.0.0-M3 | camel-quarkus-endpointdsl

| (camel-quarkus-hystrix) | 1.0.0-M1 | Circuit Breaker EIP using Netflix Hystrix
Expand All @@ -346,5 +346,9 @@ Number of miscellaneous extensions: 9 in 9 JAR artifacts (0 deprecated)
| xref:extensions/opentracing.adoc[camel-quarkus-opentracing] | 0.3.0 | Distributed tracing using OpenTracing

| (camel-quarkus-reactive-executor) | 0.3.0 | Reactive Executor for camel-core using Vert.x

| (camel-quarkus-xml-io) | 0.3.0 | Includes implementations of Camel's fast and lightweight XML parse

| (camel-quarkus-xml-jaxb) | 0.3.0 | Includes implementations of Java Architecture for XML Binding (JAXB)
|===
// others: END
10 changes: 5 additions & 5 deletions examples/file-split-log-xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
</parent>

<modelVersion>4.0.0</modelVersion>



<artifactId>camel-quarkus-examples-file-log-xml</artifactId>
<name>Camel Quarkus :: Examples :: File To Log XML DSL</name>
<description>Camel Quarkus Example :: File To Log XML DSL</description>



<properties>
<!-- mvnd, a.k.a. Maven Daemon: https://github.com/gnodet/mvnd -->
Expand All @@ -42,7 +42,7 @@
<!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. -->
<!-- Please update rule whenever you change the dependencies of this module by running -->
<!-- mvn process-resources -Pformat from the root directory -->
<mvnd.builder.rule>camel-quarkus-core-xml-deployment,camel-quarkus-file-deployment,camel-quarkus-log-deployment,camel-quarkus-support-policy-deployment,camel-quarkus-timer-deployment</mvnd.builder.rule>
<mvnd.builder.rule>camel-quarkus-xml-jaxb-deployment,camel-quarkus-file-deployment,camel-quarkus-log-deployment,camel-quarkus-support-policy-deployment,camel-quarkus-timer-deployment</mvnd.builder.rule>
</properties>

<dependencies>
Expand All @@ -56,7 +56,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core-xml</artifactId>
<artifactId>camel-quarkus-xml-jaxb</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
Expand Down
4 changes: 2 additions & 2 deletions examples/timer-log-xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. -->
<!-- Please update rule whenever you change the dependencies of this module by running -->
<!-- mvn process-resources -Pformat from the root directory -->
<mvnd.builder.rule>camel-quarkus-core-xml-deployment,camel-quarkus-log-deployment,camel-quarkus-support-policy-deployment,camel-quarkus-timer-deployment</mvnd.builder.rule>
<mvnd.builder.rule>camel-quarkus-xml-io-deployment,camel-quarkus-log-deployment,camel-quarkus-support-policy-deployment,camel-quarkus-timer-deployment</mvnd.builder.rule>
</properties>

<dependencies>
Expand All @@ -52,7 +52,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core-xml</artifactId>
<artifactId>camel-quarkus-xml-io</artifactId>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions examples/timer-log/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. -->
<!-- Please update rule whenever you change the dependencies of this module by running -->
<!-- mvn process-resources -Pformat from the root directory -->
<mvnd.builder.rule>camel-quarkus-core-xml-deployment,camel-quarkus-log-deployment,camel-quarkus-support-policy-deployment,camel-quarkus-timer-deployment</mvnd.builder.rule>
<mvnd.builder.rule>camel-quarkus-xml-jaxb-deployment,camel-quarkus-log-deployment,camel-quarkus-support-policy-deployment,camel-quarkus-timer-deployment</mvnd.builder.rule>
</properties>

<dependencies>
Expand All @@ -52,7 +52,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core-xml</artifactId>
<artifactId>camel-quarkus-xml-jaxb</artifactId>
</dependency>

</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion extensions/jackson/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core-xml-deployment</artifactId>
<artifactId>camel-quarkus-xml-jaxb-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
Expand Down
2 changes: 1 addition & 1 deletion extensions/jackson/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core-xml</artifactId>
<artifactId>camel-quarkus-xml-jaxb</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down
4 changes: 3 additions & 1 deletion extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@
<!-- common/shared extensions -->
<module>core</module>
<module>core-cloud</module>
<module>core-xml</module>
<module>http-common</module>
<module>reactive-executor</module>
<module>xml-io</module>
<module>xml-jaxb</module>
<module>xml-jaxp</module>

<!-- extensions a..z; do not remove this comment, it is important when sorting via mvn process-resources -Pformat -->
<module>ahc</module>
Expand Down
12 changes: 8 additions & 4 deletions extensions/readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Number of Camel data formats: 19 in 15 JAR artifacts (0 deprecated)
== Camel Languages

// languages: START
Number of Camel languages: 10 in 4 JAR artifacts (0 deprecated)
Number of Camel languages: 11 in 5 JAR artifacts (0 deprecated)

[width="100%",cols="4,1,5",options="header"]
|===
Expand All @@ -305,6 +305,8 @@ Number of Camel languages: 10 in 4 JAR artifacts (0 deprecated)

| link:https://camel.apache.org/components/latest/tokenize-language.html[Tokenize] (camel-quarkus-core) | 0.2.0 | To use Camel message body or header with a tokenizer in Camel expressions or predicates.

| link:https://camel.apache.org/components/latest/xtokenize-language.html[XML Tokenize] (camel-quarkus-xml-jaxp) | 0.3.0 | To use Camel message body or header with a XML tokenizer in Camel expressions or predicates.

| link:https://camel.apache.org/components/latest/xpath-language.html[XPath] (camel-quarkus-xpath) | 1.0.0-M4 | To use XPath (XML) in Camel expressions or predicates.
|===
// languages: END
Expand All @@ -313,7 +315,7 @@ Number of Camel languages: 10 in 4 JAR artifacts (0 deprecated)
== Miscellaneous Extensions

// others: START
Number of miscellaneous extensions: 9 in 9 JAR artifacts (0 deprecated)
Number of miscellaneous extensions: 10 in 10 JAR artifacts (0 deprecated)

[width="100%",cols="4,1,5",options="header"]
|===
Expand All @@ -323,8 +325,6 @@ Number of miscellaneous extensions: 9 in 9 JAR artifacts (0 deprecated)

| (camel-quarkus-core-cloud) | 0.2.0 | The Camel Quarkus core cloud module

| (camel-quarkus-core-xml) | 0.3.0 | Includes implementations of Java Architecture for XML Binding (JAXB) and Java API for XML Processing (JAXP)

| (camel-quarkus-endpointdsl) | 1.0.0-M3 | camel-quarkus-endpointdsl

| (camel-quarkus-hystrix) | 1.0.0-M1 | Circuit Breaker EIP using Netflix Hystrix
Expand All @@ -336,6 +336,10 @@ Number of miscellaneous extensions: 9 in 9 JAR artifacts (0 deprecated)
| xref:extensions/opentracing.adoc[camel-quarkus-opentracing] | 0.3.0 | Distributed tracing using OpenTracing

| (camel-quarkus-reactive-executor) | 0.3.0 | Reactive Executor for camel-core using Vert.x

| (camel-quarkus-xml-io) | 0.3.0 | Includes implementations of Camel's fast and lightweight XML parse

| (camel-quarkus-xml-jaxb) | 0.3.0 | Includes implementations of Java Architecture for XML Binding (JAXB)
|===
// others: END

4 changes: 0 additions & 4 deletions extensions/support/xml/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-core-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jaxb-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-support-xml</artifactId>
Expand Down
9 changes: 0 additions & 9 deletions extensions/support/xml/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-core</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jaxb</artifactId>
</dependency>

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-xml-jaxp</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
2 changes: 1 addition & 1 deletion extensions/tagsoup/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core-xml-deployment</artifactId>
<artifactId>camel-quarkus-xml-jaxb-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
Expand Down
2 changes: 1 addition & 1 deletion extensions/tagsoup/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core-xml</artifactId>
<artifactId>camel-quarkus-xml-jaxb</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
Expand Down
73 changes: 73 additions & 0 deletions extensions/xml-io/deployment/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?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-parent</artifactId>
<version>1.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>camel-quarkus-xml-io-deployment</artifactId>
<name>Camel Quarkus :: XML :: Io :: Deployment</name>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-bom-deployment</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-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-xml-io</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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* 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.io.deployment;

import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.CapabilityBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import org.apache.camel.quarkus.component.xml.io.XmlIoRecorder;
import org.apache.camel.quarkus.core.deployment.CamelRoutesLoaderBuildItems;
import org.apache.camel.quarkus.support.common.CamelCapabilities;

class XmlIoProcessor {
private static final String FEATURE = "camel-xml-io";

@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
}

@BuildStep
CapabilityBuildItem capability() {
return new CapabilityBuildItem(CamelCapabilities.XML);
}

@BuildStep
@Record(value = ExecutionTime.STATIC_INIT, optional = true)
CamelRoutesLoaderBuildItems.Xml xmlLoader(XmlIoRecorder recorder) {
return new CamelRoutesLoaderBuildItems.Xml(recorder.newIoXMLRoutesDefinitionLoader());
}
}
4 changes: 2 additions & 2 deletions extensions/core-xml/pom.xml → extensions/xml-io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<relativePath>../../poms/build-parent/pom.xml</relativePath>
</parent>

<artifactId>camel-quarkus-core-xml-parent</artifactId>
<name>Camel Quarkus :: Core XML</name>
<artifactId>camel-quarkus-xml-io-parent</artifactId>
<name>Camel Quarkus :: XML :: Io</name>
<packaging>pom</packaging>

<modules>
Expand Down

0 comments on commit 28394bf

Please sign in to comment.