Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-21527

camel-upgrade-recipes: create a Camel Spring Boot recipe

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.8.0
    • 4.x
    • upgrade-recipes
    • None
    • Unknown

    Description

      A recipe for Camel Spring Boot users can be added with the following features:

      • Upgrade to the Spring Boot version supported by Camel via UpgradeSpringBoot_3_3
      • Upgrade the camel-spring-boot-bom version to the latest released
      • provide all the Camel recipes in one place

      For example, a recipe for Camel Spring Boot 4.8 would be like this:

      ---
      type: specs.openrewrite.org/v1beta/recipe
      name: org.apache.camel.upgrade.camel48.CamelSpringBootMigrationRecipe
      displayName: Migrates `camel Spring Boot` application to `Camel Spring Boot 4.8`
      description: Migrates `camel Spring Boot` application to `Camel Spring Boot 4.8`
      recipeList: 
        - org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3
        - org.apache.camel.upgrade.camel47.CamelMigrationRecipe
        - org.apache.camel.upgrade.camel46.CamelMigrationRecipe
        - org.apache.camel.upgrade.camel45.CamelMigrationRecipe
        - org.apache.camel.upgrade.camel44.CamelMigrationRecipe
        - org.apache.camel.upgrade.camel40.CamelMigrationRecipe
        - org.openrewrite.maven.UpgradeDependencyVersion: 
            groupId: '*camel*'
            artifactId: 'camel-spring-boot-bom'
            newVersion: 4.8.0
      

      once we ship a recipe like this, the following configuration can be used in the pom.xml openrewrite plugin section:

                         <plugin>
                              <groupId>org.openrewrite.maven</groupId>
                              <artifactId>rewrite-maven-plugin</artifactId>
                              <version>5.46.1</version>
                              <configuration>
                                  <exportDatatables>true</exportDatatables>
                                  <activeRecipes>
                                      <recipe>org.apache.camel.upgrade.camel48.CamelSpringBootMigrationRecipe</recipe>
                                  </activeRecipes>
                              </configuration>
                              <dependencies>
                                  <dependency>
                                      <groupId>org.openrewrite.recipe</groupId>
                                      <artifactId>rewrite-spring</artifactId>
                                      <version>5.24.1</version>
                                  </dependency>
                                  <dependency>
                                      <groupId>org.apache.camel.upgrade</groupId>
                                      <artifactId>camel-upgrade-recipes</artifactId>
                                      <version>4.8.0</version>
                                  </dependency>
                              </dependencies>
                          </plugin>
      

      In this case, rewrite-spring:5.24.1 will do the upgrade to the Spring Boot version supported by Camel 4.8.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Federico Mariani Federico Mariani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: