openrewrite / rewrite-maven-plugin

OpenRewrite's Maven plugin.
https://openrewrite.github.io/rewrite-maven-plugin/plugin-info.html
Apache License 2.0
143 stars 74 forks source link

Incompatible with multiple test roots #886

Closed haleyk10198 closed 2 weeks ago

haleyk10198 commented 2 weeks ago

I am using the JUnit5 migration recipes. https://docs.openrewrite.org/running-recipes/popular-recipe-guides/migrate-from-junit-4-to-junit-5

Tested on version: recipes: 2.21.0 openrewrite-maven-plugin: 5.43.0 maven-build-helper: 3.6.0

How the project was setup:

  1. it adds additional test roots with this https://stackoverflow.com/questions/10138559/howto-add-another-test-source-folder-to-maven-and-compile-it-to-a-separate-folde

  2. it uses only surefire even for the non-unit test test roots, no failsafe, sorry.

  3. Both surefire & intellij was able to recognize the additional source roots correctly

Expected output: JUnit5 migration recipes should be applied to the additional test roots Actual output: It only applies to the default src/test folder

timtebeek commented 2 weeks ago

hi! Indeed we don't yet support the build-helper-maven-plugin; we're tracking support here, so be sure to subscribe to that issue:

If you have any ideas on how to add support we'd love to here on that issue as well! :)

timtebeek commented 2 weeks ago

hi @haleyk10198 ; We've just put out a new version of the Maven plugin containing a fix #888

Could you let us know how that works out for you?