Skip to content

Spring batch 6 - some old packages are not migrated to new ones #926

@ielatif

Description

@ielatif

What version of OpenRewrite are you using?

I am using

  • OpenRewrite v6.28.0
  • Maven plugin v6.28.0
  • rewrite-spring v6.23.0

How are you running OpenRewrite?

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

<plugin>
    <groupId>org.openrewrite.maven</groupId>
    <artifactId>rewrite-maven-plugin</artifactId>
    <version>6.28.0</version>
    <configuration>
        <exportDatatables>true</exportDatatables>
        <activeRecipes>
        	<recipe>org.openrewrite.java.spring.boot4.UpgradeSpringBoot_4_0</recipe>
        </activeRecipes>
    </configuration>
    <dependencies>
        <dependency>
        	<groupId>org.openrewrite.recipe</groupId>
            <artifactId>rewrite-spring</artifactId>
            <version>6.23.0</version>
        </dependency>
    </dependencies>
</plugin>

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

Run the migration mvn rewrite:run

What did you expect to see?

Packages should be changed for :

  • RunIdIncrementer
  • CompositeJobParametersValidator
  • DefaultJobParametersValidator;

What did you see instead?

Old packages are still used

Troubleshooting

The recipe used to migrate packages is ChangeType. May be it should use ChangePackage?

- org.openrewrite.java.ChangeType:
      oldFullyQualifiedTypeName: org.springframework.batch.core.job.launch.support.RunIdIncrementer
      newFullyQualifiedTypeName: org.springframework.batch.core.job.parameters.RunIdIncrementer

Are you interested in [contributing a fix to OpenRewrite]

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions