[ https://issues.apache.org/jira/browse/MNG-8027 ]


    Basil Crow deleted comment on MNG-8027:
    ---------------------------------

was (Author: basil):
I wanted to mention that this is now the only remaining issue blocking the 
Jenkins project from upgrading to Guice 7.0.0 or newer in Jenkins core. 
Previously, we were also blocked on the release of [jclouds 
2.6.0|https://github.com/apache/jclouds-site/blob/207368468e94f81601e69784ff1b837888f5c98f/releasenotes/2.6.0.md]
 with {{jakarta.inject}}. We are currently obliged to continue shipping Guice 
6.0.0 in Jenkins core to support our [Maven integration 
plugin|https://plugins.jenkins.io/maven-plugin/], which embeds Maven into 
Jenkins using {{javax.inject}}.

> Maven cannot be embedded in applications that have upgraded Guice to 7.0+
> -------------------------------------------------------------------------
>
>                 Key: MNG-8027
>                 URL: https://issues.apache.org/jira/browse/MNG-8027
>             Project: Maven
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.9.6
>            Reporter: Basil Crow
>            Priority: Major
>
> With Java 17, install Jenkins 2.442, create a Maven installation for Maven 
> 3.9.6, and create a Maven project building e.g. 
> [https://github.com/basil/simple-maven-project-with-tests]. The job should 
> succeed.
> Now run the same job against [https://github.com/jenkinsci/jenkins/pull/8889] 
> which upgrades Guice from 6.0 (which supports both {{javax.inject}} and 
> {{jakarta.inject}} imports) to 7.0 (which only supports {{jakarta.inject}} 
> imports). The job fails with:
> {noformat}
> java.lang.IllegalArgumentException: org.eclipse.sisu.Parameters is not a 
> binding annotation. Please annotate it with @BindingAnnotation.
>       at 
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:218)
>       at com.google.inject.Key.ensureIsBindingAnnotation(Key.java:382)
>       at com.google.inject.Key.strategyFor(Key.java:370)
>       at com.google.inject.Key.get(Key.java:229)
>       at org.eclipse.sisu.wire.ParameterKeys.<clinit>(ParameterKeys.java:28)
> Caused: java.lang.ExceptionInInitializerError
>       at 
> org.eclipse.sisu.wire.DependencyAnalyzer.<init>(DependencyAnalyzer.java:93)
>       at 
> org.eclipse.sisu.wire.ElementAnalyzer.<init>(ElementAnalyzer.java:104)
>       at org.eclipse.sisu.wire.WireModule.configure(WireModule.java:74)
>       at 
> com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:426)
>       at com.google.inject.spi.Elements.getElements(Elements.java:113)
>       at 
> com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:160)
>       at 
> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
>       at com.google.inject.Guice.createInjector(Guice.java:87)
>       at com.google.inject.Guice.createInjector(Guice.java:69)
>       at com.google.inject.Guice.createInjector(Guice.java:59)
>       at 
> org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:481)
>       at 
> org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:206)
>       at 
> org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:168)
>       at 
> hudson.maven.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:166)
>       at 
> hudson.maven.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:159)
>       at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:110)
>       at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:137)
>       at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:211)
>       at 
> hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1324)
>       at 
> hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1124)
>       at hudson.FilePath.act(FilePath.java:1236)
>       at hudson.FilePath.act(FilePath.java:1219)
>       at 
> hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:985)
>       at 
> hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:689)
>       at 
> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
>       at hudson.model.Run.execute(Run.java:1895)
>       at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
>       at hudson.model.ResourceController.execute(ResourceController.java:101)
>       at hudson.model.Executor.run(Executor.java:442)
> {noformat}
> This is blocking us from upgrading Guice from 6.0 to 7.0.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to