openrewrite / openrewrite/rewrite
`UpdateProperty`: change a properties value
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.7k
- Forks
- 570
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 261
Description
What problem are you trying to solve?
I want to update a property <main.groupId>com.example.ws4</main.groupId> from ws4 to ws5. However, we have like 200 repositories (90% maven), and I don't know for certain what the property name is in each. But I know the value.
So I would like to search the properties based on the value, and if encountered: change it to the new value.
What precondition(s) should be checked before applying this recipe?
none that I can think of
Describe the situation before applying the recipe
<main.groupId>com.example.ws4</main.groupId>
Describe the situation after applying the recipe
<main.groupId>com.example.ws5</main.groupId>
Have you considered any alternatives or workarounds?
org.openrewrite.xml.ChangeTagValue can be used, but I feel it's not so clean. Especially because values in properties can still contain properties that needs to be interpreted.
Are you interested in contributing this recipe to OpenRewrite?
Maybe
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing org.openrewrite.xml.ChangeTagValue recipe and the surrounding OpenRewrite XML recipe entry points. Define completion as finding properties by their current value, including values containing properties that still need interpretation, and changing matching values from ws4 to ws5 without requiring the property name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100