Replies: 7 comments
-
|
I found a way to migrate guice to jakarta namespace without forking it (automatic migration). But there would be two problems. First, I will have to publish repackaged guice jars into maven central with (obviously) different coordinates. Hope it would not be a problem to anyone. The second problem is worse: I can migrate to For gradle projects there is a workaround plugin which could automatically migrate 3rd party libs. Don't know about anything like this for maven. In any case, not a very good way. Would it be better to stay on I think staying on Please share your opinion (there might be many possible project-specific situations). |
Beta Was this translation helpful? Give feedback.
-
|
I changed my mind: there would only be version with Other 3rd party guice libraries, using javax.inject annotations would not work (simply because guice would not see javax annotations). They would eaither have to be updated with jakarta.inject annotations or, better, to use guice native annotations (to work with both versions). |
Beta Was this translation helpful? Give feedback.
-
|
Release candidate version released. Please try it and share your migration problems (if any). I'll keep it in release candidate state for some time (couple of weeks) to gather feedback. IMPORTANT:
Guicey now depend on repackaged guice version (different maven coordinates) in order to support jakarta namespace. Be careful to not leak original guice jar through 3rd party dependencies of your modules. Also, 3rd party libraries, using javax.inject annotations would not work properly (repackaged guice simply ignores javax.inject namespace). The best way for external libraries is to avoid using javax.inject ( There is also a gradle plugin which could migrate your dependencies automatically into jakarta namespace. Might be also an option if you use 3rd party guice modules. Documentation is not yet updated and not published for rc (but, as there are no changes, it should not be a problem). Guicey examples were already migrated to dropwizard 4. I suggest to migrate on dropwizard 3 first and then move to dropwizard 4 (might be too many changes (in dropwizard) for direct 2.x -> 4.x migration) Direct dependency: implementation 'ru.vyarus:dropwizard-guicey:7.0.0-rc.2'<dependency>
<groupId>ru.vyarus</groupId>
<artifactId>dropwizard-guicey</artifactId>
<version>7.0.0-rc.2</version>
</dependency>BOM: dependencies {
implementation platform('ru.vyarus.guicey:guicey-bom:7.0.0-rc.2')
implementation 'ru.vyarus:dropwizard-guicey'
// other dropwizard, guice or guicey modules without version
}<dependencyManagement>
<dependencies>
<dependency>
<groupId>ru.vyarus.guicey</groupId>
<artifactId>guicey-bom</artifactId>
<version>7.0.0-rc.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>ru.vyarus</groupId>
<artifactId>dropwizard-guicey</artifactId>
</dependency>
</dependencies> |
Beta Was this translation helpful? Give feedback.
-
|
7.0.0-rc.2 released fixing leaking guice in guicey-jdbi3 module |
Beta Was this translation helpful? Give feedback.
-
|
Jakarta.inject support should appear in guice directly. But still, there is no certainty about official guice-servlet and guice-persist updates. |
Beta Was this translation helpful? Give feedback.
-
|
Guice 7.0.0-rc1 was released. Guicey master was already updated without problems. Guice 7 (same as my repackage) use jakarta.inject, jakarta.servlet and jakarta.persistence. I did not plan to release guicey rc versions, but if anyone want to test everything with guice 7 please write here. |
Beta Was this translation helpful? Give feedback.
-
|
Guicey 7 released (with guice 7.0). Guicey 6.1.0 and 5.9.0 were also released (for dropwizard 3 and 2.1) with guice 6. Note that inspite of the fact that guice 6 brings initial jakartra support (preserving javax) it can't be used with dropiwzard 4 becuase it still use javax.servlet. So only guice 7 is compatible with dropwizard 4. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Dropwizard 4 was released, but compatible guicey version would not be released soon.
Dropwizard 3 and 4 are almost equal, but dropwizard 4 use jakarta namespace instead of javax. Guice does not support this namespace (and it is unknown if it would - guice team keeps silence). I will start looking how I can workaround this moment after guicey release for dropwizard 3.
Any Ideas are welcome. Note that guiced-ee is not an option because of GPL license.
Beta Was this translation helpful? Give feedback.
All reactions