Add Dropwizard 1.0.0 Support #86
Conversation
update to latest or dropwizard matching versions of dependencies. Most importantly `io.dropwizard:dropwizard:1.0.0 and `com.squarespace.jersey2-guice:jersey2-guice-impl:1.0.6`
Update `GuiceBundle` to setup guice and hk2 using the newest `jersey2-guice` way: `com.squarespace.jersey2.guice.JerseyGuiceUtils#install`
Small tweaks to exists tests to match new dependencies versions of apis
update `README.md` to match new dependencies apis
|
Oh, also let me know how you'd like me to handle the |
|
Thanks so much! I'll try to get this reviewed and merged this week |
|
@heldeen, thanks for this! I tried out your branch and it works great! I excluded diff --git a/pom.xml b/pom.xml
index 63f775e..311e353 100755
--- a/pom.xml
+++ b/pom.xml
@@ -66,6 +66,12 @@
<groupId>org.glassfish.hk2</groupId>
<artifactId>hk2-api</artifactId>
<version>2.4.0-b34</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.glassfish.hk2.external</groupId>
+ <artifactId>aopalliance-repackaged</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
@@ -144,6 +150,10 @@
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
+ <artifactId>metrics-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-healthchecks</artifactId>
</dependency>
<dependency>
|
|
I'm a little weary of excluding My bad on the |
exclude `aopalliance-repackaged` from hk2-api until I know better add `metrics-core` dependency that was missed due to the duplicate classes problem
|
I think your guess is as good as mine. I tried the |
|
Those are my findings as well @mtraynham. We'll go w/ it until it is a problem. 😄 |
|
Sounds good to me! Thanks again 🍻 |
|
We've had 2.4.0-b34 with this exclusion in our basepom for a while without issue so I think it should be fine |
|
I just pushed cb924b0 with some POM cleanup and cut a release for version 1.0.0, thanks for the PR! |
| modules.add(new ServletModule()); | ||
|
|
||
| initInjector(); | ||
| JerseyGuiceUtils.install(new ServiceLocatorGenerator() { |
There was a problem hiding this comment.
@vvondra, I am able to inject Provider<SecurityContext> in my quick tests. Would you want to create an issue w/ a simple example project that can duplicate the issue you are seeing?
There was a problem hiding this comment.
I tried to sum up an example in #87
https://github.com/HubSpot/dropwizard-guice/pull/87/files#r75596536
Maybe it's because I'm not injecting the Provider to a resource, but to a service that is a dependecy of the resource?
This adds support for dropwizard 1.0. I didn't see a contributions type doc so let me know if there is one and/or there need to be any changes for this to be merged.
I'm not completely happy with the
baseInjectorconcept I introduced inGuiceBundlebut I wanted to get some feedback before I over engineered it. Everything else seems straight forward to me.