Skip to content

Ensure jakarta.annotation dependency is provided scope. Add/change tests#734

Merged
timtebeek merged 2 commits into
openrewrite:mainfrom
evie-lau:commonAnnotations
May 19, 2025
Merged

Ensure jakarta.annotation dependency is provided scope. Add/change tests#734
timtebeek merged 2 commits into
openrewrite:mainfrom
evie-lau:commonAnnotations

Conversation

@evie-lau

@evie-lau evie-lau commented May 19, 2025

Copy link
Copy Markdown
Contributor

What's changed?

Changes recipe that adds jakarta.annotation-api to use provided scope

Anyone you would like to review specifically?

@timtebeek

Have you considered any alternatives or workarounds?

Discussed in #728 - considered fixing AddDependency or ChangeDependency, but may not be the correct solution.

Any additional context

I believe migrating from Java EE to Jakarta EE, it may be recommended to switch maven dependency scopes to provided as the runtime environment likely provides the Jakarta EE APIs.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@evie-lau evie-lau self-assigned this May 19, 2025
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite May 19, 2025
github-actions[bot]

This comment was marked as outdated.

@timtebeek timtebeek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks a lot for the detailed analysis and quick turn around on this!

The comments I placed are nothing to worry about; figured since you had removed the unnecessary <?xml version="1.0" encoding="UTF-8"?> already I'd phase out the unnecessary attributes as well to keep the tests free from boilerplate. Definitely not a reflection on the quality of the work, as that's always 🙌🏻 👏🏻

@github-project-automation github-project-automation Bot moved this from In Progress to Ready to Review in OpenRewrite May 19, 2025
@timtebeek timtebeek merged commit 88a1c90 into openrewrite:main May 19, 2025
1 check passed
@github-project-automation github-project-automation Bot moved this from Ready to Review to Done in OpenRewrite May 19, 2025
github-actions[bot]

This comment was marked as outdated.

@evie-lau evie-lau deleted the commonAnnotations branch May 19, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

AddCommonAnnotationsDependencies duplicates dependency when scope is not compile

2 participants