Uploaded image for project: 'Build'
  1. Build
  2. BUILD-1004

Introduce automated code changes with OpenRewrite

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Neutral Neutral
    • None
    • None
    • None
    • None
    • Yes

      OpenRewrite is a standard tool that we should incorporate in our processes as it will help us work with our code base with more ease. Indeed, it can work on Java code with powerful recipes. With the transition to EE9 (among other tasks), this is likely something that will come in really helpful.

      Discarded scope after initial discovery

      • use it in current pipelines working on pom files so that it can make the code more readable & streamlined
        • use it in dep-bot-validate-pr-job where the current sed-based approach is brittle (as the parameter values for org.openrewrite.maven.ChangePropertyValue need to be in the YAML or pom file anyway, there is no benefit in porting)
        • files-site-update-job (no Maven context to run the plugin in)
        • release-job (mostly inplace editing of Maven)
        • update-trials-job (Maven already performs the inplace edit with newer version)
      • investigate if possible to completely replace the permanent-snapshot-maven-plugin with recipes
        • no because OpenRewrite isn't meant to return values like we need in snapshot-property-resolve
        • also the logic in resolve-current-version requires a couple of sub-steps that forward information to one another (1. validate that we have a permanent SNAPSHOT, 2. run a Maven plugin to figure out the latest version, 3. update the current version) - doesn't appear doable with OpenRewrite

      Resources

        Acceptance criteria

              mduerig Michael Duerig
              mmichel Maxime Michel
              Foundation
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: