126 questions
Score of 0
0 answers
52 views
Missing libraries when executing JUnit4to5Migration with OpenRewrite
When running OpenRewrite on my multi module project (Maven 3.99, Java 21) with this configuration in the root pom:
<plugin>
<groupId>org.openrewrite.maven</groupId>
...
Score of 0
1 answer
95 views
gradlew quarkusUpdate hangs indefinitely at 0% EXECUTING when updating from 3.8.6 to any version
`I'm trying to update my Quarkus project from version 3.8.6 to 3.15.6.2 using the built-in quarkusUpdate command for Gradle.
When I run the command:
PowerShell
.\gradlew quarkusUpdate
The process ...
Score of 0
2 answers
243 views
Why is OpenRewrite not adding an import statement for MoreObjects?
I am trying to use OpenRewrite (BOM v 3.14.1) to change all usages of Guava's deprecated Objects#toStringHelper to MoreObjects#toStringHelper.
This is my attempt at the recipe.
private static ...
Score of 0
0 answers
34 views
How To Specify Publish Version For Open Rewrite Module
I am modifying an open rewrite module (rewrite-spring) for our project specific needs. Now I am trying to publish to local maven repository. The version I am based on is 6.13.0 and the version I get ...
Score of 0
1 answer
148 views
ClassNotFoundException: org.springframework.web.servlet.resource.LiteWebJarsResourceResolver when running Spring Boot 3.3 best practices recipe
I am running org.openrewrite.java.spring.boot3.SpringBoot33BestPractices recipe of OpenRewrite on a Spring Boot v3.3.8 project that uses SpringDoc Api v2.6.0. OpenRewrite is upgrading correctly the ...
Score of 1
1 answer
349 views
Execution failed for task ':rewriteRun'. Cannot invoke "java.util.Set.stream()" because the return value of "java.util.Map.remove(Object)" is null
I am on IntelliJ IDEA 2025.1.2 with plugin OpenRewrite bundled 251.26094.121Java 18, and Gradle 7.6.5. I am trying to update Spring Boot from version 3.3.12 to version 3.4 but OpenRewrite returns the ...
Score of 2
0 answers
73 views
How to add @author to the Javadoc with OpenRewrite?
I am using OpenRewrite 8.48 and want to add @author to the Javadoc of methods that don't yet have that. Only thing I was able to achieve so far is to add a text comment like so:
TextComment ...
Score of 1
0 answers
89 views
How to create Parameterized OpenRewrite Style
I would like to create a shared OpenRewrite Style that, among other things, defines the import order such that there is a variable in the layout. For example:
type: specs.openrewrite.org/v1beta/style
...
Score of 0
0 answers
87 views
OpenRewrite Recipe test for Gradle.ChangeDependency not making any changes
I define a recipe
- org.openrewrite.gradle.ChangeDependency:
oldGroupId: org.x
oldArtifactId: x-test
newGroupId: org.y
newArtifactId: y-test
newVersion: 1.0.0
and my ...
Score of 1
1 answer
696 views
How can I customize the OpenRewrite declarative YAML recipe name, location and split it?
I'm trying out OpenRewrite's declarative YAML format and I got it to work if I put all my recipes in a single file (rewrite.yml) in the root of the project.
So at the moment my demo's tree looks like ...
Score of 0
1 answer
144 views
How to properly use JavaTemplate to chain further method invocations?
I am attempting to use org.openrewrite.java.JavaTemplate to replace a permitAll method invocation with a chain of further method invocations. Here’s my implementation of the visitMethodInvocation ...
Score of 0
0 answers
87 views
Is there a recipe for formatting YAML
I'm using a couple of recipes:
org.openrewrite.java.spring.ChangeSpringPropertyValue
org.openrewrite.java.spring.ChangeSpringPropertyKey
org.openrewrite.java.spring.AddSpringProperty
And it works, ...
Score of 0
1 answer
102 views
Recipe CommentOutSpringPropertyKey throws java.lang.NoSuchMethodError
I'm trying to use a recipe:
- org.openrewrite.java.spring.CommentOutSpringPropertyKey:
propertyKey: spring.datasource.hikari.auto-commit
comment: "Use Oracle JDBC driver connection ...
Score of 0
2 answers
182 views
Recepie example for changing application.properties (or yaml) for a Spring Boot 3 application
a newbie to write recepies. What I'm going to try to accomplish is to read an application.properties (or yamal) file and convert values and entries to different ones. I've been searching around but ...
Score of 0
1 answer
87 views
Using OpenRewrite, how do I make pomXml ignore version?
The problem I am having is we have a test similar to this...
class UpgradeNonSpringDependenciesTest : RewriteTest {
override fun defaultExecutionContext(sourceSpecs: Array<out SourceSpec<*&...