slachiewicz opened a new pull request, #2072:
URL: https://github.com/apache/maven-resolver/pull/2072
Guice 6 switched from `javax.inject` to `jakarta.inject`, so #2070 fails to
compile on `maven-resolver-1.9.x`:
```
AetherModule.java:[282,17] no suitable method found for
toProvider(java.lang.Class<...StaticNameMapperProvider>)
```
I checked whether the two could be supported at once. Changing the nine
`*NameMapperProvider` classes from `javax.inject.Provider` to
`com.google.inject.Provider` does make the module compile against guice 5.1.0
**and** 7.0.0, and all 358 `maven-resolver-impl` tests pass on 5.1.0. But on
7.0.0 `AetherModuleTest.testModuleCompleteness` then fails:
```
No implementation for DependencyCollectorDelegate was bound.
Did you mean?
* DependencyCollectorDelegate annotated with @Named("bf") bound at
AetherModule.configure(:162)
Requested by:
AetherModule.dependencyCollectorDelegates(AetherModule.java:370)
```
Guice 7 dropped `javax.inject` annotation support outright, so the `@Named`
qualifiers on the `@Provides` parameters are invisible to it. Fixing the
`Provider` signature only moves the failure from compile time to injector
creation. Taking guice 7 on this line means migrating the whole stack to
`jakarta.inject`, which is not a maintenance-branch change.
Worth recording: both 5.1.0 and 7.0.0 are Java 8 bytecode, so the Java 8
baseline is not what blocks this. Master is unaffected — it has no
`AetherModule`.
Supersedes #2070.
*This change was created with AI assistance.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]