Skip to content

Recipes no longer applied after upgrading from 6.26 to 6.27+ #1107

@baflQA

Description

@baflQA

What version of OpenRewrite are you using?

6.26.0 updated to 6.27.0 and/or 6.28.1

  • Maven plugin 6.28.1
  • rewrite-module v1.2.3

How are you running OpenRewrite?

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

 <build>
        <plugins>
            <plugin>
                <groupId>org.openrewrite.maven</groupId>
                <artifactId>rewrite-maven-plugin</artifactId>
                <version>6.28.1</version>
                <configuration>
                    <activeRecipes>
                        <recipe>org.openrewrite.java.RemoveUnusedImports</recipe>
                        <recipe>org.openrewrite.java.OrderImports</recipe>
                    </activeRecipes>
                </configuration>
            </plugin>
        </plugins>
    </build>

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

I have a script which runs openapi-generator-cli to generate dtos from my api-specs.
There are some imports added from templates, which are not required for each generated file.
I use open-rewrite plugin to clean the imports up.
After upgrading to 6.27.0 open rewrite maven plugin stopped removing the imports.

When I stage and commit generated files, and then apply the open rewrite recipes, the imports will be cleaned up again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions