Skip to content

YAML property substitution not disabled by resolvePropertiesInYaml=false #1100

@philippe-granet

Description

@philippe-granet

What version of OpenRewrite are you using?

I am using

  • OpenRewrite v8.72.1
  • Maven plugin v6.28.0

How are you running OpenRewrite?

I am using the Maven plugin, and my project is a single module project.

<plugin>
  <groupId>org.openrewrite.maven</groupId>
  <artifactId>rewrite-maven-plugin</artifactId>
  <version>6.28.0</version>
  <configuration>
    ... 
  </configuration>
</plugin>

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

Running mvn with -Drewrite.resolvePropertiesInYaml=false parameter, with this recipe:

  - org.openrewrite.maven.AddProperty:
      key: java_home_without_default_value
      value: ${java_home.jdk21}
  - org.openrewrite.maven.AddProperty:
      key: java_home_with_default_value
      value: ${java_home.jdk21:/bin/java}

What did you expect to see?

+    <properties>
+        <java_home_with_default_value>${java_home.jdk21:/bin/java}</java_home_with_default_value>
+        <java_home_without_default_value>${java_home.jdk21}</java_home_without_default_value>
+    </properties>

What did you see instead?

Property with default value is replaced, even if I use -Drewrite.resolvePropertiesInYaml=false parameter

+    <properties>
+        <java_home_with_default_value>/bin/java</java_home_with_default_value>
+        <java_home_without_default_value>${java_home.jdk21}</java_home_without_default_value>
+    </properties>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions