Skip to content

Run XXXBestPractices recipes as part of maven build #101

@rdiachenko

Description

@rdiachenko

When you run mvn clean verify only active recipes are executed:

mvn clean verify
...
[INFO] --- rewrite:6.16.0:run (checkstyle-autofix) @ checkstyle-openrewrite-recipes ---
[INFO] Using active recipe(s) [CheckstyleAutoFixConfigured]
[INFO] Using active styles(s) []
[INFO] Validating active recipes...
[INFO] Project [checkstyle openrewrite recipes] Resolving Poms...
[INFO] Project [checkstyle openrewrite recipes] Parsing source files
[INFO] Running recipe(s)...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  15.467 s
[INFO] Finished at: 2025-08-26T21:44:17+01:00
[INFO] ------------------------------------------------------------------------

From pom.xml:

<plugin>
                <groupId>org.openrewrite.maven</groupId>
                <artifactId>rewrite-maven-plugin</artifactId>
                <version>${rewrite.maven.plugin}</version>
                <configuration>
                    <activeRecipes>
                        <recipe>CheckstyleAutoFixConfigured</recipe>
                    </activeRecipes>
...

Few XXXBestPractices recipes were introduced in #87. We should include those recipes into active list and make sure they run during maven build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions