When using the org.openrewrite.properties.AddProperty recipe, I noticed that the file I was trying to target (hibernate.properties) was not being updated. In trying to get it to work, I've seen the recipe work on other properties files, so I don't believe it's the recipe.
I'm wondering it the culprit is here when it is parsing the resources of a project:
The file example/src/main/resources/hibernate.properties should be updated to include a new property, hibernate.type.preferred_uuid_jdbc_type=CHAR
What did you see instead?
The file is not updated, although if I move it to the top-level directory, it does get updated. If I remove the precondition, the gradle/gradle-wrapper.properties file gets updated - so I don't believe it's the recipe.
When using the
org.openrewrite.properties.AddProperty
recipe, I noticed that the file I was trying to target (hibernate.properties
) was not being updated. In trying to get it to work, I've seen the recipe work on otherproperties
files, so I don't believe it's the recipe.I'm wondering it the culprit is here when it is parsing the resources of a project:
In particular, passing a new
InMemoryExecutionContext
into the omniparser rather than the existingctx
.What version of OpenRewrite are you using?
I am using the OpenRewrite Gradle plugin v6.6.2 (I also tried 6.6.3 just in case)
How are you running OpenRewrite?
I am using the Gradle plugin and it is a multi-module project.
What is the smallest, simplest way to reproduce the problem?
Reproduced here: OpenRewrite-bug.zip
What did you expect to see?
The file
example/src/main/resources/hibernate.properties
should be updated to include a new property,hibernate.type.preferred_uuid_jdbc_type=CHAR
What did you see instead?
The file is not updated, although if I move it to the top-level directory, it does get updated. If I remove the precondition, the
gradle/gradle-wrapper.properties
file gets updated - so I don't believe it's the recipe.Are you interested in contributing a fix to OpenRewrite?
Possibly!