Skip to content

Conversation

@cstamas
Copy link
Member

@cstamas cstamas commented Jun 11, 2025

Current master uses Guice 6 and this has following consequences:

  • jakarta.inject ends up in /lib of Maven distro: it is a transitive dep of Guice 6
  • excluding it is not possible, as it is needed at compile and runtime (com.inject.guice.Provider extends both Providers from javax and jakarta).
  • we do not require any feature of Guice 6: while Eclipse Sisu may "open" toward javax.inject, Maven JSR330 is here only for Maven 3 backward compatibility, while "native" Maven 4 stuff has Maven DI in place. Best to keep it aligned with Maven 3.9.x line.

Changes:

  • downgrade Guice to 5.1.0 (same as in latest Maven 3.9.x)
  • remove depMgt for "main" Guice JAR, offer only the one with "classess" classifier (ASM-less one)
  • ban main Guice JAR to make sure does not enter the game by mistake

We use the one with "classes" classifier. Clean up
dependencies as well as we had both, plus we had
popping up via some test deps as well.

Ban the "plain" JAR as well, to make sure we have
only the proper ASM-less one here.
@cstamas cstamas added this to the 4.0.0-rc-4 milestone Jun 11, 2025
@cstamas cstamas requested a review from gnodet June 11, 2025 13:56
@cstamas cstamas self-assigned this Jun 11, 2025
@cstamas cstamas changed the title Ban "plain" Guice Ban "plain" Guice; downgrade it to 5.1.0 Jun 11, 2025
For them the ban does not work.
@cstamas cstamas requested a review from slawekjaranowski June 11, 2025 15:02
@cstamas cstamas marked this pull request as ready for review June 11, 2025 15:39
@cstamas cstamas merged commit 780a5cb into apache:master Jun 11, 2025
36 of 38 checks passed
@cstamas cstamas deleted the ban-guice branch June 11, 2025 15:39
@slachiewicz
Copy link
Member

In general ok, but what to do with external components that may be injected? Keep it in javax.inject?

@cstamas
Copy link
Member Author

cstamas commented Jun 11, 2025

jakarta package name was never exported from maven core, but it was present in core. so nothing was able to use it anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants