-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log a warning when more than one IoC dependency is found in the classpath #594
Log a warning when more than one IoC dependency is found in the classpath #594
Conversation
…path and Cucumber defaults to no IoCs.
@@ -48,6 +48,10 @@ | |||
<artifactId>cobertura</artifactId> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.slf4j</groupId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove slf4j and replace the logging with a simple System.err.println
.
Well spotted, thanks for that. Please let me know if you are ok with the changes. |
Thanks, that works, but I think it would be even better if you added two exception classes - |
I absolutely agree with you. I only did it because, based on what I've seen, there is not a hierarchy under CucumberException, only two classes extend it. Happy do it though, it's much more elegant. |
Hi Aslak. Have you had the chance to look at this? Thanks. |
Hi Ariel - not yet, but it looks good. @ilanpillemer could you merge this in please? |
Merged. Thanks for your effort @arikogan. |
@aslakhellesoy @ilanpillemer I took me the liberty to merge this PR. |
Thanks @brasmusson @ilanpillemer still want to be part of the team? |
Thanks very much @brasmusson and @aslakhellesoy. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
It has happened to us that people put more than one IoC dependency into their classpath (e.g. cucumber-spring AND cucumber-guice) and suddenly their beans are not being wired correctly. This is because when Cucumber detects such situation it silently defaults to DefaultJavaObjectFactory which doesn't provide IoC features.
This pull request adds a warning so at least this situation can be spotted while reading the log.