Skip to content

3.0.0-M2 Reinstated Support for EhCache 3 #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #163 ...
fabapp2 opened this issue Jul 13, 2022 · 3 comments · Fixed by #311
Closed
Tracked by #163 ...

3.0.0-M2 Reinstated Support for EhCache 3 #208

fabapp2 opened this issue Jul 13, 2022 · 3 comments · Fixed by #311
Labels
3.0.0 Spring Boot 3.0.0
Milestone

Comments

@fabapp2
Copy link
Contributor

fabapp2 commented Jul 13, 2022

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0.0-M2-Release-Notes#reinstated-support-for-ehcache-3

What needs to be done

Finder

check if application is using EhCache 3

Recipe

  • Verifies correct dependency is set and corrects it if not

Support has been added in a separate artifact. To use it your application, make sure to add the dependency with the jakarta classifier.

Also see

The action/recipe must run before the Spring Boot version gets updated to 3.x.
The version for the ehcache dependency must explicitly set to the version managed by Boot 3. Additionally a classifier jakarta must be added.
After upgrading the Boot version to 3 the version of the ehcache dependency can/should be removed again.

Report

### Support for EhCache 3
Support for EhCache 3 is provided in a separate artifact. To use it in your application, make sure to add the dependency with the `jakarta` classifier.
@BoykoAlex
Copy link
Collaborator

@fabapp2 fabapp2 added 3.0.0 Spring Boot 3.0.0 and removed 3.0.0-M2 labels Jul 21, 2022
@fabapp2 fabapp2 changed the title Reinstated Support for EhCache 3 3.0.0-M2 Reinstated Support for EhCache 3 Jul 21, 2022
@fabapp2
Copy link
Contributor Author

fabapp2 commented Jul 22, 2022

@fabapp2 I think this is in rewrite-spring already: https://github.com/openrewrite/rewrite-spring/blob/main/src/main/resources/META-INF/rewrite/spring-boot3-upgrade.yml#L37 Or is there more to do?

@aboyko thanks for pointing this out! That should do it for what I understand.

@sanagaraj-pivotal org.openrewrite.java.spring.boot3.MavenPomUpgrade is not part of boot-2.7-3.0-dependency-version-update.yaml yet.
The Rewrite recipe MavenPomUpgrade does more than just dealing with the ehcache dependency.
IIRC adding a repository was problematic when repos already existed in pom.xml, right?

I'd say it's a good idea to produce warnings in the report (precondition-check) for Spring Boot modules that have an explicit version set instead and thus are not being managed by Boot. This could become a general "best practices" check/recipe later. So instead of just upgrading everything to 3.0.0 as in UpgradeDependencyVersion I'd propose to provide a finder (checking for versions of dependencies that are managed by Spring Boot) and the recipe

- org.openrewrite.maven.ChangeDependencyClassifier:
      groupId: org.ehcache
      artifactId: ehcache
      newClassifier: jakarta

@sanagaraj-pivotal, @ashakirin, @BoykoAlex Thoughts on this?

@fabapp2 fabapp2 linked a pull request Aug 9, 2022 that will close this issue
@fabapp2
Copy link
Contributor Author

fabapp2 commented Aug 9, 2022

closed with #294

@fabapp2 fabapp2 closed this as completed Aug 9, 2022
@fabapp2 fabapp2 added this to the v0.12.0 milestone Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0.0 Spring Boot 3.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants