Giter VIP home page Giter VIP logo

Comments (4)

Evodam avatar Evodam commented on May 26, 2024 1

@timtebeek

I think something like your comment would have helped.

"This recipe is meant to replace properties in application.properties files, or other files ending in .properties. For changing maven or gradle properties check $link"

from rewrite.

timtebeek avatar timtebeek commented on May 26, 2024

Hi @Evodam ; it's not immediately clear what type of property you're trying to replace.

org.openrewrite.properties.ChangePropertyValue is meant to replace properties in application.properties files, or other files ending in .properties.

@Override
public boolean accept(Path path) {
return path.toString().endsWith(".properties");
}

org.openrewrite.maven.ChangePropertyValue is meant to replace properties in Maven pom.xml and .pom files.

@Override
public boolean accept(Path path) {
return "pom.xml".equals(path.toString()) || path.toString().endsWith(".pom");
}

From your screenshots it seems you're expecting to replace properties in a pom.xml file; correct? Then you'd want to use the Maven ChangePropertyValue recipe.

If I misunderstood please let me know!

from rewrite.

Evodam avatar Evodam commented on May 26, 2024

🤦
Yes, I want to change properties of a pom file. Thanks for clarification. Maybe add a note or something in the documentation?

from rewrite.

timtebeek avatar timtebeek commented on May 26, 2024

Good to have that cleared up! The hint was in the package names. Open to suggestions what kind of note would have helped here. :)

from rewrite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.