Skip to content

Library upgrades: Must I include both versions of the library in the recipe jar? #4536

Answered by timtebeek
crankydillo asked this question in Q&A
Discussion options

You must be logged in to vote

hi! In short the .jars need to be added to src/.../resources/META-INF/classpath only when referenced from a JavaParser call to classpathFromResources, either from a unit test, or in a JavaTemplate. classpathFromResources specifically (as opposed to classpath(...) ) is only necessary when there could potentially be multiple major versions of a framework or library supported at any one time. So for Spring Boot we support v1, v2, and v3 in parallel, while we need all three of those for recipes and tests across all of those major versions. Elsewhere we might leave out the classpath resources if not immediately needed.

In your case you will likely want to .classpath(...) as much as possible, e…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@timtebeek
Comment options

Answer selected by timtebeek
@crankydillo
Comment options

@timtebeek
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants