Upgrade existing jakarta.annotation-api to 2.0.x for EE9#729
Conversation
|
I noticed this fails this test I'm trying to figure out if this change makes sense, or whether the tests need to be updated. |
|
Thanks for the call out; fine to change that dependency version; I think it might just have been missed. As for your other question: not sure; I'd expect folks to run Java8toJava11, and through that AddCommonAnnotationsDependencies before they run JavaxMigrationToJakarta, but it's hard to say at times. You're right to point out that the scanning Fine to merge this PR already from my side, but wasn't sure if there's more you'd like to work through before a merge. |
|
I think this might be good to go. It's also now in line with what pretty much all of the other EE9 recipes do, where they all run |
What's changed?
In the Jakarta EE 9 recipe list, add an extra recipe step to ensure
jakarta.annotation-apiis upgraded to the correct version for EE9 in case an older version was used.What's your motivation?
QUESTION: Is it even a valid case to run
AddCommonAnnotationsDependenciesfirst, before runningJavaxMigrationToJakarta(Jakarta EE 9 migration)? Should the EE 9 migration supercede the former recipe?If
AddCommonAnnotationsDependenciesis run beforehand, it updates the originaljavax.annotation-apito usejakarta.annotation-api:1.3.x. The EE9 recipe then fails to upgrade to2.0.xbecause the originaljavax.annotation-apino longer exists.When this recipe runs afterwards, it should update the version if the jakarta version of the artifact already existed.
Checklist