Skip to content

Changing a tag into a variable-containing-one replaces it with the value at run time #4840

Open
@svaningelgem

Description

What version of OpenRewrite are you using?

I am using

  • OpenRewrite master branch

How are you running OpenRewrite?

mvn rewrite:run

What is the smallest, simplest way to reproduce the problem?

  - org.openrewrite.xml.AddOrUpdateChildTag:
      parentXPath: //dependency[groupId="com.example.ws4"]
      newChildTag: "<groupId>${some.variable}</groupId>"

What did you expect to see?

That the groupId would be replaced by ${some.variable}.

What did you see instead?

That the groupId was replaced by com.example.ws4.

[WARNING] Changes have been made to war\pom.xml by:
[WARNING]                 org.openrewrite.xml.AddOrUpdateChildTag: {parentXPath=//dependency[groupId="com.example.ws4"], newChildTag=<groupId>com.example.ws4</groupId>}

Activity

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

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions