reficio / p2-maven-plugin

Maven3 plugin that automates the third-party dependency management for Eclipse RCP
http://reficio.org
230 stars 97 forks source link

Migrate to JUnit Jupiter through OpenRewrite #316

Closed timtebeek closed 1 year ago

timtebeek commented 1 year ago

Fixes #296.

Had to still add the vintage-engine manually for the generated groovy stubs. Have not explored the options there; you might want to see if there's a newer generator now that JUnit Jupiter is used and remove the vintage-engine again.

Otherwise automatically migrated through:

mvn org.openrewrite.maven:rewrite-maven-plugin:4.39.0:run \
  -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-testing-frameworks:1.33.0 \
  -DactiveRecipes=org.openrewrite.java.testing.junit5.JUnit5BestPractices

If you still want to try out OpenRewrite/Moderne there's a few more suggested recipes to apply: https://public.moderne.io/recipes/org.openrewrite.java.testing.assertj.Assertj https://public.moderne.io/recipes/org.openrewrite.java.testing.junit5.UseMockitoExtension

You might need to create a repository group first, only containing: https://public.moderne.io/organizations/reficio/p2-maven-plugin?branch=master Happy to walk you through it if needed, although it's also documented here.

sparsick commented 1 year ago

Thanks @timtebeek 🙏

timtebeek commented 1 year ago

You're welcome & until next time!