You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "Croway (via GitHub)" <gi...@apache.org> on 2024/12/12 15:13:33 UTC

[PR] Create a core module and a spring boot module [camel-upgrade-recipes]

Croway opened a new pull request, #18:
URL: https://github.com/apache/camel-upgrade-recipes/pull/18

   - Create a parent (pom) module.
   - Create `camel-upgrade-recipes` module, this is exactly like before, nothing should change from a Maven usage point of view.
   - Create `camel-spring-boot-upgrade-recipes`, this module has a dependency on `camel-upgrade-recipes` and `spring-rewrite`. 
   - Create an upgrade recipe for Spring Boot, 49.yaml follow the naming convention and ideas from `camel-upgrade-recipes`. latest.yaml can be used to update to the same version as the project.version, for example, when using the latest.yaml recipe (`org.apache.camel.upgrade.CamelSpringBootMigrationRecipe`) the update will be done to the `camel-spring-boot-upgrade-recipes:XXX` version, this way, the users will have to change only the version in the plugin dependency section.
   
   Usage:
   
   Add the following profile to the pom.xml
   ```
   <profile>
         <id>upgrade</id>
         <activation>
             <property>
                 <name>upgrade</name>
             </property>
         </activation>
         <build>
           <plugins>
             <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.CamelSpringBootMigrationRecipe</recipe>
                   </activeRecipes>
               </configuration>
               <dependencies>
                   <dependency>
                       <groupId>org.apache.camel.upgrade</groupId>
                       <artifactId>camel-spring-boot-upgrade-recipes</artifactId>
                       <version>4.9.0-SNAPSHOT</version>
                   </dependency>
               </dependencies>
             </plugin>
           </plugins>
         </build>
       </profile>
   ```
   
   execute
   `mvn rewrite:run package -Pupgrade`
   
   I just tried the following, create a Camel Spring Boot application using the archetype version 3.20.0, run the upgrade to 4.9.0-SNAPSHOT, this is the git diff:
   
   ```
   diff --git a/pom.xml b/pom.xml
   index 2674c02..2328489 100644
   --- a/pom.xml
   +++ b/pom.xml
   @@ -14,8 +14,8 @@
      <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
   -    <spring.boot-version>2.7.6</spring.boot-version>
   -    <surefire.plugin.version>3.0.0-M4</surefire.plugin.version>
   +    <spring.boot-version>3.3.6</spring.boot-version>
   +    <surefire.plugin.version>3.1.2</surefire.plugin.version>
      </properties>
    
      <dependencyManagement>
   @@ -32,7 +32,7 @@
          <dependency>
            <groupId>org.apache.camel.springboot</groupId>
            <artifactId>camel-spring-boot-bom</artifactId>
   -        <version>3.20.0</version>
   +        <version>4.9.0-SNAPSHOT</version>
            <type>pom</type>
            <scope>import</scope>
          </dependency>
   @@ -89,9 +89,9 @@
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
   -        <version>3.10.1</version>
   +        <version>3.13.0</version>
            <configuration>
   -          <release>11</release>
   +          <release>17</release>
            </configuration>
          </plugin>
          <plugin>
   ```
   and the archetype tests are successful


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Create a core module and a spring boot module [camel-upgrade-recipes]

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek commented on PR #18:
URL: https://github.com/apache/camel-upgrade-recipes/pull/18#issuecomment-2568959300

   > I applied the migration to camel-spring-boot-examples-4.0.0, this is the diff https://pastebin.com/k7xQtYuL , I just updated the parent version manually, one example does not compile after the migration, I think we can improve the camel upgrade recipe, but all the others compile (though I didn't test them)
   
   Thant's a good new.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Create a core module and a spring boot module [camel-upgrade-recipes]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #18:
URL: https://github.com/apache/camel-upgrade-recipes/pull/18#issuecomment-2539347433

   The files may need ASF license headers and a little bit of polish - but that is another PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Create a core module and a spring boot module [camel-upgrade-recipes]

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek merged PR #18:
URL: https://github.com/apache/camel-upgrade-recipes/pull/18


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Create a core module and a spring boot module [camel-upgrade-recipes]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on PR #18:
URL: https://github.com/apache/camel-upgrade-recipes/pull/18#issuecomment-2539277559

   @JiriOndrusek please have a look. This is perfect in my opinion. We'll need to work on the website a bit. We could even release 4.9.0 next week


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Create a core module and a spring boot module [camel-upgrade-recipes]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #18:
URL: https://github.com/apache/camel-upgrade-recipes/pull/18#issuecomment-2550830067

   Thanks @Croway and @JiriOndrusek - lets get this ready before we do the 4.10 release


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Create a core module and a spring boot module [camel-upgrade-recipes]

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek commented on PR #18:
URL: https://github.com/apache/camel-upgrade-recipes/pull/18#issuecomment-2569102688

   @Croway please switch the PR from draft and I will merge it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Create a core module and a spring boot module [camel-upgrade-recipes]

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek commented on PR #18:
URL: https://github.com/apache/camel-upgrade-recipes/pull/18#issuecomment-2568957328

   I verified that the change does not case any troubles when the `core` is adapted by Quarkus.
   Thanks @Croway !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Create a core module and a spring boot module [camel-upgrade-recipes]

Posted by "Croway (via GitHub)" <gi...@apache.org>.
Croway commented on PR #18:
URL: https://github.com/apache/camel-upgrade-recipes/pull/18#issuecomment-2539383376

   I applied the migration to camel-spring-boot-examples-4.0.0, this is the diff https://pastebin.com/k7xQtYuL , I just updated the parent version manually, one example does not compile after the migration, I think we can improve the camel upgrade recipe, but all the others compile (though I didn't test them)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org