<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2025 Craig Motlin
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>io.liftwizard</groupId>
        <artifactId>liftwizard-profile-parent</artifactId>
        <version>2.1.47</version>
        <relativePath>../../liftwizard-maven-build/liftwizard-profile-parent</relativePath>
    </parent>

    <artifactId>liftwizard-rewrite</artifactId>

    <name>Liftwizard versions of Openrewrite rules</name>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <maven.compiler.release>21</maven.compiler.release>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.liftwizard</groupId>
                <artifactId>liftwizard-dependencies</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.openrewrite</groupId>
                <artifactId>rewrite-bom</artifactId>
                <version>8.84.9</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-runtime</artifactId>
                <version>4.13.2</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.github.ben-manes.caffeine</groupId>
                    <artifactId>caffeine</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-java</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.github.ben-manes.caffeine</groupId>
                    <artifactId>caffeine</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.eclipse.collections</groupId>
            <artifactId>eclipse-collections-api</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.eclipse.collections</groupId>
            <artifactId>eclipse-collections</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.google.errorprone</groupId>
            <artifactId>error_prone_refaster</artifactId>
            <version>2.49.0</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.inject</groupId>
                    <artifactId>javax.inject</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>failureaccess</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.checkerframework</groupId>
                    <artifactId>checker-qual</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.errorprone</groupId>
                    <artifactId>error_prone_core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.github.ben-manes.caffeine</groupId>
                    <artifactId>caffeine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.google.errorprone</groupId>
            <artifactId>error_prone_core</artifactId>
            <version>2.49.0</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>io.github.eisop</groupId>
                    <artifactId>dataflow-errorprone</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.github.ben-manes.caffeine</groupId>
                    <artifactId>caffeine</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.inject</groupId>
                    <artifactId>javax.inject</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-templating</artifactId>
            <version>1.41.8</version>
        </dependency>

        <dependency>
            <groupId>org.eclipse.collections</groupId>
            <artifactId>eclipse-collections-testutils</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>

        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <version>3.0.0</version>
        </dependency>

        <dependency>
            <groupId>org.jspecify</groupId>
            <artifactId>jspecify</artifactId>
            <version>1.0.0</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.openrewrite.recipe</groupId>
            <artifactId>rewrite-static-analysis</artifactId>
            <version>2.36.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.openrewrite.recipe</groupId>
            <artifactId>rewrite-testing-frameworks</artifactId>
            <version>3.37.0</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.xml.bind</groupId>
                    <artifactId>jaxb-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.github.ben-manes.caffeine</groupId>
                    <artifactId>caffeine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>junit-jupiter-params</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-maven</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.github.ben-manes.caffeine</groupId>
                    <artifactId>caffeine</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.xml.bind</groupId>
                    <artifactId>jaxb-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <arg>-parameters</arg>
                        <arg>-Arewrite.generatedAnnotation=jakarta.annotation.Generated</arg>
                    </compilerArgs>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.openrewrite</groupId>
                            <artifactId>rewrite-templating</artifactId>
                            <version>1.41.8</version>
                        </path>
                        <path>
                            <groupId>jakarta.annotation</groupId>
                            <artifactId>jakarta.annotation-api</artifactId>
                            <version>3.0.0</version>
                        </path>
                        <path>
                            <groupId>org.eclipse.collections</groupId>
                            <artifactId>eclipse-collections-api</artifactId>
                            <version>${eclipse-collections.version}</version>
                        </path>
                        <path>
                            <groupId>org.eclipse.collections</groupId>
                            <artifactId>eclipse-collections</artifactId>
                            <version>${eclipse-collections.version}</version>
                        </path>
                        <path>
                            <groupId>org.eclipse.collections</groupId>
                            <artifactId>eclipse-collections-testutils</artifactId>
                            <version>${eclipse-collections.version}</version>
                        </path>
                        <path>
                            <groupId>org.assertj</groupId>
                            <artifactId>assertj-core</artifactId>
                            <version>${assertj.version}</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <configuration>
                    <ignoredUnusedDeclaredDependencies combine.children="append">
                        <ignoredUnusedDeclaredDependency>com.google.errorprone:error_prone_refaster</ignoredUnusedDeclaredDependency>
                        <ignoredUnusedDeclaredDependency>com.google.errorprone:error_prone_core</ignoredUnusedDeclaredDependency>
                        <ignoredUnusedDeclaredDependency>org.eclipse.collections:eclipse-collections-api</ignoredUnusedDeclaredDependency>
                        <ignoredUnusedDeclaredDependency>org.eclipse.collections:eclipse-collections</ignoredUnusedDeclaredDependency>
                        <ignoredUnusedDeclaredDependency>org.openrewrite.recipe:rewrite-static-analysis</ignoredUnusedDeclaredDependency>
                        <ignoredUnusedDeclaredDependency>org.openrewrite.recipe:rewrite-testing-frameworks</ignoredUnusedDeclaredDependency>
                    </ignoredUnusedDeclaredDependencies>
                </configuration>
                <executions>
                    <!--
                        JavaTemplate parsers need these dependencies on the classpath when recipes
                        run inside the rewrite-maven-plugin realm, where JavaParser.classpath(String)
                        cannot see them (it scans java.class.path, which holds only plexus-classworlds).
                        Bundle the jars under META-INF/rewrite/classpath so JavaParser.classpathFromResources
                        can load them from the recipe jar at runtime.
                    -->
                    <execution>
                        <id>copy-template-classpath-jars</id>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <phase>process-classes</phase>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/META-INF/rewrite/classpath</outputDirectory>
                            <includeArtifactIds>eclipse-collections-api,assertj-core,junit-jupiter-api</includeArtifactIds>
                            <includeScope>test</includeScope>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                    <!--
                        classpathFromResources matches jars by filename prefix and returns the first match.
                        Requesting "eclipse-collections" can therefore match "eclipse-collections-api"
                        before "eclipse-collections", leaving impl-only types like IntInterval and
                        ArrayIterate unresolved. Bundle the impl jar under a non-colliding name so recipes
                        can request it as "eclipse-collections-impl".
                    -->
                    <execution>
                        <id>copy-eclipse-collections-impl-jar</id>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <phase>process-classes</phase>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/META-INF/rewrite/classpath</outputDirectory>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.eclipse.collections</groupId>
                                    <artifactId>eclipse-collections</artifactId>
                                    <version>${eclipse-collections.version}</version>
                                    <destFileName>eclipse-collections-impl.jar</destFileName>
                                </artifactItem>
                            </artifactItems>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                    <!--
                        Log4j 1 recipes need reload4j only as parser metadata. Copy it as a packaged
                        resource instead of declaring an unused test dependency.
                    -->
                    <execution>
                        <id>copy-reload4j-template-classpath-jar</id>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <phase>process-classes</phase>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/META-INF/rewrite/classpath</outputDirectory>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>ch.qos.reload4j</groupId>
                                    <artifactId>reload4j</artifactId>
                                </artifactItem>
                            </artifactItems>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.junit.platform</groupId>
                        <artifactId>junit-platform-engine</artifactId>
                        <version>1.10.3</version>
                    </dependency>
                    <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-params</artifactId>
                        <version>6.0.1</version>
                    </dependency>
                    <dependency>
                        <groupId>org.junit.platform</groupId>
                        <artifactId>junit-platform-launcher</artifactId>
                        <version>6.0.1</version>
                    </dependency>
                    <dependency>
                        <groupId>org.junit.platform</groupId>
                        <artifactId>junit-platform-commons</artifactId>
                        <version>1.10.3</version>
                    </dependency>
                    <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>4.13.2</version>
                    </dependency>
                    <dependency>
                        <groupId>org.openrewrite</groupId>
                        <artifactId>rewrite-java-17</artifactId>
                        <version>8.84.9</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-requireProfileIdsExist</id>
                        <configuration>
                            <rules combine.children="merge">
                                <banDuplicateClasses>
                                    <ignoreClasses combine.children="append">
                                        <ignoreClass>blogspot.software_and_algorithms.stern_library.*</ignoreClass>
                                        <ignoreClass>com.github.benmanes.caffeine.cache.*</ignoreClass>
                                        <ignoreClass>com.github.difflib.*</ignoreClass>
                                        <ignoreClass>com.google.*</ignoreClass>
                                        <ignoreClass>org.jspecify.*</ignoreClass>
                                        <ignoreClass>org.pcollections.*</ignoreClass>
                                    </ignoreClasses>
                                </banDuplicateClasses>
                            </rules>
                        </configuration>
                    </execution>
                    <execution>
                        <id>enforce</id>
                        <configuration>
                            <rules combine.children="merge">
                                <banDuplicateClasses>
                                    <ignoreClasses combine.children="append">
                                        <ignoreClass>blogspot.software_and_algorithms.stern_library.*</ignoreClass>
                                        <ignoreClass>com.github.benmanes.caffeine.cache.*</ignoreClass>
                                        <ignoreClass>com.github.difflib.*</ignoreClass>
                                        <ignoreClass>com.google.*</ignoreClass>
                                        <ignoreClass>org.jspecify.*</ignoreClass>
                                        <ignoreClass>org.pcollections.*</ignoreClass>
                                    </ignoreClasses>
                                </banDuplicateClasses>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>io.liftwizard</groupId>
                <artifactId>liftwizard-generator-rewrite-plugin</artifactId>
                <version>${project.version}</version>
                <dependencies>
                    <!--
                      ~ OpenRewrite's bundled Java parser is generated with ANTLR 4.13.2 and (since rewrite 8.84.0)
                      ~ serializes its ATN in a format only antlr4-runtime 4.10+ can read. The repo-wide pin in
                      ~ liftwizard-dependencies forces antlr4-runtime 4.9.3 (for the Reladomo grammar), and a
                      ~ project dependencyManagement override does not reach plugin realms, so pin 4.13.2 here.
                      -->
                    <dependency>
                        <groupId>org.antlr</groupId>
                        <artifactId>antlr4-runtime</artifactId>
                        <version>4.13.2</version>
                    </dependency>
                    <dependency>
                        <groupId>org.openrewrite</groupId>
                        <artifactId>rewrite-maven</artifactId>
                        <version>8.84.9</version>
                    </dependency>
                    <dependency>
                        <groupId>org.openrewrite.recipe</groupId>
                        <artifactId>rewrite-static-analysis</artifactId>
                        <version>2.36.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.openrewrite.recipe</groupId>
                        <artifactId>rewrite-testing-frameworks</artifactId>
                        <version>3.37.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.openrewrite.recipe</groupId>
                        <artifactId>rewrite-migrate-java</artifactId>
                        <version>3.36.0</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>generate-filtered-recipes</id>
                        <goals>
                            <goal>generate-rewrite-recipes</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                            <filteredRecipeSpecs>
                                <filteredRecipeSpec>
                                    <generatedRecipeName>io.liftwizard.maven.BestPractices</generatedRecipeName>
                                    <displayName>Liftwizard Apache Maven best practices</displayName>
                                    <description>Apply Maven best practices, excluding recipes that conflict with Liftwizard POM conventions (Spotless POM sorting and io.liftwizard-first dependency grouping).</description>
                                    <baseRecipeName>org.openrewrite.maven.BestPractices</baseRecipeName>
                                    <outputFileName>maven-best-practices.yml</outputFileName>
                                    <exclusions>
                                        <exclusion>
                                            <recipeName>org.openrewrite.maven.OrderPomElements</recipeName>
                                            <reason>throws IndexOutOfBoundsException on some POMs; redundant since Spotless already sorts POM elements</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.maven.SortDependencies</recipeName>
                                            <reason>sorts dependencies alphabetically by groupId; conflicts with Liftwizard convention that groups io.liftwizard first, then io.dropwizard, then third-party</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.maven.UpdateScmFromGitOrigin</recipeName>
                                            <reason>rewrites SCM URLs from the local git origin; on fork PRs and contributor clones this replaces the canonical liftwizard/liftwizard URL with the fork's, producing unwanted diffs the CI fix-up job cannot push back</reason>
                                        </exclusion>
                                    </exclusions>
                                </filteredRecipeSpec>
                                <filteredRecipeSpec>
                                    <generatedRecipeName>io.liftwizard.testing.junit.JupiterBestPractices</generatedRecipeName>
                                    <displayName>JUnit Jupiter best practices</displayName>
                                    <description>Apply JUnit Jupiter best practices, excluding SimplifyTestThrows which changes specific exceptions to generic Exception.</description>
                                    <baseRecipeName>org.openrewrite.java.testing.junit.JupiterBestPractices</baseRecipeName>
                                    <outputFileName>testing-frameworks.yml</outputFileName>
                                    <exclusions>
                                        <exclusion>
                                            <recipeName>org.openrewrite.java.testing.cleanup.SimplifyTestThrows</recipeName>
                                            <reason>changes IOException to Exception</reason>
                                        </exclusion>
                                    </exclusions>
                                </filteredRecipeSpec>
                                <filteredRecipeSpec>
                                    <generatedRecipeName>io.liftwizard.staticanalysis.CommonStaticAnalysis</generatedRecipeName>
                                    <displayName>Common static analysis issues</displayName>
                                    <description>Resolve common static analysis issues (also known as SAST issues).</description>
                                    <baseRecipeName>org.openrewrite.staticanalysis.CommonStaticAnalysis</baseRecipeName>
                                    <outputFileName>common-static-analysis.yml</outputFileName>
                                    <exclusions>
                                        <exclusion>
                                            <recipeName>org.openrewrite.java.OrderImports</recipeName>
                                            <reason>formatting handled by auto-formatters (prettier-java, spotless importOrder)</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.ChainStringBuilderAppendCalls</recipeName>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.EqualsAvoidsNull</recipeName>
                                            <reason>Yoda conditions reduce readability</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.FixStringFormatExpressions</recipeName>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.InlineVariable</recipeName>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.RemoveExtraSemicolons</recipeName>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.ReplaceLambdaWithMethodReference</recipeName>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.ReplaceStringConcatenationWithStringValueOf</recipeName>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.SimplifyBooleanReturn</recipeName>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.StringLiteralEquality</recipeName>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.UnnecessaryExplicitTypeArguments</recipeName>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.UnnecessaryParentheses</recipeName>
                                        </exclusion>
                                    </exclusions>
                                </filteredRecipeSpec>
                                <filteredRecipeSpec>
                                    <generatedRecipeName>io.liftwizard.migrate.JavaBestPractices</generatedRecipeName>
                                    <displayName>Java best practices</displayName>
                                    <description>Apply Java best practices, excluding recipes that conflict with Liftwizard conventions (StringFormatted converts String.format to .formatted).</description>
                                    <baseRecipeName>org.openrewrite.java.migrate.JavaBestPractices</baseRecipeName>
                                    <outputFileName>java-best-practices.yml</outputFileName>
                                    <exclusions>
                                        <exclusion>
                                            <recipeName>org.openrewrite.java.migrate.lang.StringFormatted</recipeName>
                                            <reason>converts String.format(...) to .formatted(...)</reason>
                                        </exclusion>
                                    </exclusions>
                                </filteredRecipeSpec>
                                <filteredRecipeSpec>
                                    <generatedRecipeName>io.liftwizard.staticanalysis.CodeCleanup</generatedRecipeName>
                                    <displayName>Code cleanup</displayName>
                                    <description>Automatically cleanup code, e.g. remove unnecessary parentheses, simplify expressions.</description>
                                    <baseRecipeName>org.openrewrite.staticanalysis.CodeCleanup</baseRecipeName>
                                    <outputFileName>static-analysis.yml</outputFileName>
                                    <exclusions>
                                        <exclusion>
                                            <recipeName>org.openrewrite.java.format.EmptyNewlineAtEndOfFile</recipeName>
                                            <reason>formatting handled by auto-formatters</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.java.format.MethodParamPad</recipeName>
                                            <reason>formatting handled by auto-formatters</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.java.format.NoWhitespaceAfter</recipeName>
                                            <reason>formatting handled by auto-formatters</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.java.format.NoWhitespaceBefore</recipeName>
                                            <reason>formatting handled by auto-formatters</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.java.format.PadEmptyForLoopComponents</recipeName>
                                            <reason>formatting handled by auto-formatters</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.java.OrderImports</recipeName>
                                            <reason>formatting handled by auto-formatters (prettier-java, spotless importOrder)</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.EqualsAvoidsNull</recipeName>
                                            <reason>Yoda conditions reduce readability</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.HideUtilityClassConstructor</recipeName>
                                            <reason>prefer Liftwizard fork which adds AssertionError in constructor</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.OperatorWrap</recipeName>
                                            <reason>formatting handled by auto-formatters</reason>
                                        </exclusion>
                                        <exclusion>
                                            <recipeName>org.openrewrite.staticanalysis.UnnecessaryParentheses</recipeName>
                                        </exclusion>
                                    </exclusions>
                                </filteredRecipeSpec>
                            </filteredRecipeSpecs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.openrewrite.maven</groupId>
                <artifactId>rewrite-maven-plugin</artifactId>
                <configuration>
                    <activeRecipes>
                        <!--Excluded recipes that require Lombok:-->
                        <!--org.openrewrite.java.recipes.UseDisplayNameAndDescriptionFields-->
                        <!--org.openrewrite.java.recipes.UseEstimatedEffortPerOccurrenceField-->
                        <!--org.openrewrite.java.recipes.UseTagsField-->

                        <!--Excluded recipes that conflict with prettier-java:-->
                        <!--org.openrewrite.java.OrderImports-->
                        <!--org.openrewrite.staticanalysis.OperatorWrap-->

                        <recipe>org.openrewrite.java.recipes.RemoveImportBeforeAddImport</recipe>
                        <recipe>org.openrewrite.staticanalysis.ReorderAnnotations</recipe>
                        <recipe>org.openrewrite.staticanalysis.UnwrapElseAfterReturn</recipe>
                        <!--<recipe>org.openrewrite.java.recipes.SelectRecipeExamples</recipe>-->
                        <!--<recipe>org.openrewrite.staticanalysis.EqualsAvoidsNull</recipe>-->
                    </activeRecipes>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.openrewrite.recipe</groupId>
                        <artifactId>rewrite-rewrite</artifactId>
                        <version>0.26.0</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
</project>
