cucumber / cucumber-eclipse

Eclipse plugin for Cucumber
MIT License
192 stars 149 forks source link

Allow Step Definitions from Maven Dependencies #465

Closed AddisonSnyder closed 2 years ago

AddisonSnyder commented 2 years ago

🤔 What's the problem you're trying to solve?

I'm writing a cucumber framework for Selenium related steps, which is then used as a dependency for many CI projects. When they try to use cucumber plugin, the steps aren't detected in autofill, considered "missing step definition", etc. Often testers can't even build the project from the IDE/plugin 'run scenario/feature' button. However, in commandline, mvn clean install etc work fine, as cucumber properly sees the step definitions via the GLUE property.

✨ What's your proposed solution?

Implement a feature that enables the plugin to search certain packages or maven dependencies for step definitions that are located outside of the project housing the gherkin code.

⛏ Have you considered any alternatives or workarounds?

I'm currently building a fork of this project that searches through all workspace projects when looking for step definitions. Will likely build and distribute that fork if it works well enough. I'm tired of people complaining that the IDE won't detect things that are physically in the classpath and compile/run properly on CLI.

📚 Any additional context?

My brain hurts from trying to find workarounds to this issue that aren't a direct change to the plugin's code. This problem occurs on both the eclipse plugin and the one for Intellij.

This text was originally generated from a template, then edited by hand. You can modify the template here.

AddisonSnyder commented 2 years ago

Nevermind, I'm an idiot. Spent hours trying to resolve this, and I can semi-fix it by having the project A) referenced by the implementing project and B) (the part I forgot) converting all pertinent projects to Cucumber projects. Gonna confirm on a second machine and close this issue. :disappointed:

mpkorstanje commented 2 years ago

That's cool. And don't be so hard on yourself! We've all been there, and often go back too.