You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JUnit4to5Migration adds an exclusion to the dependency, which breaks our builds. The issue above suggests crude workarounds like creating dummy classes in your project, but it seems cleaner to not add the exclusion in the first place.
As a workaround I added another recipe to our list which reverts the change; this has the (IMO cosmetic) issue that it creates an empty diff. Pull request is coming up for discussion.
I am aware this is really an issue with testcontainers and not so much with the JUnit4to5Migration recipe, but I think many projects could benefit from a workaround. This should be safe as well - once the issue in testcontainers is resolved it's a NOOP.
What version of OpenRewrite are you using?
I am using
OpenRewrite 8.9.0
rewrite-maven-plugin 5.14.0-SNAPSHOT
rewrite-testing-frameworks 2.1.0
How are you running OpenRewrite?
I am executing the JUnit4to5Migration recipe with the Maven command line.
What is the smallest, simplest way to reproduce the problem?
* Adds test case for broken testcontainers dependency
Reproduces #429
* Remove JUnit4 exclusion from testcontainers dependency
Fixes#429
* Document why output is identical but still different
---------
Co-authored-by: e512271 <simon.zilliken@sbb.ch>
Co-authored-by: Tim te Beek <tim@moderne.io>
org.testcontainers:testcontainers has a hard dependency on Junit4, see testcontainers/testcontainers-java#970
The JUnit4to5Migration adds an exclusion to the dependency, which breaks our builds. The issue above suggests crude workarounds like creating dummy classes in your project, but it seems cleaner to not add the exclusion in the first place.
As a workaround I added another recipe to our list which reverts the change; this has the (IMO cosmetic) issue that it creates an empty diff. Pull request is coming up for discussion.
I am aware this is really an issue with testcontainers and not so much with the JUnit4to5Migration recipe, but I think many projects could benefit from a workaround. This should be safe as well - once the issue in testcontainers is resolved it's a NOOP.
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
I am executing the JUnit4to5Migration recipe with the Maven command line.
What is the smallest, simplest way to reproduce the problem?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: