cancel
Showing results for 
Search instead for 
Did you mean: 

deprecated Main class error while using Cucumber 6.1.1

SOLVED
Highlighted
Occasional Visitor

deprecated Main class error while using Cucumber 6.1.1

Hello Team

 

I have installed Cucumber plugin in latest eclipse version and Cucumber which gets installed as plugin is 6.1.1

I have added all the necessary dependencies from the Github location :https://github.com/cucumber/cucumber-java-skeleton/blob/master/pom.xml

 

Now when I am trying to run my feature file which contains a scenario ,I am getting the warning as

Jun 23, 2020 7:03:00 PM cucumber.api.cli.Main run
WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main

 

And as a result of this somehow execution is failing ans my output is:

Jun 23, 2020 7:03:00 PM cucumber.api.cli.Main run
WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main

Scenario: Add a menu item # src/test/java/linkedlearning/cucumbercourse/features/MenuManagement.feature:3

0 Scenarios
0 Steps
0m1.020s

 

Now in the cucumber-core-6.1.1.jar,I can see that it has 

--cucumber.api.cli package which has Main class and I suppose the execuion is referring to this instead of

--io.cucumber.core.cli package which has Main class 

 

Can you please help.

 

Thanks

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: deprecated Main class error while using Cucumber 6.1.1

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. We have an open issue about this. If you feel strongly about it you can help us by submitting a pull request to cucumber-eclipse.

------
I'm the creator and lead developer of Cucumber Open.

View solution in original post

5 REPLIES 5
Highlighted
New Contributor

Re: deprecated Main class error while using Cucumber 6.1.1

Hi , 

 

did you found any solution to this?

 I am getting same error. 

Highlighted
New Contributor

Re: deprecated Main class error while using Cucumber 6.1.1

Thanks for your feedback!

I'm installing Eclipse so I can try reproducing it locally and eventually fix it or give a workaround. I'll keep you informed.

Highlighted
New Contributor

Re: deprecated Main class error while using Cucumber 6.1.1

I'm failing to reproduce your issue. I'll need more details about your setup.

 

Here are the steps I performed:

- download and install Eclipse 2020-06

- clone the cucumber-java-skeleton project on my machine

- select File > Import > Existing Maven Projects to import the cucumber-java-skeleton as an Eclipse project

- Install the Cucumber plugin from the marketplace

 

When running maven test (right click the pom.xml in package explorer, select Run As > maven test), then the feature is run as expected

 

When openining the RunCucumberTest.java file and running it as JUnit test (right click in the file, Run As > Junit test), then it works too.

 

Can you describe me the steps to perform so I can reproduce your issue?

Highlighted
Moderator

Re: deprecated Main class error while using Cucumber 6.1.1

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. We have an open issue about this. If you feel strongly about it you can help us by submitting a pull request to cucumber-eclipse.

------
I'm the creator and lead developer of Cucumber Open.

View solution in original post

Highlighted
New Contributor

Re: deprecated Main class error while using Cucumber 6.1.1

Hey Nukul,

 

I read that you found the solution, I did too, I tried getting the feature file package properly, named like "package.feature" and also check if the dependency version does match in pom.xml. 

Keep exploring, thank you.

 

Thanks, 

Ankita G.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors