The answer is probably (and sadly), "it depends." It depends on the nature
of the dependency and what part of Jersey it's dependent on. If it's
depending on part of Jersey 1.x to be running in the guts of the server
itself...probably not. If it's depending on part of Jersey 1.x for a
client, maybe. Assuming it's not something that wants to be plumbed into
the depths of the server, you may need to do some repackaging so you don't
have any packaging collisions. Maven Shade has the ability to "relocate"
dependencies. So if your app (A) depends on a library (B) that depends on
Jersey 1.x (C), you may be able to configure Shade so B's dependency on C
is repackaged (move packages com.* to B-internal.com.*). This can get
messy, though, if you run into lots of conflicts. I've done this in the
past to import my own version of javassist
<https://github.com/yammer/telemetry/blob/f4c3f408348449c0b9c70c61971ac07f7569e6e3/telemetry-agent/pom.xml#L115-L120>
.

Probably not the most satisfying answer. If you can provide more details
regarding the affected dependency we might be able to help more.

Ryan

On Mon, Jul 18, 2016 at 9:21 AM, gsmachado <[email protected]> wrote:

> Hello all,
>
> I'm using Dropwizard 0.9.3 in the backend, where I have a large project
> with multiple dependencies.
>
> At the moment, I'm using the following packages/dependencies:
>
>
> project.ext {
>     dropwizardVersion = '0.9.3'
> }
>
>
> dependencies {
>     compile (
>             'io.dropwizard:dropwizard-core:' + dropwizardVersion,
>             'io.dropwizard:dropwizard-hibernate:' + dropwizardVersion,
>             'io.dropwizard:dropwizard-migrations:' + dropwizardVersion,
>             'io.dropwizard:dropwizard-auth:' + dropwizardVersion,
>             'io.dropwizard:dropwizard-client:' + dropwizardVersion,
>             'io.dropwizard:dropwizard-testing:' + dropwizardVersion,
>             'io.dropwizard:dropwizard-assets:' + dropwizardVersion,
>             'io.dropwizard:dropwizard-forms:' + dropwizardVersion,
>             'com.github.toastshaman:dropwizard-auth-jwt:0.9.1-1',
>             'org.glassfish.jersey.media:jersey-media-multipart:2.22.1',
>             'commons-io:commons-io:2.4',
>             'javax.mail:mail:1.4',
>             'org.apache.httpcomponents:httpmime:4.5.1'
>     )
>
> }
>
>
>
> However, now, I *must* use a dependency that uses Jersey 1.x. Such library
> uses some features fro mJersey 1.x and I really can't change it to Jersey
> 2.x
>
> My question is: is it possible to use Dropwizard 0.9.3, somehow, with
> Jersey 1.x? If yes, how?
>
> Cheers!
>
> --
> You received this message because you are subscribed to the Google Groups
> "dropwizard-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to