Skip to content
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

Invoke OpenRewrite Maven Plugin to execute recipes #20

Merged
merged 5 commits into from
Jun 21, 2024
Merged

Invoke OpenRewrite Maven Plugin to execute recipes #20

merged 5 commits into from
Jun 21, 2024

Conversation

sridamul
Copy link
Contributor

Updates...

  1. Now we can pass the recipe names as described in the json file, which resolves the recipe artifact coordinates.
  2. PomParser recipe generates a metadata.json file in the target directory (I did this because the fetched plugin metadata is in new JVM which cannot be accessed. If can please let me know)
  3. We can now run the recipes in multiple plugins (right now I tested by hardcoding two plugins in the test-plugins directory as shown in the video, in future PRs we can populate the directory with plugins)
first.Iteration.mp4

Note: The error show in the video is due to SSLHandshakeException (I haven't added the certificate in my local env) which doesn't affect the execution of recipes

Manual testing done.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Copy link
Collaborator

@jonesbusy jonesbusy left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good overall, some small cosmetic things and extraction to separate class

@sridamul sridamul requested a review from jonesbusy June 21, 2024 11:30
@sridamul
Copy link
Contributor Author

Hey @jonesbusy I have refactored the classes accordingly. Also, right now the directory (test-plugins) is hard coded which will be modified later. Thanks for the review comments.

@jonesbusy jonesbusy self-assigned this Jun 21, 2024
@jonesbusy jonesbusy merged commit 7ab3bf8 into jenkins-infra:main Jun 21, 2024
12 checks passed
@sridamul
Copy link
Contributor Author

@jonesbusy Can you create a general GH discussion to clarify quick questions?

@sridamul sridamul deleted the core-iteration-1 branch June 21, 2024 16:56
@jonesbusy
Copy link
Collaborator

@sridamul Sure I will. Thanks

@jonesbusy jonesbusy added the enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Jul 12, 2024
jonesbusy pushed a commit that referenced this pull request Oct 10, 2024
Fixes #20

Add transformation step for POMs using JDK versions older than 8.

* Add a call to `ensureMinimalBuild` method in `process` method of `PluginModernizer.java` before `plugin.checkoutBranch`.
* Update `ensureMinimalBuild` method in `MavenInvoker.java` to invoke `MINIMAL_BUILD_JAVA_8_RECIPE`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/gounthar/plugin-modernizer-tool/issues/20?shareId=XXXX-XXXX-XXXX-XXXX).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants