-
Notifications
You must be signed in to change notification settings - Fork 364
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
ChangePluginGroupIdAndArtifactId does not allow for updating maven plugin versions #4902
Comments
Code Change AnalysisLooking at the code changes required, there is a bit of a snag. Specifically, the last constructor arg / parameter to Suggested ImplementationIt may be cleaner to:
Please provide feedback if you'd like me to cut a PR with this design. |
Thanks for calling out those discrepancies and their impact when making changes! I've done a quick search and updated a downstream project: I'd think/hope that's the only reference to that field, and using the constructor is quite unexpected. With that I think we're ok to make the changes here in place as opposed to the more cumbersome alternatives. Would welcome such a PR, thanks! 🙏🏻 |
Thanks for the feedback, @timtebeek . |
What problem are you trying to solve?
ChangePluginGroupIdAndArtifactId
does not let you update the plugin'sversion
.ChangePluginGroupIdAndArtifactId allows one to update a maven plugin to reflect new:
A similar very similar recipe, ChangeDependencyGroupIdAndArtifactId, allows one to update a maven dependency to reflect new:
Describe the solution you'd like
I think
ChangePluginGroupIdAndArtifactId
should be brought into closer alignment withChangeDependencyGroupIdAndArtifactId
to also support changing a pluginversion
.Have you considered any alternatives or workarounds?
I've checked the other recipes in the rewrite-maven module and found no suitable alternative solution.
Additional context
An example of the desired before/after change from this feature might look like this:
BEFORE
AFTER
Are you interested in contributing this feature to OpenRewrite?
Yes, I can offer to open a pull request to add the functionality. I would like to know from the group if there is consensus we should have this feature. I may also need design feedback to minimize turn-around-time on the PR.
The text was updated successfully, but these errors were encountered: