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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]