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

Integrate OpenRewrite #804

Open
jglick opened this issue Jul 10, 2023 · 2 comments
Open

Integrate OpenRewrite #804

jglick opened this issue Jul 10, 2023 · 2 comments

Comments

@jglick
Copy link
Member

jglick commented Jul 10, 2023

https://github.com/openrewrite/rewrite-jenkins looks like a good place to keep rules for updating Jenkins plugin (also see openrewrite/rewrite-jenkins#6). Yet https://docs.openrewrite.org/running-recipes/getting-started#step-2-add-rewrite-maven-plugin-or-rewrite-gradle-plugin-to-your-project and https://docs.openrewrite.org/running-recipes/getting-started#step-3-activate-a-recipe indicate that it is not ready to run out of the box. It would be great if any plugin using a sufficiently new parent were preconfigured to activate all relevant recipes so you could

mvn rewrite:run

without further ado.

(Of course there is a minor “chicken-and-egg” issue that in order to get access to https://github.com/openrewrite/rewrite-jenkins/blob/c15eac724e2c66ff956926f5966177995f035472/src/main/resources/META-INF/rewrite/rewrite.yml#L24C1-L28 you would first need to manually update your parent, but I think that is acceptable.)

Possibly depends on openrewrite/rewrite-jenkins#4 (@sghill).

@sghill
Copy link

sghill commented Jul 10, 2023

Nice, this is exciting! I also opened a few modernization PRs today with OpenRewrite through the Moderne SaaS

Very cool stuff here - bumping jenkins.version and keeping the plugins bom in sync, removing defunct properties like java.level, only adding the plugins bom if a dependency in it is present

@basil
Copy link
Member

basil commented Aug 22, 2023

Workaround: mvn org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.activeRecipes=org.openrewrite.jenkins.ModernizePlugin -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-jenkins:0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants