This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push: new ae9b209af7 Camel Datasonnet Extension ae9b209af7 is described below commit ae9b209af7ec2dab5eb87e6084456f8ff5662adc Author: Eugene Berman <eugene.ber...@modusbox.com> AuthorDate: Wed May 4 12:04:28 2022 -0700 Camel Datasonnet Extension --- catalog/pom.xml | 13 ++ .../modules/ROOT/examples/languages/datasonnet.yml | 13 ++ docs/modules/ROOT/nav.adoc | 1 + .../pages/reference/extensions/datasonnet.adoc | 39 +++++ extensions/datasonnet/deployment/pom.xml | 63 +++++++ .../datasonnet/deployment/DatasonnetProcessor.java | 56 ++++++ extensions/datasonnet/pom.xml | 39 +++++ extensions/datasonnet/runtime/pom.xml | 105 +++++++++++ .../main/resources/META-INF/quarkus-extension.yaml | 31 ++++ extensions/pom.xml | 1 + integration-tests/datasonnet/pom.xml | 165 ++++++++++++++++++ .../datasonnet/it/DatasonnetResource.java | 193 +++++++++++++++++++++ .../quarkus/component/datasonnet/model/Gizmo.java | 117 +++++++++++++ .../component/datasonnet/model/Manufacturer.java | 71 ++++++++ .../src/main/resources/application.properties | 45 +++++ .../datasonnet/src/main/resources/javaTest.json | 15 ++ .../datasonnet/src/main/resources/payload.csv | 2 + .../datasonnet/src/main/resources/payload.xml | 22 +++ .../datasonnet/src/main/resources/readCSVTest.ds | 20 +++ .../datasonnet/src/main/resources/readJavaTest.ds | 30 ++++ .../src/main/resources/readXMLExtTest.ds | 23 +++ .../src/main/resources/readXMLExtTest.json | 13 ++ .../main/resources/routes/datasonnet-routes.xml | 148 ++++++++++++++++ .../datasonnet/src/main/resources/simpleMapping.ds | 25 +++ .../src/main/resources/simpleMapping_payload.json | 4 + .../src/main/resources/simpleMapping_result.json | 1 + .../datasonnet/src/main/resources/writeJavaTest.ds | 30 ++++ .../component/datasonnet/it/DatasonnetIT.java | 24 +++ .../component/datasonnet/it/DatasonnetTest.java | 136 +++++++++++++++ integration-tests/pom.xml | 1 + pom.xml | 2 + poms/bom/pom.xml | 38 ++++ poms/bom/src/main/generated/flattened-full-pom.xml | 38 ++++ .../src/main/generated/flattened-reduced-pom.xml | 38 ++++ .../generated/flattened-reduced-verbose-pom.xml | 38 ++++ tooling/scripts/test-categories.yaml | 1 + 36 files changed, 1601 insertions(+) diff --git a/catalog/pom.xml b/catalog/pom.xml index f61f7c4c7d..dbd4f15c5c 100644 --- a/catalog/pom.xml +++ b/catalog/pom.xml @@ -1059,6 +1059,19 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-datasonnet</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-debezium-mongodb</artifactId> diff --git a/docs/modules/ROOT/examples/languages/datasonnet.yml b/docs/modules/ROOT/examples/languages/datasonnet.yml new file mode 100644 index 0000000000..c90197153a --- /dev/null +++ b/docs/modules/ROOT/examples/languages/datasonnet.yml @@ -0,0 +1,13 @@ +# Do not edit directly! +# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page +cqArtifactId: camel-quarkus-datasonnet +cqArtifactIdBase: datasonnet +cqNativeSupported: true +cqStatus: Stable +cqDeprecated: false +cqJvmSince: 2.10.0 +cqNativeSince: 2.10.0 +cqCamelPartName: datasonnet +cqCamelPartTitle: DataSonnet +cqCamelPartDescription: To use DataSonnet scripts for message transformations. +cqExtensionPageTitle: DataSonnet diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index ef2bf07afe..c262704f67 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -101,6 +101,7 @@ *** xref:reference/extensions/crypto.adoc[Crypto (JCE)] *** xref:reference/extensions/dns.adoc[DNS] *** xref:reference/extensions/dataformat.adoc[Data Format] +*** xref:reference/extensions/datasonnet.adoc[DataSonnet] *** xref:reference/extensions/debezium-mongodb.adoc[Debezium MongoDB Connector] *** xref:reference/extensions/debezium-mysql.adoc[Debezium MySQL Connector] *** xref:reference/extensions/debezium-postgres.adoc[Debezium PostgresSQL Connector] diff --git a/docs/modules/ROOT/pages/reference/extensions/datasonnet.adoc b/docs/modules/ROOT/pages/reference/extensions/datasonnet.adoc new file mode 100644 index 0000000000..345c8df27a --- /dev/null +++ b/docs/modules/ROOT/pages/reference/extensions/datasonnet.adoc @@ -0,0 +1,39 @@ +// Do not edit directly! +// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page += DataSonnet +:linkattrs: +:cq-artifact-id: camel-quarkus-datasonnet +:cq-native-supported: true +:cq-status: Stable +:cq-status-deprecation: Stable +:cq-description: To use DataSonnet scripts for message transformations. +:cq-deprecated: false +:cq-jvm-since: 2.10.0 +:cq-native-since: 2.10.0 + +[.badges] +[.badge-key]##JVM since##[.badge-supported]##2.10.0## [.badge-key]##Native since##[.badge-supported]##2.10.0## + +To use DataSonnet scripts for message transformations. + +== What's inside + +* xref:{cq-camel-components}:languages:datasonnet-language.adoc[DataSonnet language] + +Please refer to the above link for usage and configuration details. + +== Maven coordinates + +https://code.quarkus.io/?extension-search=camel-quarkus-datasonnet[Create a new project with this extension on code.quarkus.io, window="_blank"] + +Or add the coordinates to your existing project: + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-datasonnet</artifactId> +</dependency> +---- + +Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. diff --git a/extensions/datasonnet/deployment/pom.xml b/extensions/datasonnet/deployment/pom.xml new file mode 100644 index 0000000000..9f1e4afb58 --- /dev/null +++ b/extensions/datasonnet/deployment/pom.xml @@ -0,0 +1,63 @@ +<?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-datasonnet-parent</artifactId> + <version>2.10.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-datasonnet-deployment</artifactId> + <name>Camel Quarkus :: DataSonnet :: 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-datasonnet</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/datasonnet/deployment/src/main/java/org/apache/camel/quarkus/component/datasonnet/deployment/DatasonnetProcessor.java b/extensions/datasonnet/deployment/src/main/java/org/apache/camel/quarkus/component/datasonnet/deployment/DatasonnetProcessor.java new file mode 100644 index 0000000000..723d9dccc1 --- /dev/null +++ b/extensions/datasonnet/deployment/src/main/java/org/apache/camel/quarkus/component/datasonnet/deployment/DatasonnetProcessor.java @@ -0,0 +1,56 @@ +/* + * 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.datasonnet.deployment; + +import java.util.stream.Stream; + +import io.quarkus.deployment.annotations.BuildProducer; +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.*; +import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; +import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; + +class DatasonnetProcessor { + + private static final String FEATURE = "camel-datasonnet"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + + @BuildStep + void addDependencies(BuildProducer<IndexDependencyBuildItem> indexDependency) { + indexDependency.produce(new IndexDependencyBuildItem("com.datasonnet", "datasonnet-mapper")); + indexDependency.produce(new IndexDependencyBuildItem("org.scala-lang", "scala-library")); + indexDependency.produce(new IndexDependencyBuildItem("org.scala-lang.modules", "scala-collection-compat_2.13")); + indexDependency.produce(new IndexDependencyBuildItem("com.lihaoyi", "geny_2.13")); + } + + @BuildStep + void runtimeInitializedClasses(BuildProducer<RuntimeInitializedClassBuildItem> runtimeInitializedClass) { + Stream.of("scala.util.Random$") + .map(RuntimeInitializedClassBuildItem::new) + .forEach(runtimeInitializedClass::produce); + } + + @BuildStep + void process(BuildProducer<NativeImageResourceBuildItem> resource) { + resource.produce(new NativeImageResourceBuildItem("util.libsonnet")); + } +} diff --git a/extensions/datasonnet/pom.xml b/extensions/datasonnet/pom.xml new file mode 100644 index 0000000000..592831a8f9 --- /dev/null +++ b/extensions/datasonnet/pom.xml @@ -0,0 +1,39 @@ +<?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-extensions</artifactId> + <version>2.10.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-datasonnet-parent</artifactId> + <name>Camel Quarkus :: DataSonnet</name> + <packaging>pom</packaging> + + <modules> + <module>deployment</module> + <module>runtime</module> + </modules> +</project> diff --git a/extensions/datasonnet/runtime/pom.xml b/extensions/datasonnet/runtime/pom.xml new file mode 100644 index 0000000000..f3371b9624 --- /dev/null +++ b/extensions/datasonnet/runtime/pom.xml @@ -0,0 +1,105 @@ +<?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-datasonnet-parent</artifactId> + <version>2.10.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-datasonnet</artifactId> + <name>Camel Quarkus :: DataSonnet :: Runtime</name> + <description>To use DataSonnet scripts for message transformations.</description> + + <properties> + <camel.quarkus.jvmSince>2.10.0</camel.quarkus.jvmSince> + <camel.quarkus.nativeSince>2.10.0</camel.quarkus.nativeSince> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-datasonnet</artifactId> + </dependency> + <dependency> + <groupId>com.lihaoyi</groupId> + <artifactId>geny_2.13</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/datasonnet/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/datasonnet/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 0000000000..cf0bc74517 --- /dev/null +++ b/extensions/datasonnet/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 DataSonnet" +description: "To use DataSonnet scripts for message transformations" +metadata: + guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/datasonnet.html" + categories: + - "integration" + status: + - "stable" diff --git a/extensions/pom.xml b/extensions/pom.xml index 45364973ba..b3a3a24e08 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -85,6 +85,7 @@ <module>csimple</module> <module>csv</module> <module>dataformat</module> + <module>datasonnet</module> <module>debezium-mongodb</module> <module>debezium-mysql</module> <module>debezium-postgres</module> diff --git a/integration-tests/datasonnet/pom.xml b/integration-tests/datasonnet/pom.xml new file mode 100644 index 0000000000..20840c8739 --- /dev/null +++ b/integration-tests/datasonnet/pom.xml @@ -0,0 +1,165 @@ +<?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.10.0-SNAPSHOT</version> + <relativePath>../../poms/build-parent-it/pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-integration-test-datasonnet</artifactId> + <name>Camel Quarkus :: Integration Tests :: DataSonnet</name> + <description>Integration tests for Camel Quarkus DataSonnet extension</description> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-bom-test</artifactId> + <version>${camel-quarkus.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>${quarkus.platform.group-id}</groupId> + <artifactId>${quarkus.platform.artifact-id}</artifactId> + <version>${quarkus.platform.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-datasonnet</artifactId> + </dependency> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-resteasy</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-xml-io-dsl</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-direct</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>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> + <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-datasonnet-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-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-xml-io-dsl-deployment</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + </profile> + </profiles> + +</project> diff --git a/integration-tests/datasonnet/src/main/java/org/apache/camel/quarkus/component/datasonnet/it/DatasonnetResource.java b/integration-tests/datasonnet/src/main/java/org/apache/camel/quarkus/component/datasonnet/it/DatasonnetResource.java new file mode 100644 index 0000000000..ce37e62572 --- /dev/null +++ b/integration-tests/datasonnet/src/main/java/org/apache/camel/quarkus/component/datasonnet/it/DatasonnetResource.java @@ -0,0 +1,193 @@ +/* + * 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.datasonnet.it; + +import java.net.URI; +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.TimeZone; + +import javax.enterprise.context.ApplicationScoped; +import javax.inject.Inject; +import javax.ws.rs.Consumes; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +import org.apache.camel.ConsumerTemplate; +import org.apache.camel.ProducerTemplate; +import org.apache.camel.quarkus.component.datasonnet.model.Gizmo; +import org.apache.camel.quarkus.component.datasonnet.model.Manufacturer; +import org.jboss.logging.Logger; + +@Path("/datasonnet") +@ApplicationScoped +public class DatasonnetResource { + + private static final Logger LOG = Logger.getLogger(DatasonnetResource.class); + + @Inject + ProducerTemplate producerTemplate; + + @Inject + ConsumerTemplate consumerTemplate; + + @Path("/basicTransform") + @POST + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + public Response basicTransform(String message) throws Exception { + LOG.infof("Sending to datasonnet: %s", message); + final String response = producerTemplate.requestBody("direct:basicTransform", message, String.class); + LOG.infof("Got response from datasonnet: %s", response); + return Response + .created(new URI("https://camel.apache.org/")) + .entity(response) + .build(); + } + + @Path("/transformXML") + @POST + @Consumes(MediaType.APPLICATION_XML) + @Produces(MediaType.APPLICATION_JSON) + public Response transformXML(String message) throws Exception { + LOG.infof("Sending to datasonnet: %s", message); + final String response = producerTemplate.requestBody("direct:transformXML", message, String.class); + LOG.infof("Got response from datasonnet: %s", response); + return Response + .created(new URI("https://camel.apache.org/")) + .entity(response) + .build(); + } + + @Path("/transformCSV") + @POST + @Consumes(MediaType.TEXT_PLAIN) + @Produces(MediaType.APPLICATION_JSON) + public Response transformCSV(String message) throws Exception { + LOG.infof("Sending to datasonnet: %s", message); + final String response = producerTemplate.requestBody("direct:transformCSV", message, String.class); + LOG.infof("Got response from datasonnet: %s", response); + return Response + .created(new URI("https://camel.apache.org/")) + .entity(response) + .build(); + } + + @Path("/namedImports") + @POST + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + public Response namedImports(String message) throws Exception { + LOG.infof("Sending to datasonnet: %s", message); + final String response = producerTemplate.requestBody("direct:namedImports", message, String.class); + LOG.infof("Got response from datasonnet: %s", response); + return Response + .created(new URI("https://camel.apache.org/")) + .entity(response) + .build(); + } + + @Path("/expressionLanguage") + @POST + @Consumes(MediaType.TEXT_PLAIN) + @Produces(MediaType.APPLICATION_JSON) + public Response expressionLanguage(String message) throws Exception { + LOG.infof("Sending to datasonnet: %s", message); + final String response = producerTemplate.requestBody("direct:expressionLanguage", message, String.class); + LOG.infof("Got response from datasonnet: %s", response); + return Response + .created(new URI("https://camel.apache.org/")) + .entity(response) + .build(); + } + + @Path("/nullInput") + @POST + @Consumes(MediaType.WILDCARD) + @Produces(MediaType.APPLICATION_JSON) + public Response nullInput(String message) throws Exception { + LOG.infof("Sending to datasonnet: %s", message); + final String response = producerTemplate.requestBody("direct:nullInput", message, String.class); + LOG.infof("Got response from datasonnet: %s", response); + return Response + .created(new URI("https://camel.apache.org/")) + .entity(response) + .build(); + } + + @Path("/readJava") + @POST + @Consumes(MediaType.WILDCARD) + @Produces(MediaType.APPLICATION_JSON) + public Response readJava(String message) throws Exception { + Gizmo theGizmo = new Gizmo(); + theGizmo.setName("gizmo"); + theGizmo.setQuantity(123); + theGizmo.setInStock(true); + theGizmo.setColors(Arrays.asList("red", "white", "blue")); + + Manufacturer manufacturer = new Manufacturer(); + manufacturer.setManufacturerName("ACME Corp."); + manufacturer.setManufacturerCode("ACME123"); + theGizmo.setManufacturer(manufacturer); + + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); + df.setTimeZone(TimeZone.getTimeZone("UTC")); + theGizmo.setDate(df.parse("2020-01-06")); + + LOG.infof("Sending to datasonnet: %s", theGizmo); + final String response = producerTemplate.requestBody("direct:readJava", theGizmo, String.class); + LOG.infof("Got response from datasonnet: %s", response); + return Response + .created(new URI("https://camel.apache.org/")) + .entity(response) + .build(); + } + + @Path("/readJavaDatasonnetHeader") + @POST + @Consumes(MediaType.WILDCARD) + @Produces(MediaType.APPLICATION_JSON) + public Response readJavaDatasonnetHeader(String message) throws Exception { + Gizmo theGizmo = new Gizmo(); + theGizmo.setName("gizmo"); + theGizmo.setQuantity(123); + theGizmo.setInStock(true); + theGizmo.setColors(Arrays.asList("red", "white", "blue")); + + Manufacturer manufacturer = new Manufacturer(); + manufacturer.setManufacturerName("ACME Corp."); + manufacturer.setManufacturerCode("ACME123"); + theGizmo.setManufacturer(manufacturer); + + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); + df.setTimeZone(TimeZone.getTimeZone("UTC")); + theGizmo.setDate(df.parse("2020-01-06")); + + LOG.infof("Sending to datasonnet: %s", theGizmo); + final String response = producerTemplate.requestBody("direct:readJavaDatasonnetHeader", theGizmo, String.class); + LOG.infof("Got response from datasonnet: %s", response); + return Response + .created(new URI("https://camel.apache.org/")) + .entity(response) + .build(); + } + +} diff --git a/integration-tests/datasonnet/src/main/java/org/apache/camel/quarkus/component/datasonnet/model/Gizmo.java b/integration-tests/datasonnet/src/main/java/org/apache/camel/quarkus/component/datasonnet/model/Gizmo.java new file mode 100644 index 0000000000..e494e7968b --- /dev/null +++ b/integration-tests/datasonnet/src/main/java/org/apache/camel/quarkus/component/datasonnet/model/Gizmo.java @@ -0,0 +1,117 @@ +/* + * 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.datasonnet.model; + +import java.util.Date; +import java.util.List; +import java.util.Objects; + +import io.quarkus.runtime.annotations.RegisterForReflection; + +@RegisterForReflection +public class Gizmo { + private String name; + private int quantity; + private List<String> colors; + private boolean inStock; + private Manufacturer manufacturer; + private Date date; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getQuantity() { + return quantity; + } + + public void setQuantity(int quantity) { + this.quantity = quantity; + } + + public List<String> getColors() { + return colors; + } + + public void setColors(List<String> colors) { + this.colors = colors; + } + + public boolean isInStock() { + return inStock; + } + + public void setInStock(boolean inStock) { + this.inStock = inStock; + } + + public Manufacturer getManufacturer() { + return manufacturer; + } + + public void setManufacturer(Manufacturer manufacturer) { + this.manufacturer = manufacturer; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + @Override + public String toString() { + return "Gizmo{" + + "name='" + name + '\'' + + ", quantity=" + quantity + + ", colors=" + colors + + ", inStock=" + inStock + + ", manufacturer=" + manufacturer + + ", date=" + date + + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + Gizmo gizmo = (Gizmo) o; + return getQuantity() == gizmo.getQuantity() && + isInStock() == gizmo.isInStock() && + Objects.equals(getName(), gizmo.getName()) && + Objects.equals(getColors(), gizmo.getColors()) && + Objects.equals(date, gizmo.getDate()) && + Objects.equals(getManufacturer(), gizmo.getManufacturer()); + } + + @Override + public int hashCode() { + return Objects.hash(getName(), getQuantity(), getColors(), isInStock(), getManufacturer(), getDate()); + } +} diff --git a/integration-tests/datasonnet/src/main/java/org/apache/camel/quarkus/component/datasonnet/model/Manufacturer.java b/integration-tests/datasonnet/src/main/java/org/apache/camel/quarkus/component/datasonnet/model/Manufacturer.java new file mode 100644 index 0000000000..87d385a987 --- /dev/null +++ b/integration-tests/datasonnet/src/main/java/org/apache/camel/quarkus/component/datasonnet/model/Manufacturer.java @@ -0,0 +1,71 @@ +/* + * 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.datasonnet.model; + +import java.util.Objects; + +import io.quarkus.runtime.annotations.RegisterForReflection; + +@RegisterForReflection +public class Manufacturer { + private String manufacturerName; + private String manufacturerCode; + + public String getManufacturerName() { + return manufacturerName; + } + + public void setManufacturerName(String manufacturerName) { + this.manufacturerName = manufacturerName; + } + + public String getManufacturerCode() { + return manufacturerCode; + } + + public void setManufacturerCode(String manufacturerCode) { + this.manufacturerCode = manufacturerCode; + } + + @Override + public String toString() { + return "Manufacturer{" + + "manufacturerName='" + manufacturerName + '\'' + + ", manufacturerCode='" + manufacturerCode + '\'' + + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + Manufacturer that = (Manufacturer) o; + return Objects.equals(getManufacturerName(), that.getManufacturerName()) && + Objects.equals(getManufacturerCode(), that.getManufacturerCode()); + } + + @Override + public int hashCode() { + return Objects.hash(getManufacturerName(), getManufacturerCode()); + } +} diff --git a/integration-tests/datasonnet/src/main/resources/application.properties b/integration-tests/datasonnet/src/main/resources/application.properties new file mode 100644 index 0000000000..2b52c7426c --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/application.properties @@ -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. +## --------------------------------------------------------------------------- + +## --------------------------------------------------------------------------- +## 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. +## --------------------------------------------------------------------------- + +# +# Camel +# +camel.context.name = camel-quarkus-integration-tests-datasonnet + +# +# Main +# +camel.main.routes-include-pattern = classpath:routes/datasonnet-routes.xml + +quarkus.native.resources.includes = *.json,*.ds,*.csv,*.xml \ No newline at end of file diff --git a/integration-tests/datasonnet/src/main/resources/javaTest.json b/integration-tests/datasonnet/src/main/resources/javaTest.json new file mode 100644 index 0000000000..2dffc040e7 --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/javaTest.json @@ -0,0 +1,15 @@ +{ + "pojoColors": [ + "red", + "white", + "blue" + ], + "pojoInStock": true, + "pojoManufacturer": { + "manufacturerCode": "ACME123", + "manufacturerName": "ACME Corp." + }, + "pojoName": "gizmo", + "pojoQuantity": 123, + "pojoDate": "2020-01-06" +} diff --git a/integration-tests/datasonnet/src/main/resources/payload.csv b/integration-tests/datasonnet/src/main/resources/payload.csv new file mode 100644 index 0000000000..75676b4332 --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/payload.csv @@ -0,0 +1,2 @@ +account,firstName,lastName +123,Joe,Doe diff --git a/integration-tests/datasonnet/src/main/resources/payload.xml b/integration-tests/datasonnet/src/main/resources/payload.xml new file mode 100644 index 0000000000..f65ee1444c --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/payload.xml @@ -0,0 +1,22 @@ +<?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. + +--> +<test:root xmlns:test="http://www.modusbox.com"> + <test:datasonnet version="1.0">Hello World</test:datasonnet> +</test:root> diff --git a/integration-tests/datasonnet/src/main/resources/readCSVTest.ds b/integration-tests/datasonnet/src/main/resources/readCSVTest.ds new file mode 100644 index 0000000000..4d908e3c58 --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/readCSVTest.ds @@ -0,0 +1,20 @@ +/* + * 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. + */ + +{ + account: payload[0]["account"] +} diff --git a/integration-tests/datasonnet/src/main/resources/readJavaTest.ds b/integration-tests/datasonnet/src/main/resources/readJavaTest.ds new file mode 100644 index 0000000000..9150608c64 --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/readJavaTest.ds @@ -0,0 +1,30 @@ +/** DataSonnet +version=2.0 +input payload application/x-java-object; DateFormat=yyyy-MM-dd +*/ + +/* + * 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. + */ + +{ + "pojoName": payload.name, + "pojoQuantity": payload.quantity, + "pojoInStock": payload.inStock, + "pojoColors": payload.colors, + "pojoManufacturer": payload.manufacturer, + "pojoDate": payload.date +} diff --git a/integration-tests/datasonnet/src/main/resources/readXMLExtTest.ds b/integration-tests/datasonnet/src/main/resources/readXMLExtTest.ds new file mode 100644 index 0000000000..3b4a4de2e1 --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/readXMLExtTest.ds @@ -0,0 +1,23 @@ +/** DataSonnet +version=2.0 +input payload application/xml; NamespaceSeparator=%; TextValueKey=__text; AttributeCharacter=* +*/ + +/* + * 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. + */ + +payload diff --git a/integration-tests/datasonnet/src/main/resources/readXMLExtTest.json b/integration-tests/datasonnet/src/main/resources/readXMLExtTest.json new file mode 100644 index 0000000000..0e4ca5613c --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/readXMLExtTest.json @@ -0,0 +1,13 @@ +{ + "test%root": { + "*xmlns": { + "test": "http://www.modusbox.com" + }, + "test%datasonnet": { + "*version": "1.0", + "__text": "Hello World", + "~": 1 + }, + "~": 1 + } +} diff --git a/integration-tests/datasonnet/src/main/resources/routes/datasonnet-routes.xml b/integration-tests/datasonnet/src/main/resources/routes/datasonnet-routes.xml new file mode 100644 index 0000000000..101e33704d --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/routes/datasonnet-routes.xml @@ -0,0 +1,148 @@ +<?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. + +--> +<routes id="datasonnet" + xmlns="http://camel.apache.org/schema/spring" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> + + <route id="basicTransform"> + <from uri="direct:basicTransform"/> + + <setProperty name="test"> + <constant>HelloWorld</constant> + </setProperty> + <setProperty name="count"> + <simple resultType="java.lang.Integer">1</simple> + </setProperty> + <setProperty name="isActive"> + <simple resultType="java.lang.Boolean">true</simple> + </setProperty> + <setProperty name="1. Full Name"> + <constant>DataSonnet</constant> + </setProperty> + + <transform> + <datasonnet bodyMediaType="application/json" outputMediaType="application/json" + resultType="java.lang.String">resource:classpath:simpleMapping.ds</datasonnet> + </transform> + </route> + + <route id="transformXML"> + <from uri="direct:transformXML"/> + <transform> + <datasonnet bodyMediaType="application/xml" outputMediaType="application/json" + resultType="java.lang.String">resource:classpath:readXMLExtTest.ds</datasonnet> + </transform> + </route> + + <route id="transformCSV"> + <from uri="direct:transformCSV"/> + <transform> + <datasonnet bodyMediaType="application/csv" outputMediaType="application/json" + resultType="java.lang.String">resource:classpath:readCSVTest.ds</datasonnet> + </transform> + </route> + + <route id="datasonnetScript"> + <from uri="direct:datasonnetScript"/> + + <setProperty name="test"> + <simple>HelloWorld</simple> + </setProperty> + <setProperty name="count"> + <simple resultType="java.lang.Integer">1</simple> + </setProperty> + <setProperty name="isActive"> + <simple resultType="java.lang.Boolean">true</simple> + </setProperty> + <setProperty name="1. Full Name"> + <constant>DataSonnet</constant> + </setProperty> + + <transform> + <datasonnet bodyMediaType="application/json" outputMediaType="application/json" + resultType="java.lang.String"> + <![CDATA[ + { + "uid": payload.userId, + "uname": payload.name, + "testVar": cml.exchangeProperty('test'), + "isActive": cml.exchangeProperty('isActive'), + "count": cml.exchangeProperty('count'), + "fullName": cml.exchangeProperty('1. Full Name') + } + ]]> + </datasonnet> + </transform> + </route> + + <route id="readJava"> + <from uri="direct:readJava"/> + <transform> + <datasonnet bodyMediaType="application/x-java-object" outputMediaType="application/json" + resultType="java.lang.String">resource:classpath:readJavaTest.ds</datasonnet> + </transform> + </route> + + <route id="readJavaDatasonnetHeader"> + <from uri="direct:readJavaDatasonnetHeader"/> + <transform> + <datasonnet outputMediaType="application/json" resultType="java.lang.String">resource:classpath:readJavaTest.ds</datasonnet> + </transform> + </route> + + <route id="writeJava"> + <from uri="direct:writeJava"/> + <transform> + <datasonnet bodyMediaType="application/json" outputMediaType="application/x-java-object" + resultType="org.apache.camel.quarkus.component.datasonnet.model.Gizmo">resource:classpath:writeJavaTest.ds</datasonnet> + </transform> + </route> + + <route id="expressionLanguage"> + <from uri="direct:expressionLanguage"/> + + <setHeader name="HelloHeader"> + <datasonnet bodyMediaType="application/x-java-object" outputMediaType="text/plain" resultType="java.lang.String">"Hello, " + payload</datasonnet> + </setHeader> + <setBody> + <datasonnet bodyMediaType="application/x-java-object" outputMediaType="application/json" resultType="java.lang.String"> + <![CDATA[ + { + test: cml.header('HelloHeader') + } + ]]> + </datasonnet> + </setBody> + </route> + + <route id="nullInput"> + <from uri="direct:nullInput"/> + <setBody> + <datasonnet outputMediaType="application/json" resultType="java.lang.String"> + { + test: "Hello, World" + } + </datasonnet> + </setBody> + </route> + +</routes> \ No newline at end of file diff --git a/integration-tests/datasonnet/src/main/resources/simpleMapping.ds b/integration-tests/datasonnet/src/main/resources/simpleMapping.ds new file mode 100644 index 0000000000..a1faf255c3 --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/simpleMapping.ds @@ -0,0 +1,25 @@ +/* + * 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. + */ + +{ + "uid": payload.userId, + "uname": payload.name, + "testVar": cml.exchangeProperty('test'), + "isActive": cml.exchangeProperty('isActive'), + "count": cml.exchangeProperty('count'), + "fullName": cml.exchangeProperty('1. Full Name') +} \ No newline at end of file diff --git a/integration-tests/datasonnet/src/main/resources/simpleMapping_payload.json b/integration-tests/datasonnet/src/main/resources/simpleMapping_payload.json new file mode 100644 index 0000000000..1ab6bf4b10 --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/simpleMapping_payload.json @@ -0,0 +1,4 @@ +{ + "userId": 123, + "name": "JavaDuke" +} \ No newline at end of file diff --git a/integration-tests/datasonnet/src/main/resources/simpleMapping_result.json b/integration-tests/datasonnet/src/main/resources/simpleMapping_result.json new file mode 100644 index 0000000000..e9489bd470 --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/simpleMapping_result.json @@ -0,0 +1 @@ +{"count":1,"isActive":true,"testVar":"HelloWorld","uid":123,"uname":"JavaDuke","fullName": "DataSonnet"} \ No newline at end of file diff --git a/integration-tests/datasonnet/src/main/resources/writeJavaTest.ds b/integration-tests/datasonnet/src/main/resources/writeJavaTest.ds new file mode 100644 index 0000000000..d1e98b74b4 --- /dev/null +++ b/integration-tests/datasonnet/src/main/resources/writeJavaTest.ds @@ -0,0 +1,30 @@ +/** DataSonnet +version=2.0 +output application/x-java-object; DateFormat=yyyy-MM-dd +*/ + +/* + * 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. + */ + +{ + "name": payload.pojoName, + "quantity": payload.pojoQuantity, + "inStock": payload.pojoInStock, + "colors": payload.pojoColors, + "manufacturer": payload.pojoManufacturer, + "date": payload.pojoDate +} diff --git a/integration-tests/datasonnet/src/test/java/org/apache/camel/quarkus/component/datasonnet/it/DatasonnetIT.java b/integration-tests/datasonnet/src/test/java/org/apache/camel/quarkus/component/datasonnet/it/DatasonnetIT.java new file mode 100644 index 0000000000..124bb7e75e --- /dev/null +++ b/integration-tests/datasonnet/src/test/java/org/apache/camel/quarkus/component/datasonnet/it/DatasonnetIT.java @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.datasonnet.it; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +class DatasonnetIT extends DatasonnetTest { + +} diff --git a/integration-tests/datasonnet/src/test/java/org/apache/camel/quarkus/component/datasonnet/it/DatasonnetTest.java b/integration-tests/datasonnet/src/test/java/org/apache/camel/quarkus/component/datasonnet/it/DatasonnetTest.java new file mode 100644 index 0000000000..9cfa921087 --- /dev/null +++ b/integration-tests/datasonnet/src/test/java/org/apache/camel/quarkus/component/datasonnet/it/DatasonnetTest.java @@ -0,0 +1,136 @@ +/* + * 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.datasonnet.it; + +import java.io.InputStream; +import java.nio.charset.StandardCharsets; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.http.ContentType; +import io.restassured.path.json.JsonPath; +import org.junit.jupiter.api.Test; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.Matchers.equalTo; + +@QuarkusTest +class DatasonnetTest { + + @Test + public void testTransform() throws Exception { + final String msg = loadResourceAsString("simpleMapping_payload.json"); + final JsonPath expectedJson = new JsonPath(loadResourceAsString("simpleMapping_result.json")); + + given() + .contentType(ContentType.JSON) + .body(msg) + .post("/datasonnet/basicTransform") + .then() + .statusCode(201) + .body("", equalTo(expectedJson.getMap(""))); + } + + @Test + public void testTransformXML() throws Exception { + final String msg = loadResourceAsString("payload.xml"); + final JsonPath expectedJson = new JsonPath(loadResourceAsString("readXMLExtTest.json")); + given() + .contentType(ContentType.XML) + .body(msg) + .post("/datasonnet/transformXML") + .then() + .statusCode(201) + .body("", equalTo(expectedJson.getMap(""))); + } + + @Test + public void testTransformCSV() throws Exception { + final String msg = loadResourceAsString("payload.csv"); + final JsonPath expectedJson = new JsonPath("{\"account\":\"123\"}"); + given() + .contentType(ContentType.TEXT) + .body(msg) + .post("/datasonnet/transformCSV") + .then() + .statusCode(201) + .body("", equalTo(expectedJson.getMap(""))); + } + + @Test + public void testExpressionLanguage() throws Exception { + final String msg = "World"; + final JsonPath expectedJson = new JsonPath("{ \"test\":\"Hello, World\"}"); + given() + .contentType(ContentType.TEXT) + .body(msg) + .post("/datasonnet/expressionLanguage") + .then() + .statusCode(201) + .body("", equalTo(expectedJson.getMap(""))); + } + + @Test + public void testNullInput() throws Exception { + final String msg = ""; + final JsonPath expectedJson = new JsonPath("{ \"test\":\"Hello, World\"}"); + given() + .contentType(ContentType.TEXT) + .body(msg) + .post("/datasonnet/nullInput") + .then() + .statusCode(201) + .body("", equalTo(expectedJson.getMap(""))); + + given() + .contentType(ContentType.TEXT) + .post("/datasonnet/nullInput") + .then() + .statusCode(201) + .body("", equalTo(expectedJson.getMap(""))); + } + + @Test + public void testReadJava() throws Exception { + final String msg = "fake"; + final JsonPath expectedJson = new JsonPath(loadResourceAsString("javaTest.json")); + given() + .contentType(ContentType.TEXT) + .body(msg) + .post("/datasonnet/readJava") + .then() + .statusCode(201) + .body("", equalTo(expectedJson.getMap(""))); + } + + @Test + public void testReadJavaDatasonnetHeader() throws Exception { + final String msg = "fake"; + final JsonPath expectedJson = new JsonPath(loadResourceAsString("javaTest.json")); + given() + .contentType(ContentType.TEXT) + .body(msg) + .post("/datasonnet/readJavaDatasonnetHeader") + .then() + .statusCode(201) + .body("", equalTo(expectedJson.getMap(""))); + } + + private String loadResourceAsString(String name) throws Exception { + InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(name); + return new String(is.readAllBytes(), StandardCharsets.UTF_8); + } +} diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index b4af62b37f..c5ca2b5993 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -80,6 +80,7 @@ <module>csv</module> <module>dataformat</module> <module>dataformats-json</module> + <module>datasonnet</module> <module>debezium</module> <module>digitalocean</module> <module>disruptor</module> diff --git a/pom.xml b/pom.xml index d3c7a968ee..16f2f84355 100644 --- a/pom.xml +++ b/pom.xml @@ -86,6 +86,7 @@ <dropwizard-metrics.version>4.1.0</dropwizard-metrics.version><!-- @sync com.azure:azure-sdk-bom:${azure-sdk-bom.version} dep:io.dropwizard.metrics:metrics-core --> <eddsa.version>${eddsa-version}</eddsa.version> <freemarker.version>2.3.31</freemarker.version><!-- @sync io.quarkiverse.freemarker:quarkus-freemarker-parent:${quarkiverse-freemarker.version} prop:freemarker.version --> + <geny.version>0.6.2</geny.version> <github-api.version>1.111</github-api.version><!-- Used in a Groovy script bellow --> <google-native-image-support.version>0.8.0</google-native-image-support.version> <google-auth-library-credentials.version>${grpc-google-auth-library-version}</google-auth-library-credentials.version> @@ -526,6 +527,7 @@ </excludes> <mapping> <cli>CAMEL_PROPERTIES_STYLE</cli> + <ds>SLASHSTAR_STYLE</ds> <groovy>SLASHSTAR_STYLE</groovy> <java>SLASHSTAR_STYLE</java> <Jenkinsfile>SLASHSTAR_STYLE</Jenkinsfile> diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml index 596d722506..f3625fe921 100644 --- a/poms/bom/pom.xml +++ b/poms/bom/pom.xml @@ -1717,6 +1717,29 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-datasonnet</artifactId> + <version>${camel.version}</version> + <exclusions> + <exclusion> + <groupId>jakarta.activation</groupId> + <artifactId>jakarta.activation-api</artifactId> + </exclusion> + <exclusion> + <groupId>jakarta.xml.bind</groupId> + <artifactId>jakarta.xml.bind-api</artifactId> + </exclusion> + <exclusion> + <groupId>javax.activation</groupId> + <artifactId>activation</artifactId> + </exclusion> + <exclusion> + <groupId>com.lihaoyi</groupId> + <artifactId>geny_2.13</artifactId> + </exclusion> + </exclusions> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-debezium-common</artifactId> @@ -6945,6 +6968,16 @@ <artifactId>camel-quarkus-dataformat-deployment</artifactId> <version>${camel-quarkus.version}</version> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-datasonnet</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-datasonnet-deployment</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-debezium-mongodb</artifactId> @@ -9752,6 +9785,11 @@ <artifactId>core</artifactId> <version>${zxing.version}</version> </dependency> + <dependency> + <groupId>com.lihaoyi</groupId> + <artifactId>geny_2.13</artifactId> + <version>${geny.version}</version> + </dependency> <dependency> <groupId>com.orbitz.consul</groupId> <artifactId>consul-client</artifactId> diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml b/poms/bom/src/main/generated/flattened-full-pom.xml index ae83eea43b..64d28a0af3 100644 --- a/poms/bom/src/main/generated/flattened-full-pom.xml +++ b/poms/bom/src/main/generated/flattened-full-pom.xml @@ -1663,6 +1663,29 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-datasonnet</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>3.16.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <exclusions> + <exclusion> + <groupId>jakarta.activation</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>jakarta.activation-api</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </exclusion> + <exclusion> + <groupId>jakarta.xml.bind</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>jakarta.xml.bind-api</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </exclusion> + <exclusion> + <groupId>javax.activation</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>activation</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </exclusion> + <exclusion> + <groupId>com.lihaoyi</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>geny_2.13</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </exclusion> + </exclusions> + </dependency> <dependency> <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>camel-debezium-common</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -6889,6 +6912,16 @@ <artifactId>camel-quarkus-dataformat-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>2.10.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-quarkus-datasonnet</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>2.10.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-quarkus-datasonnet-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>2.10.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>camel-quarkus-debezium-mongodb</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -9694,6 +9727,11 @@ <artifactId>core</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>3.3.3</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>com.lihaoyi</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>geny_2.13</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>0.6.2</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>com.orbitz.consul</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>consul-client</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> diff --git a/poms/bom/src/main/generated/flattened-reduced-pom.xml b/poms/bom/src/main/generated/flattened-reduced-pom.xml index 88471c6035..35f746dc48 100644 --- a/poms/bom/src/main/generated/flattened-reduced-pom.xml +++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml @@ -1663,6 +1663,29 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-datasonnet</artifactId> + <version>3.16.0</version> + <exclusions> + <exclusion> + <groupId>jakarta.activation</groupId> + <artifactId>jakarta.activation-api</artifactId> + </exclusion> + <exclusion> + <groupId>jakarta.xml.bind</groupId> + <artifactId>jakarta.xml.bind-api</artifactId> + </exclusion> + <exclusion> + <groupId>javax.activation</groupId> + <artifactId>activation</artifactId> + </exclusion> + <exclusion> + <groupId>com.lihaoyi</groupId> + <artifactId>geny_2.13</artifactId> + </exclusion> + </exclusions> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-debezium-common</artifactId> @@ -6889,6 +6912,16 @@ <artifactId>camel-quarkus-dataformat-deployment</artifactId> <version>2.10.0-SNAPSHOT</version> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-datasonnet</artifactId> + <version>2.10.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-datasonnet-deployment</artifactId> + <version>2.10.0-SNAPSHOT</version> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-debezium-mongodb</artifactId> @@ -9694,6 +9727,11 @@ <artifactId>core</artifactId> <version>3.3.3</version> </dependency> + <dependency> + <groupId>com.lihaoyi</groupId> + <artifactId>geny_2.13</artifactId> + <version>0.6.2</version> + </dependency> <dependency> <groupId>com.orbitz.consul</groupId> <artifactId>consul-client</artifactId> diff --git a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml index bca44206bf..06b69b3c1f 100644 --- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml +++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml @@ -1663,6 +1663,29 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-datasonnet</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>3.16.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <exclusions> + <exclusion> + <groupId>jakarta.activation</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>jakarta.activation-api</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </exclusion> + <exclusion> + <groupId>jakarta.xml.bind</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>jakarta.xml.bind-api</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </exclusion> + <exclusion> + <groupId>javax.activation</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>activation</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </exclusion> + <exclusion> + <groupId>com.lihaoyi</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>geny_2.13</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </exclusion> + </exclusions> + </dependency> <dependency> <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>camel-debezium-common</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -6889,6 +6912,16 @@ <artifactId>camel-quarkus-dataformat-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>2.10.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-quarkus-datasonnet</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>2.10.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-quarkus-datasonnet-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>2.10.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>camel-quarkus-debezium-mongodb</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -9694,6 +9727,11 @@ <artifactId>core</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>3.3.3</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>com.lihaoyi</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>geny_2.13</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>0.6.2</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>com.orbitz.consul</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>consul-client</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> diff --git a/tooling/scripts/test-categories.yaml b/tooling/scripts/test-categories.yaml index 9562d09f4b..8a7ff6a0b9 100644 --- a/tooling/scripts/test-categories.yaml +++ b/tooling/scripts/test-categories.yaml @@ -84,6 +84,7 @@ group-05: - cbor - csv - dataformat + - datasonnet - hl7 - jaxb - ssh