Open garretwilson opened 7 years ago
Oh, OK, I see it is a little more complicated than this.
The javax.ws.rs:jsr311-api:1.1.1
dependency is getting pulled in, not directly, but via io.swagger:swagger-core:1.5.13
, which comes in via io.swagger:swagger-jaxrs:1.5.13
which you use.
I see that io.swagger:swagger-jaxrs2:2.0.0-rc2
is nearing completion, which correctly pulls in (transitively) javax.ws.rs:javax.ws.rs-api:2.0.1
. So I hope you can update to the new swagger-jaxrs2
dependency as soon as version 2 is released.
I'm confused as to why jsr311-api is included as a required dependency. It it an old version of the spec --- version 1.x. The latest version is JAX-RS 2.x. Most people I would hope are using the latest version of the spec anyway.
Including the old one really hurts us --- it overrides some of the classes we have included specifically using the latest version, and we may not know it until we deploy an application using the annotations, and we get:
See for example https://stackoverflow.com/q/19225618/421049 .
And can't you mark the JAX-RS dependency as
provided
? That way it won't be included at runtime --- and doesn't need to be included at runtime, because the classes get the JAX-RS API classes from the container. This would skip the whole problem altogether.This was just a huge pain on a large production system we're trying to deploy, just because we added some swagger-maven-plugin annotations.