This is an automated email from the ASF dual-hosted git repository. zhfeng 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 91b3ca587a Fix #6720 to add camel-quarkus-fury (#6878) 91b3ca587a is described below commit 91b3ca587a9573c9182e793878306f9ff3aa906a Author: Zheng Feng <zh.f...@gmail.com> AuthorDate: Fri Dec 20 19:30:52 2024 +0800 Fix #6720 to add camel-quarkus-fury (#6878) --- catalog/pom.xml | 13 +++ docs/modules/ROOT/examples/dataformats/fury.yml | 13 +++ docs/modules/ROOT/nav.adoc | 1 + .../ROOT/pages/reference/extensions/fury.adoc | 45 +++++++ extensions/fury/deployment/pom.xml | 67 +++++++++++ .../component/fury/deployment/FuryProcessor.java | 30 +++++ extensions/fury/pom.xml | 39 +++++++ extensions/fury/runtime/pom.xml | 105 +++++++++++++++++ .../main/resources/META-INF/quarkus-extension.yaml | 33 ++++++ extensions/pom.xml | 1 + integration-tests/fury/pom.xml | 129 +++++++++++++++++++++ .../quarkus/component/fury/it/FuryResource.java | 54 +++++++++ .../quarkus/component/fury/it/FuryRoutes.java | 29 +++++ .../camel/quarkus/component/fury/it/Pojo.java | 23 ++++ .../camel/quarkus/component/fury/it/FuryIT.java | 24 ++++ .../camel/quarkus/component/fury/it/FuryTest.java | 47 ++++++++ integration-tests/pom.xml | 1 + pom.xml | 1 + poms/bom/pom.xml | 37 ++++++ poms/bom/src/main/generated/flattened-full-pom.xml | 37 ++++++ .../src/main/generated/flattened-reduced-pom.xml | 37 ++++++ .../generated/flattened-reduced-verbose-pom.xml | 37 ++++++ tooling/scripts/test-categories.yaml | 1 + 23 files changed, 804 insertions(+) diff --git a/catalog/pom.xml b/catalog/pom.xml index 1444df4677..dfa5af7f48 100644 --- a/catalog/pom.xml +++ b/catalog/pom.xml @@ -1410,6 +1410,19 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-fury</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-geocoder</artifactId> diff --git a/docs/modules/ROOT/examples/dataformats/fury.yml b/docs/modules/ROOT/examples/dataformats/fury.yml new file mode 100644 index 0000000000..65bd1993d1 --- /dev/null +++ b/docs/modules/ROOT/examples/dataformats/fury.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-fury +cqArtifactIdBase: fury +cqNativeSupported: true +cqStatus: Stable +cqDeprecated: false +cqJvmSince: 3.18.0 +cqNativeSince: 3.18.0 +cqCamelPartName: fury +cqCamelPartTitle: Fury +cqCamelPartDescription: Serialize and deserialize messages using Apache Fury +cqExtensionPageTitle: Fury diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 2cf27cf893..e5da3c0da7 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -128,6 +128,7 @@ *** xref:reference/extensions/flatpack.adoc[Flatpack] *** xref:reference/extensions/flink.adoc[Flink] *** xref:reference/extensions/freemarker.adoc[Freemarker] +*** xref:reference/extensions/fury.adoc[Fury] *** xref:reference/extensions/geocoder.adoc[Geocoder] *** xref:reference/extensions/git.adoc[Git] *** xref:reference/extensions/github.adoc[GitHub] diff --git a/docs/modules/ROOT/pages/reference/extensions/fury.adoc b/docs/modules/ROOT/pages/reference/extensions/fury.adoc new file mode 100644 index 0000000000..a45a46e9af --- /dev/null +++ b/docs/modules/ROOT/pages/reference/extensions/fury.adoc @@ -0,0 +1,45 @@ +// Do not edit directly! +// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page +[id="extensions-fury"] += Fury +:linkattrs: +:cq-artifact-id: camel-quarkus-fury +:cq-native-supported: true +:cq-status: Stable +:cq-status-deprecation: Stable +:cq-description: Serialize and deserialize messages using Apache Fury +:cq-deprecated: false +:cq-jvm-since: 3.18.0 +:cq-native-since: 3.18.0 + +ifeval::[{doc-show-badges} == true] +[.badges] +[.badge-key]##JVM since##[.badge-supported]##3.18.0## [.badge-key]##Native since##[.badge-supported]##3.18.0## +endif::[] + +Serialize and deserialize messages using Apache Fury + +[id="extensions-fury-whats-inside"] +== What's inside + +* xref:{cq-camel-components}:dataformats:fury-dataformat.adoc[Fury data format] + +Please refer to the above link for usage and configuration details. + +[id="extensions-fury-maven-coordinates"] +== Maven coordinates + +https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-fury[Create a new project with this extension on {link-quarkus-code-generator}, window="_blank"] + +Or add the coordinates to your existing project: + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-fury</artifactId> +</dependency> +---- +ifeval::[{doc-show-user-guide-link} == true] +Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. +endif::[] diff --git a/extensions/fury/deployment/pom.xml b/extensions/fury/deployment/pom.xml new file mode 100644 index 0000000000..8e92a411eb --- /dev/null +++ b/extensions/fury/deployment/pom.xml @@ -0,0 +1,67 @@ +<?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-fury-parent</artifactId> + <version>3.18.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-fury-deployment</artifactId> + <name>Camel Quarkus :: Fury :: Deployment</name> + + <dependencies> + <dependency> + <groupId>io.quarkiverse.fury</groupId> + <artifactId>quarkus-fury-deployment</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core-deployment</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-fury</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/fury/deployment/src/main/java/org/apache/camel/quarkus/component/fury/deployment/FuryProcessor.java b/extensions/fury/deployment/src/main/java/org/apache/camel/quarkus/component/fury/deployment/FuryProcessor.java new file mode 100644 index 0000000000..cf835ed46e --- /dev/null +++ b/extensions/fury/deployment/src/main/java/org/apache/camel/quarkus/component/fury/deployment/FuryProcessor.java @@ -0,0 +1,30 @@ +/* + * 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.fury.deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class FuryProcessor { + + private static final String FEATURE = "camel-fury"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } +} diff --git a/extensions/fury/pom.xml b/extensions/fury/pom.xml new file mode 100644 index 0000000000..c69d38f2a3 --- /dev/null +++ b/extensions/fury/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>3.18.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-fury-parent</artifactId> + <name>Camel Quarkus :: Fury</name> + <packaging>pom</packaging> + + <modules> + <module>deployment</module> + <module>runtime</module> + </modules> +</project> diff --git a/extensions/fury/runtime/pom.xml b/extensions/fury/runtime/pom.xml new file mode 100644 index 0000000000..50970d00f9 --- /dev/null +++ b/extensions/fury/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-fury-parent</artifactId> + <version>3.18.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-fury</artifactId> + <name>Camel Quarkus :: Fury :: Runtime</name> + <description>Serialize and deserialize messages using Apache Fury</description> + + <properties> + <camel.quarkus.jvmSince>3.18.0</camel.quarkus.jvmSince> + <camel.quarkus.nativeSince>3.18.0</camel.quarkus.nativeSince> + </properties> + + <dependencies> + <dependency> + <groupId>io.quarkiverse.fury</groupId> + <artifactId>quarkus-fury</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-fury</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-extension-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/fury/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/fury/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 0000000000..d8e5136691 --- /dev/null +++ b/extensions/fury/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,33 @@ +# +# 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 Fury" +description: "Serialize and deserialize messages using Apache Fury" +metadata: + icon-url: "https://raw.githubusercontent.com/apache/camel-website/main/antora-ui-camel/src/img/logo-d.svg" + sponsor: "Apache Software Foundation" + guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/fury.html" + categories: + - "integration" + status: + - "stable" diff --git a/extensions/pom.xml b/extensions/pom.xml index a16d2042e8..11786faa73 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -109,6 +109,7 @@ <module>fop</module> <module>freemarker</module> <module>ftp</module> + <module>fury</module> <module>geocoder</module> <module>git</module> <module>github</module> diff --git a/integration-tests/fury/pom.xml b/integration-tests/fury/pom.xml new file mode 100644 index 0000000000..4e3757ab21 --- /dev/null +++ b/integration-tests/fury/pom.xml @@ -0,0 +1,129 @@ +<?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>3.18.0-SNAPSHOT</version> + <relativePath>../../poms/build-parent-it/pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-integration-test-fury</artifactId> + <name>Camel Quarkus :: Integration Tests :: Fury</name> + <description>Integration tests for Camel Quarkus Fury extension</description> + + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-direct</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-fury</artifactId> + </dependency> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-resteasy</artifactId> + </dependency> + + <!-- test dependencies --> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-junit5</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>io.rest-assured</groupId> + <artifactId>rest-assured</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + + <profiles> + <profile> + <id>native</id> + <activation> + <property> + <name>native</name> + </property> + </activation> + <properties> + <quarkus.native.enabled>true</quarkus.native.enabled> + </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-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-fury-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/fury/src/main/java/org/apache/camel/quarkus/component/fury/it/FuryResource.java b/integration-tests/fury/src/main/java/org/apache/camel/quarkus/component/fury/it/FuryResource.java new file mode 100644 index 0000000000..b986d39f35 --- /dev/null +++ b/integration-tests/fury/src/main/java/org/apache/camel/quarkus/component/fury/it/FuryResource.java @@ -0,0 +1,54 @@ +/* + * 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.fury.it; + +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; +import org.apache.camel.ProducerTemplate; +import org.jboss.logging.Logger; + +@Path("/fury") +@ApplicationScoped +public class FuryResource { + + private static final Logger LOG = Logger.getLogger(FuryResource.class); + + @Inject + ProducerTemplate producerTemplate; + + @Path("/marshal") + @POST + public Response marshal(String message) throws Exception { + Pojo pojo = new Pojo(1, message); + byte[] result = producerTemplate.requestBody("direct:marshal", pojo, byte[].class); + return Response.ok(result).build(); + } + + @Path("/unmarshal") + @POST + @Consumes("application/octet-stream") + public Response unmarshal(byte[] message) throws Exception { + Pojo result = producerTemplate.requestBody("direct:unmarshal", message, Pojo.class); + return Response.ok() + .entity(result.f2()) + .build(); + } +} diff --git a/integration-tests/fury/src/main/java/org/apache/camel/quarkus/component/fury/it/FuryRoutes.java b/integration-tests/fury/src/main/java/org/apache/camel/quarkus/component/fury/it/FuryRoutes.java new file mode 100644 index 0000000000..4ecaf153f9 --- /dev/null +++ b/integration-tests/fury/src/main/java/org/apache/camel/quarkus/component/fury/it/FuryRoutes.java @@ -0,0 +1,29 @@ +/* + * 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.fury.it; + +import org.apache.camel.builder.RouteBuilder; + +public class FuryRoutes extends RouteBuilder { + + @Override + public void configure() throws Exception { + from("direct:marshal").marshal().fury(); + from("direct:unmarshal").unmarshal().fury(); + + } +} diff --git a/integration-tests/fury/src/main/java/org/apache/camel/quarkus/component/fury/it/Pojo.java b/integration-tests/fury/src/main/java/org/apache/camel/quarkus/component/fury/it/Pojo.java new file mode 100644 index 0000000000..b5b051247a --- /dev/null +++ b/integration-tests/fury/src/main/java/org/apache/camel/quarkus/component/fury/it/Pojo.java @@ -0,0 +1,23 @@ +/* + * 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.fury.it; + +import io.quarkiverse.fury.FurySerialization; + +@FurySerialization +public record Pojo(int f1, String f2) { +} diff --git a/integration-tests/fury/src/test/java/org/apache/camel/quarkus/component/fury/it/FuryIT.java b/integration-tests/fury/src/test/java/org/apache/camel/quarkus/component/fury/it/FuryIT.java new file mode 100644 index 0000000000..73229eec54 --- /dev/null +++ b/integration-tests/fury/src/test/java/org/apache/camel/quarkus/component/fury/it/FuryIT.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.fury.it; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +class FuryIT extends FuryTest { + +} diff --git a/integration-tests/fury/src/test/java/org/apache/camel/quarkus/component/fury/it/FuryTest.java b/integration-tests/fury/src/test/java/org/apache/camel/quarkus/component/fury/it/FuryTest.java new file mode 100644 index 0000000000..ffd81eb26d --- /dev/null +++ b/integration-tests/fury/src/test/java/org/apache/camel/quarkus/component/fury/it/FuryTest.java @@ -0,0 +1,47 @@ +/* + * 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.fury.it; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.RestAssured; +import org.junit.jupiter.api.Test; + +import static org.hamcrest.Matchers.equalTo; + +@QuarkusTest +class FuryTest { + + @Test + public void test() { + String message = "Hello Camel Quarkus Fury"; + byte[] data = RestAssured.given() + .body(message) + .post("/fury/marshal") + .then() + .statusCode(200) + .extract() + .body() + .asByteArray(); + + RestAssured.given() + .body(data) + .post("/fury/unmarshal") + .then() + .statusCode(200) + .body(equalTo(message)); + } +} diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index d8fbb10003..f3e143a165 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -94,6 +94,7 @@ <module>fop</module> <module>freemarker</module> <module>ftp</module> + <module>fury</module> <module>geocoder</module> <module>git</module> <module>github</module> diff --git a/pom.xml b/pom.xml index 87b509c790..e0ff3b52aa 100644 --- a/pom.xml +++ b/pom.xml @@ -51,6 +51,7 @@ <quarkiverse-artemis.version>3.6.0</quarkiverse-artemis.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/artemis/quarkus-artemis-parent/ --> <quarkiverse-cxf.version>3.17.3</quarkiverse-cxf.version><!-- This should be in sync with quarkus-platform https://repo1.maven.org/maven2/io/quarkiverse/cxf/quarkus-cxf-parent/ --> <quarkiverse-freemarker.version>1.1.0</quarkiverse-freemarker.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/freemarker/quarkus-freemarker-parent/ --> + <quarkiverse-fury.version>0.2.1</quarkiverse-fury.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/fury/quarkus-fury-parent/ --> <quarkiverse-groovy.version>3.17.2</quarkiverse-groovy.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/groovy/quarkus-groovy-parent/ --> <quarkiverse-jackson-jq.version>2.2.0</quarkiverse-jackson-jq.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/jackson-jq/quarkus-jackson-jq-parent/ --> <quarkiverse-jgit.version>3.3.3</quarkiverse-jgit.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/jgit/quarkus-jgit-parent/ --> diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml index 1cd6e564a7..b9ffe037bd 100644 --- a/poms/bom/pom.xml +++ b/poms/bom/pom.xml @@ -1102,6 +1102,17 @@ <artifactId>camel-ftp</artifactId> <version>${camel.version}</version> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-fury</artifactId> + <version>${camel.version}</version> + <exclusions> + <exclusion> + <groupId>org.checkerframework</groupId> + <artifactId>checker-qual</artifactId> + </exclusion> + </exclusions> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-geocoder</artifactId> @@ -3996,6 +4007,16 @@ <artifactId>camel-quarkus-ftp-deployment</artifactId> <version>${camel-quarkus.version}</version> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-fury</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-fury-deployment</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-geocoder</artifactId> @@ -6796,6 +6817,22 @@ <artifactId>quarkus-freemarker-deployment</artifactId> <version>${quarkiverse-freemarker.version}</version> </dependency> + <dependency> + <groupId>io.quarkiverse.fury</groupId> + <artifactId>quarkus-fury</artifactId> + <version>${quarkiverse-fury.version}</version> + <exclusions> + <exclusion> + <groupId>org.checkerframework</groupId> + <artifactId>checker-qual</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>io.quarkiverse.fury</groupId> + <artifactId>quarkus-fury-deployment</artifactId> + <version>${quarkiverse-fury.version}</version> + </dependency> <dependency> <groupId>io.quarkiverse.groovy</groupId> <artifactId>quarkus-groovy</artifactId> diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml b/poms/bom/src/main/generated/flattened-full-pom.xml index 18dc0643fa..839c77bda7 100644 --- a/poms/bom/src/main/generated/flattened-full-pom.xml +++ b/poms/bom/src/main/generated/flattened-full-pom.xml @@ -1040,6 +1040,17 @@ <artifactId>camel-ftp</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>4.9.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-fury</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>4.9.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <exclusions> + <exclusion> + <groupId>org.checkerframework</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>checker-qual</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-geocoder</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -3921,6 +3932,16 @@ <artifactId>camel-quarkus-ftp-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>3.18.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-fury</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>3.18.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-fury-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>3.18.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-geocoder</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -6718,6 +6739,22 @@ <artifactId>quarkus-freemarker-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>1.1.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>io.quarkiverse.fury</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>quarkus-fury</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>0.2.1</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <exclusions> + <exclusion> + <groupId>org.checkerframework</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>checker-qual</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>io.quarkiverse.fury</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>quarkus-fury-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>0.2.1</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>io.quarkiverse.groovy</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>quarkus-groovy</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 4668cd6fe5..a0eea6bf26 100644 --- a/poms/bom/src/main/generated/flattened-reduced-pom.xml +++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml @@ -1035,6 +1035,17 @@ <artifactId>camel-ftp</artifactId> <version>4.9.0</version> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-fury</artifactId> + <version>4.9.0</version> + <exclusions> + <exclusion> + <groupId>org.checkerframework</groupId> + <artifactId>checker-qual</artifactId> + </exclusion> + </exclusions> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-geocoder</artifactId> @@ -3916,6 +3927,16 @@ <artifactId>camel-quarkus-ftp-deployment</artifactId> <version>3.18.0-SNAPSHOT</version> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-fury</artifactId> + <version>3.18.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-fury-deployment</artifactId> + <version>3.18.0-SNAPSHOT</version> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-geocoder</artifactId> @@ -6688,6 +6709,22 @@ <artifactId>quarkus-freemarker-deployment</artifactId> <version>1.1.0</version> </dependency> + <dependency> + <groupId>io.quarkiverse.fury</groupId> + <artifactId>quarkus-fury</artifactId> + <version>0.2.1</version> + <exclusions> + <exclusion> + <groupId>org.checkerframework</groupId> + <artifactId>checker-qual</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>io.quarkiverse.fury</groupId> + <artifactId>quarkus-fury-deployment</artifactId> + <version>0.2.1</version> + </dependency> <dependency> <groupId>io.quarkiverse.groovy</groupId> <artifactId>quarkus-groovy</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 0b88bf4a9d..2186b57547 100644 --- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml +++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml @@ -1035,6 +1035,17 @@ <artifactId>camel-ftp</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>4.9.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-fury</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>4.9.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <exclusions> + <exclusion> + <groupId>org.checkerframework</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>checker-qual</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-geocoder</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -3916,6 +3927,16 @@ <artifactId>camel-quarkus-ftp-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>3.18.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-fury</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>3.18.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-fury-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>3.18.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-geocoder</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -6688,6 +6709,22 @@ <artifactId>quarkus-freemarker-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>1.1.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>io.quarkiverse.fury</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>quarkus-fury</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>0.2.1</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <exclusions> + <exclusion> + <groupId>org.checkerframework</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>checker-qual</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>io.quarkiverse.fury</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>quarkus-fury-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>0.2.1</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>io.quarkiverse.groovy</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>quarkus-groovy</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 6293e9be76..03ddf594aa 100644 --- a/tooling/scripts/test-categories.yaml +++ b/tooling/scripts/test-categories.yaml @@ -93,6 +93,7 @@ group-05: - cxf-soap-grouped - dataformat - datasonnet + - fury - hl7 - jaxb - mapstruct