Deprecated Main class cucumber.api.cli.Main

See original GitHub issue

When launching my feature files using the plugin, I get a warning in the console stating “You are using deprecated Main class. Please use io.cucumber.core.cli.Main”.

This has been changed just about a month ago (see https://github.com/cucumber/cucumber-jvm/pull/1670). The old class is currently a delegate to the new class, so this doesn’t break anything (yet?), but the warning is a little annoying. From my perspective, this seems like a pretty easy thing to fix for someone who knows the plugin’s code, but since that’s not the case for me, I decided to open this issue instead.

//edit: After a quick repo search, it looks like this class is using the CUCUMBER_API_CLI_MAIN constant from this class to get the FQN for the Main class. I’m guessing updating this constant should fix the issue. However, I don’t really have any experience developing eclipse plugins and since I don’t want to push any changes based on guesses, I’ll leave this to someone else.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
a1dutchcommented, Jul 19, 2019

The way this is generally handled is you try to load the new class in the new package, if it fails with a class not found exception you load the old class.

1reaction
laeubicommented, Jul 18, 2019

If we simply change this, this wil break for everyone using an older cucumber-version so it is not that easy as it seems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

You are using deprecated Main class. Please use io ... - GitHub
"You can safely ignore this warning. All it means is that cucumber-eclipse has not yet been updated to use Cucumber's new package structure....
Read more >
Solved: deprecated Main class error while using Cucumber 6...
You can safely ignore this warning. All it means is that cucumber-eclipse has not yet been updated to use Cucumber's new package structure....
Read more >
Exception in thread "main" after updating cucumber version
I managed to force IntelliJ-cucumber plugin template to use the suggested io.cucumber.core.api.cli.Main, and it works.
Read more >
Main (Cucumber-JVM: Core 5.7.0 API) - javadoc.io
Deprecated. Launches the Cucumber-JVM command line. Parameters: argv - runtime options. See details in the io.cucumber.core.options.Usage.txt resource.
Read more >
cucumber.api.cli.Main Maven / Gradle / Ivy - Download JAR files
The class is part of the package ➦ Group: io.cucumber ➦ Artifact: ... @Deprecated public class Main { private static final Logger log...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found