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 f0ec0d3 Add Camel Spring Boot 4.18 LTS migration recipe
f0ec0d3 is described below
commit f0ec0d3e17ea1620eece7a1761193b0235e8a841
Author: Croway <[email protected]>
AuthorDate: Tue Jul 14 12:46:11 2026 +0200
Add Camel Spring Boot 4.18 LTS migration recipe
Move Spring Boot version properties to camel-spring-boot-upgrade-recipes
module
and add CamelSpringBoot418LTSMigrationRecipe for users wanting to stay on
the
4.18 LTS line with Spring Boot 3.x.
---
README.adoc | 14 +++++
camel-spring-boot-upgrade-recipes/pom.xml | 12 ++++
.../main/resources/META-INF/rewrite/4.18LTS.yaml | 73 ++++++++++++++++++++++
pom.xml | 6 --
4 files changed, 99 insertions(+), 6 deletions(-)
diff --git a/README.adoc b/README.adoc
index e07661a..43b79ee 100644
--- a/README.adoc
+++ b/README.adoc
@@ -32,6 +32,20 @@ $ mvn -U org.openrewrite.maven:rewrite-maven-plugin:run
-Drewrite.recipeArtifact
```
+To upgrade a Camel Spring Boot application to the latest version:
+
+```
+$ mvn -U org.openrewrite.maven:rewrite-maven-plugin:run
-Drewrite.recipeArtifactCoordinates=org.apache.camel.upgrade:camel-spring-boot-upgrade-recipes:LATEST
-Drewrite.activeRecipes=org.apache.camel.upgrade.CamelSpringBootMigrationRecipe
+```
+
+
+To upgrade a Camel Spring Boot application to the 4.18 LTS (staying on Spring
Boot 3.x):
+
+```
+$ mvn -U org.openrewrite.maven:rewrite-maven-plugin:run
-Drewrite.recipeArtifactCoordinates=org.apache.camel.upgrade:camel-spring-boot-upgrade-recipes:LATEST
-Drewrite.activeRecipes=org.apache.camel.upgrade.CamelSpringBoot418LTSMigrationRecipe
+```
+
+
To apply specific recipes you can use the following script:
```
diff --git a/camel-spring-boot-upgrade-recipes/pom.xml
b/camel-spring-boot-upgrade-recipes/pom.xml
index af3dddf..5412cc1 100644
--- a/camel-spring-boot-upgrade-recipes/pom.xml
+++ b/camel-spring-boot-upgrade-recipes/pom.xml
@@ -31,6 +31,18 @@
<name>Camel Spring Boot Upgrades Recipes</name>
<description>Migration recipes (using openrewrite) for Camel Spring Boot
to make Maven migrations easier</description>
+ <properties>
+ <!-- versions for camel-spring-boot latest, has to be kept aligned to
the latest camel-spring-boot release -->
+ <spring-boot-version>4.1.0</spring-boot-version>
+ <springframework-version>7.0.8</springframework-version>
+ <spring-security-version>7.1.0</spring-security-version>
+ <spring-batch-version>6.0.4</spring-batch-version>
+
+ <!-- Spring versions for CSB 4.18 LTS, has to be kept aligned to
camel-spring-boot 4.18.x -->
+ <spring-boot-4.18-lts-version>3.5.16</spring-boot-4.18-lts-version>
+
<springframework-4.18-lts-version>6.2.19</springframework-4.18-lts-version>
+ </properties>
+
<dependencyManagement>
<dependencies>
<dependency>
diff --git
a/camel-spring-boot-upgrade-recipes/src/main/resources/META-INF/rewrite/4.18LTS.yaml
b/camel-spring-boot-upgrade-recipes/src/main/resources/META-INF/rewrite/4.18LTS.yaml
new file mode 100644
index 0000000..1c4684b
--- /dev/null
+++
b/camel-spring-boot-upgrade-recipes/src/main/resources/META-INF/rewrite/4.18LTS.yaml
@@ -0,0 +1,73 @@
+#
+# 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.CamelSpringBoot418LTSMigrationRecipe
+displayName: Migrate to Camel Spring Boot 4.18 LTS
+description: >-
+ Migrates Camel Spring Boot applications to 4.18 LTS.
+ This recipe aggregates all migration steps from 4.9 to 4.18.3
+ while keeping Spring Boot on the 3.x line.
+recipeList:
+ - org.apache.camel.upgrade.camel418_3.CamelMigrationRecipe
+ - org.apache.camel.upgrade.camel418_1.CamelMigrationRecipe
+ - org.apache.camel.upgrade.camel418.CamelSpringBootMigrationRecipe
+ - org.apache.camel.upgrade.UpdateCamelSpringBootPropertiesAndYamlKeys
+ - org.openrewrite.maven.UpgradeDependencyVersion:
+ groupId: '*camel*'
+ artifactId: 'camel-spring-boot-bom'
+ newVersion: @camel4.18-lts-version@
+ - org.openrewrite.maven.UpgradeDependencyVersion:
+ groupId: 'org.apache.camel.springboot'
+ artifactId: 'spring-boot'
+ newVersion: @camel4.18-lts-version@
+ - org.openrewrite.maven.UpgradeDependencyVersion:
+ groupId: 'org.apache.camel.springboot'
+ artifactId: 'camel-spring-boot-dependencies'
+ newVersion: @camel4.18-lts-version@
+ - org.openrewrite.maven.UpgradeDependencyVersion:
+ groupId: 'org.apache.camel'
+ artifactId: '*'
+ newVersion: @camel4.18-lts-version@
+ - org.openrewrite.maven.UpgradePluginVersion:
+ groupId: 'org.apache.camel'
+ artifactId: '*'
+ newVersion: @camel4.18-lts-version@
+ - org.openrewrite.maven.UpgradeParentVersion:
+ groupId: 'org.apache.camel'
+ artifactId: '*'
+ newVersion: @camel4.18-lts-version@
+ - org.openrewrite.maven.ChangePropertyValue:
+ key: camel.version
+ newValue: @camel4.18-lts-version@
+ - org.openrewrite.maven.UpgradeDependencyVersion:
+ groupId: org.springframework.boot
+ artifactId: "*"
+ newVersion: @spring-boot-4.18-lts-version@
+ overrideManagedVersion: false
+ - org.openrewrite.maven.UpgradePluginVersion:
+ groupId: org.springframework.boot
+ artifactId: spring-boot-maven-plugin
+ newVersion: @spring-boot-4.18-lts-version@
+ - org.openrewrite.maven.UpgradeDependencyVersion:
+ groupId: org.springframework
+ artifactId: "*"
+ newVersion: @springframework-4.18-lts-version@
+ - org.openrewrite.maven.UpgradeParentVersion:
+ groupId: org.springframework.boot
+ artifactId: spring-boot-starter-parent
+ newVersion: @spring-boot-4.18-lts-version@
diff --git a/pom.xml b/pom.xml
index 9444d5a..451f942 100644
--- a/pom.xml
+++ b/pom.xml
@@ -118,12 +118,6 @@
<tahu-version>1.0.18</tahu-version>
<jspecify-version>1.0.0</jspecify-version>
- <!-- versions for camel-spring-boot -->
- <spring-boot-version>4.1.0</spring-boot-version>
- <springframework-version>7.0.8</springframework-version>
- <spring-security-version>7.1.0</spring-security-version>
- <spring-batch-version>6.0.4</spring-batch-version>
-
<!-- Should be aligned to quarkus-updates -
https://github.com/quarkusio/quarkus-updates/blob/main/pom.xml#L64 -->
<rewrite-recipe-bom.version>3.31.0</rewrite-recipe-bom.version>