-
-
Notifications
You must be signed in to change notification settings - Fork 518
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
Serenity core imports old version of servlet-api causing problems with more modern applications #217
Comments
Hi @johndeverall. You are right. org.seleniumhq.selenium:selenium-server contains org.mortbay.jetty', module: 'servlet-api-2.5, and it conflicts with javax.servlet:javax.servlet-api:3.1.0. But it already contain javax.servlet:avax.servlet-api:3.1.0 - and adding it to serenity dependency will change nothing. I checked how it works with excluded jetty servlet-api-2.5, and it works fine, takes correct class and isAsyncStarted is available now. Changes already merged (https://github.com/serenity-bdd/serenity-core/pull/222/files) and will be available in next release. if you fell that this issue already resolved, please close it. Thanks a lot ! P.S. dependency tree for demo project junit-parameterized-tests with current serenity bdd version (build from master):
|
It seems that this issue can be closed |
Serenity core imports an old version of the servlet-api, (via selenium) which causes
problems
for modern applications.An example of such a problem might look like:
This failure seems to be because
more modern apps
cannot findisAsyncStarted()
when the older version of the servlet-api is on the classpath. See this stackoverflow post for more info.Work around:
A current workaround for this is to exclude the old servlet library from serenity core. An example using maven is below:
Solution:
However it would be better to have serenity-core import a more up-to-date servlet library in the first place, as there seems no good reason not to, despite the fact that selenium still imports the older version of the library. My understanding is that these things are backwards compatible?
At least Oracle thinks they are.
Using the dependency:
might make more sense.
Therefore, we could change the code block below:
in
serenity-core/build.gradle
to have the lineexclude group: 'org.mortbay.jetty', module: 'servlet-api-2.5'
included.I'd try send PR but the build is currently failing and I do not feel qualified to fix the build.
The text was updated successfully, but these errors were encountered: