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

jiriondrusek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-upgrade-recipes.git


The following commit(s) were added to refs/heads/main by this push:
     new 8db3706  Upgrade Camel 4.16 to 4.17.0
8db3706 is described below

commit 8db3706a01cb35946c9e351c3a810f488f8b5c03
Author: Jiri Ondrusek <[email protected]>
AuthorDate: Wed Jan 7 17:22:04 2026 +0100

    Upgrade Camel 4.16 to 4.17.0
---
 .../src/main/resources/META-INF/rewrite/4.17.yaml  |  24 ++++
 .../main/resources/META-INF/rewrite/latest.yaml    |   1 +
 .../upgrade/camel417/YamlTransform417Recipe.java   |  74 +++++++++++
 .../src/main/resources/META-INF/rewrite/4.17.yaml  |  35 +++++
 .../main/resources/META-INF/rewrite/latest.yaml    |   1 +
 .../org/apache/camel/upgrade/CamelTestUtil.java    |   3 +-
 .../apache/camel/upgrade/CamelUpdate417Test.java   | 146 +++++++++++++++++++++
 release_notes.adoc                                 |  30 ++++-
 8 files changed, 312 insertions(+), 2 deletions(-)

diff --git 
a/camel-spring-boot-upgrade-recipes/src/main/resources/META-INF/rewrite/4.17.yaml
 
b/camel-spring-boot-upgrade-recipes/src/main/resources/META-INF/rewrite/4.17.yaml
new file mode 100644
index 0000000..bcf8047
--- /dev/null
+++ 
b/camel-spring-boot-upgrade-recipes/src/main/resources/META-INF/rewrite/4.17.yaml
@@ -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.
+#
+---
+type: specs.openrewrite.org/v1beta/recipe
+name: org.apache.camel.upgrade.camel417.CamelSpringBootMigrationRecipe
+displayName: Migrates Camel Spring Boot applications to Camel Spring Boot 4.17
+description: Migrates Camel Spring Boot applications to Camel Spring Boot 4.17.
+recipeList:
+  - org.apache.camel.upgrade.camel416.CamelSpringBootMigrationRecipe
+  - org.apache.camel.upgrade.camel417.CamelMigrationRecipe
\ No newline at end of file
diff --git 
a/camel-spring-boot-upgrade-recipes/src/main/resources/META-INF/rewrite/latest.yaml
 
b/camel-spring-boot-upgrade-recipes/src/main/resources/META-INF/rewrite/latest.yaml
index 5f3ba30..53b9505 100644
--- 
a/camel-spring-boot-upgrade-recipes/src/main/resources/META-INF/rewrite/latest.yaml
+++ 
b/camel-spring-boot-upgrade-recipes/src/main/resources/META-INF/rewrite/latest.yaml
@@ -21,6 +21,7 @@ displayName: Migrate to Apache Camel Spring Boot 
@camel-latest-version@
 description: >- 
   Migrate applications to Apache Camel Spring Boot @camel-latest-version@ and 
Spring Boot @spring-boot-version@
 recipeList:
+  - org.apache.camel.upgrade.camel417.CamelMigrationRecipe
   - org.apache.camel.upgrade.camel416.CamelMigrationRecipe
   - org.apache.camel.upgrade.camel415.CamelMigrationRecipe
   - org.apache.camel.upgrade.camel414.CamelMigrationRecipe
diff --git 
a/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/camel417/YamlTransform417Recipe.java
 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/camel417/YamlTransform417Recipe.java
new file mode 100644
index 0000000..bdd1f62
--- /dev/null
+++ 
b/camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/camel417/YamlTransform417Recipe.java
@@ -0,0 +1,74 @@
+/*
+ * 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.upgrade.camel417;
+
+import lombok.EqualsAndHashCode;
+import lombok.Value;
+import org.apache.camel.upgrade.AbstractCamelYamlVisitor;
+import org.openrewrite.ExecutionContext;
+import org.openrewrite.Recipe;
+import org.openrewrite.TreeVisitor;
+import org.openrewrite.yaml.JsonPathMatcher;
+import org.openrewrite.yaml.tree.Yaml;
+
+/**
+ * <p>
+ * <a 
href="https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_core";>camel-core
 for yaml</a>
+ * </p>
+ */
+@EqualsAndHashCode(callSuper = false)
+@Value
+public class YamlTransform417Recipe extends Recipe {
+
+    @Override
+    public String getDisplayName() {
+        return "Camel YML transform changes";
+    }
+
+    @Override
+    public String getDescription() {
+        return "Apache Camel YML DSL migration from version 4.16 o 4.17.";
+    }
+
+    private static final JsonPathMatcher pathMatcher = new 
JsonPathMatcher("$..route..steps.transform");
+
+    @Override
+    public TreeVisitor<?, ExecutionContext> getVisitor() {
+
+         return new AbstractCamelYamlVisitor() {
+
+            @Override
+            protected void clearLocalCache() {
+                //nothing to do
+            }
+
+            @Override
+            public Yaml.Mapping.Entry doVisitMappingEntry(Yaml.Mapping.Entry 
entry, ExecutionContext ctx) {
+                Yaml.Mapping.Entry e = super.doVisitMappingEntry(entry, ctx);
+
+                //rename entry only if there is a child entry 'toType'
+                if(pathMatcher.matches(getCursor()) && 
((Yaml.Mapping)entry.getValue()).getEntries().stream().anyMatch(en -> 
en.getKey().getValue().equals("toType"))) {
+                    e = entry.withKey(((Yaml.Scalar) 
entry.getKey().copyPaste()).withValue("transformDataType"));
+                }
+
+                return e;
+            }
+
+        };
+    }
+
+}
diff --git 
a/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/4.17.yaml 
b/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/4.17.yaml
new file mode 100644
index 0000000..db8a231
--- /dev/null
+++ b/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/4.17.yaml
@@ -0,0 +1,35 @@
+#
+# 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.
+#
+
+#####
+# Rules coming from 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html
+#####
+
+#####
+# Update the Camel project from 4.16 to 4.17
+#####
+---
+type: specs.openrewrite.org/v1beta/recipe
+name: org.apache.camel.upgrade.camel417.CamelMigrationRecipe
+displayName: Migrates `camel 4.16` application to `camel 4.17`
+description: Migrates `camel 4.16` application to `camel 4.17`.
+recipeList:
+  - org.openrewrite.java.ChangeMethodName:
+      methodPattern: "org.apache.camel.model.ProcessorDefinition#transform(..)"
+      newMethodName: "transformDataType"
+      matchOverrides: true
+  - org.apache.camel.upgrade.camel417.YamlTransform417Recipe
diff --git 
a/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/latest.yaml 
b/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/latest.yaml
index ef0203b..1f07147 100644
--- a/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/latest.yaml
+++ b/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/latest.yaml
@@ -20,6 +20,7 @@ name: org.apache.camel.upgrade.CamelMigrationRecipe
 displayName: Migrate to @camel-latest-version@
 description: Migrates Apache Camel application to @camel-latest-version@.
 recipeList:
+  - org.apache.camel.upgrade.camel417.CamelMigrationRecipe
   - org.apache.camel.upgrade.camel416.CamelMigrationRecipe
   - org.apache.camel.upgrade.camel415.CamelMigrationRecipe
   - org.apache.camel.upgrade.camel414.CamelMigrationRecipe
diff --git 
a/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelTestUtil.java
 
b/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelTestUtil.java
index 10e4094..4fa68c5 100644
--- 
a/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelTestUtil.java
+++ 
b/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelTestUtil.java
@@ -51,7 +51,8 @@ public class CamelTestUtil {
         v4_13(4, 13, 0),
         v4_14(4, 14, 0),
         v4_15(4, 15, 0),
-        v4_16(4, 16, 0);
+        v4_16(4, 16, 0),
+        v4_17(4, 17, 0);
 
         private int major;
         private int minor;
diff --git 
a/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelUpdate417Test.java
 
b/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelUpdate417Test.java
new file mode 100644
index 0000000..6633d62
--- /dev/null
+++ 
b/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelUpdate417Test.java
@@ -0,0 +1,146 @@
+/*
+ * 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.upgrade;
+
+import org.junit.jupiter.api.Test;
+import org.openrewrite.DocumentExample;
+import org.openrewrite.test.RecipeSpec;
+import org.openrewrite.test.RewriteTest;
+import org.openrewrite.test.TypeValidation;
+
+import static org.openrewrite.java.Assertions.java;
+import static org.openrewrite.yaml.Assertions.yaml;
+
+//class has to stay public, because test is extended in project quarkus-updates
+public class CamelUpdate417Test implements RewriteTest {
+
+    @Override
+    public void defaults(RecipeSpec spec) {
+        CamelTestUtil.recipe(spec, CamelTestUtil.CamelVersion.v4_17)
+                
.parser(CamelTestUtil.parserFromClasspath(CamelTestUtil.CamelVersion.v4_16,
+                        "camel-core-model", "camel-api"))
+                .typeValidationOptions(TypeValidation.none());
+    }
+
+    /**
+     * <a 
href="https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_core";>Camel-core
 transform EIP Yaml DSL</a>
+     */
+    @DocumentExample
+    @Test
+    void transformEipYaml() {
+        //language=yaml
+        rewriteRun(yaml(
+                """
+                        - route:
+                            id: timer-transform-route
+                            from:
+                              uri: "timer:exampleTimer"
+                              parameters:
+                                period: 100   # runs every 5 seconds
+                              steps:
+                                - setBody:
+                                    simple: "World"
+                                - log:
+                                    message: "Original body: ${body}"
+                                - transform:
+                                    toType: application-octet-stream
+                                - log:
+                                    message: "Transformed body: ${body}"
+                  """,
+                """
+                        - route:
+                            id: timer-transform-route
+                            from:
+                              uri: "timer:exampleTimer"
+                              parameters:
+                                period: 100   # runs every 5 seconds
+                              steps:
+                                - setBody:
+                                    simple: "World"
+                                - log:
+                                    message: "Original body: ${body}"
+                                - transformDataType:
+                                    toType: application-octet-stream
+                                - log:
+                                    message: "Transformed body: ${body}"
+                  """));
+    }
+
+    /**
+     * <a 
href="https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_core";>Camel-core
 transform EIP Yaml DSL</a>
+     */
+    @Test
+    void transformEipYamlNotDataType() {
+        //language=yaml
+        rewriteRun(yaml(
+                """
+                        - route:
+                            id: timer-transform-route
+                            from:
+                              uri: "timer:exampleTimer"
+                              parameters:
+                                period: 100   # runs every 5 seconds
+                              steps:
+                                - setBody:
+                                    simple: "World"
+                                - log:
+                                    message: "Original body: ${body}"
+                                - transform:
+                                    constant: Constant
+                                - log:
+                                    message: "Transformed body: ${body}"
+                  """));
+    }
+
+    /**
+     * <a 
href="https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_core";>Camel-core
 transform EIP</a>
+     */
+    @Test
+    void transformEip() {
+        //language=java
+        rewriteRun(java(
+                """
+                import org.apache.camel.builder.RouteBuilder;
+                import org.apache.camel.spi.DataType;
+    
+                public class TransformRoute extends RouteBuilder {
+    
+                    @Override
+                    public void configure() {
+                        from("direct:start")
+                            .transform(new DataType("myDataType"))
+                            .to("mock:result");
+                    }
+                }
+                """,
+                """
+                import org.apache.camel.builder.RouteBuilder;
+                import org.apache.camel.spi.DataType;
+    
+                public class TransformRoute extends RouteBuilder {
+    
+                    @Override
+                    public void configure() {
+                        from("direct:start")
+                            .transformDataType(new DataType("myDataType"))
+                            .to("mock:result");
+                    }
+                }
+                """));
+    }
+
+}
diff --git a/release_notes.adoc b/release_notes.adoc
index e5b73a7..803d8a7 100644
--- a/release_notes.adoc
+++ b/release_notes.adoc
@@ -1,5 +1,33 @@
 = Camel Upgrade Recipes - Release notes
 
+== 4.17.0
+
+=== Summary
+
+This is a release supporting Camel, Camel Quarkus and Camel Spring Boot 4.17.0 
with the required upgrade recipes (described by the 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html[migration 
guide]).
+
+=== Migration coverage
+
+The following table lists migration topics and indicates the level of coverage 
(full, partial, or not covered), along with additional comments.
+
+[%autowidth,stripes=hover]
+|===
+| Migration | Coverage | Comment
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_core[camel-core]
 | ✅ Full    | Automatically migrated.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_custom_camel_components[Custom
 Camel components] | ❌ None | Not supported by the migration tool.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_cluster[camel-cluster]
 | ❌ None | Not supported by the migration tool.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_jbang[camel-jbang]
 | ❌ None | Not supported by the migration tool.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_debezium[camel-debezium]
 | ❌ None | Not supported by the migration tool.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_ftp[camel-ftp]
 | ❌ None | Not supported by the migration tool.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_infinispan[camel-infinispan]
 | ❌ None | Not supported by the migration tool.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_tika[camel-tika]
 | ❌ None | Not supported by the migration tool.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_undertow[camel-undertow]
 | ❌ None | Not supported by the migration tool.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_component_deprecation[component
 deprecation] | ❌ None | Not supported by the migration tool.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_testcontainers_updated_to_2_0_2[testcontainers
 updated to 2.0,2] | ❌ None | Not supported by the migration tool.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_camel_salesforce[camel-salesforce]
 | ❌ None | Not supported by the migration tool.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_17.html#_maven_archetypes[maven
 archetype] | ❌ None | Not supported by the migration tool.
+|===
+
 == 4.16.0
 
 === Summary
@@ -39,7 +67,7 @@ The following table lists migration topics and indicates the 
level of coverage (
 | Migration | Coverage | Comment
 
 | 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_15.html#_data_formats[Data
 Formats] | ⚠️ Partial | DataFormat changes are migrated automatically. Csv's 
change of parameters from List<String> to String are not supported by the 
migration tool
-| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_15.html#_camel_netty_camel_netty_http[camel-netty
 / camel-netty-htt] | ⚠️ Partial | Basic cases in Xml DSL and Yaml DSL are 
covered. Java is not supported by the migration tool, because the java code 
requires manuals migration due to parameter type change.
+| 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_15.html#_camel_netty_camel_netty_http[camel-netty
 / camel-netty-http] | ⚠️ Partial | Basic cases in Xml DSL and Yaml DSL are 
covered. Java is not supported by the migration tool, because the java code 
requires manuals migration due to parameter type change.
 | 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_15.html#_camel_ai_nested_headers_classes[Camel
 AI Nested Headers classes] | ✅ Full |
 | 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_15.html#_camel_mdc[camel-mdc]
 | ❌ None | Not supported by the migration tool.
 |===

Reply via email to