Migrate cucumber.api to io.cucumber

MSAL

Cucumber-JVM 5.0.0 moved the cucumber.api types to io.cucumber, but not as a single package rename: types were spread over io.cucumber.java, io.cucumber.junit, io.cucumber.testng, io.cucumber.plugin and io.cucumber.core. This recipe maps each cucumber.api type onto the package it actually moved to.

org.openrewrite.cucumber.jvm.CucumberApiToIoCucumber
mod run . --recipe=org.openrewrite.cucumber.jvm.CucumberApiToIoCucumber

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Migrate cucumber.api.CucumberOptions to io.cucumber.testng.CucumberOptions
  2. Change type cucumber.api.java.ObjectFactory to io.cucumber.core.backend.ObjectFactory
  3. Change type cucumber.api.event.EventListener to io.cucumber.plugin.EventListener
  4. Change type cucumber.api.event.ConcurrentEventListener to io.cucumber.plugin.ConcurrentEventListener
  5. Change type cucumber.api.event.CanonicalEventOrder to io.cucumber.core.plugin.CanonicalEventOrder
  6. Rename package name cucumber.api.event to io.cucumber.plugin.event
  7. Change type cucumber.api.formatter.AnsiEscapes to io.cucumber.core.plugin.AnsiEscapes
  8. Change type cucumber.api.formatter.ColorAware to io.cucumber.plugin.ColorAware
  9. Change type cucumber.api.formatter.NiceAppendable to io.cucumber.core.plugin.NiceAppendable
  10. Change type cucumber.api.formatter.StrictAware to io.cucumber.plugin.StrictAware
  11. Change type cucumber.api.Argument to io.cucumber.plugin.event.Argument
  12. Change type cucumber.api.CucumberOptions to io.cucumber.junit.CucumberOptions
  13. Change type cucumber.api.DataTable to io.cucumber.datatable.DataTable
  14. Change type cucumber.api.HookTestStep to io.cucumber.plugin.event.HookTestStep
  15. Change type cucumber.api.HookType to io.cucumber.plugin.event.HookType
  16. Change type cucumber.api.Pending to io.cucumber.core.backend.Pending
  17. Change type cucumber.api.PendingException to io.cucumber.java.PendingException
  18. Change type cucumber.api.PickleStepTestStep to io.cucumber.plugin.event.PickleStepTestStep
  19. Change type cucumber.api.Plugin to io.cucumber.plugin.Plugin
  20. Change type cucumber.api.Result to io.cucumber.plugin.event.Result
  21. Change type cucumber.api.Scenario to io.cucumber.java.Scenario
  22. Change type SnippetType to CucumberOptions$SnippetType
  23. Change type cucumber.api.SummaryPrinter to io.cucumber.plugin.SummaryPrinter
  24. Change type cucumber.api.TestCase to io.cucumber.plugin.event.TestCase
  25. Change type cucumber.api.TestStep to io.cucumber.plugin.event.TestStep
  26. Change type cucumber.api.Transpose to io.cucumber.java.Transpose
  27. Change type cucumber.api.TypeRegistry to io.cucumber.core.api.TypeRegistry
  28. Change type cucumber.api.TypeRegistryConfigurer to io.cucumber.core.api.TypeRegistryConfigurer
  29. Change type cucumber.api.cli.Main to io.cucumber.core.cli.Main
  30. Rename package name cucumber.api.java8 to io.cucumber.java8
  31. Rename package name cucumber.api.java to io.cucumber.java
  32. Rename package name cucumber.api.junit to io.cucumber.junit
  33. Rename package name cucumber.api.testng to io.cucumber.testng