Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency on Plexus Utils when using Maven Cache extension #472

Open
1 task
ascopes opened this issue Nov 26, 2024 · 8 comments
Open
1 task

Dependency on Plexus Utils when using Maven Cache extension #472

ascopes opened this issue Nov 26, 2024 · 8 comments
Assignees
Labels
help needed Issues that need additional help from the community or subject experts.

Comments

@ascopes
Copy link
Owner

ascopes commented Nov 26, 2024

Brief description

The use of the Maven Build Cache extension appears to force a dependency for this plugin on plexus-utils.

This appears to be a bug with that extension, but this issue is raised to track any further developments.

Steps to reproduce

Run a build with the Maven Build Cache extension activated, and observe the plugin initialisation errors from the Protobuf Maven Plugin.

Error message

[ERROR] org.apache.maven.plugin.PluginContainerException: Unable to load the mojo 'generate' (or one of its required components) from the plugin 'io.github.ascopes:protobuf-maven-plugin:2.7.0': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR] 
[ERROR] 1) [Guice/ErrorInCustomProvider]: IllegalStateException
[ERROR]   at MojoExecutionScopeModule.configure(MojoExecutionScopeModule.java:50)
[ERROR]       \_ installed by: WireModule -> MojoExecutionScopeModule
[ERROR]   at TemporarySpace.<init>(TemporarySpace.java:45)
[ERROR]       \_ for 2nd parameter
[ERROR]   at UrlResourceFetcher.<init>(UrlResourceFetcher.java:65)
[ERROR]       \_ for 1st parameter
[ERROR]   at ProtocResolver.<init>(ProtocResolver.java:63)
[ERROR]       \_ for 5th parameter
[ERROR]   at ProtobufBuildOrchestrator.<init>(ProtobufBuildOrchestrator.java:71)
[ERROR]       \_ for 2nd parameter
[ERROR]   at AbstractGenerateMojo.sourceCodeGenerator(AbstractGenerateMojo.java:71)
[ERROR]       \_ for field sourceCodeGenerator
[ERROR]   while locating MainGenerateMojo
[ERROR]   at ClassRealm[plugin>io.github.ascopes:protobuf-maven-plugin:2.7.0, parent: ClassLoaders$AppClassLoader@531d72ca]
[ERROR]       \_ installed by: WireModule -> PlexusBindingModule
[ERROR]   while locating Mojo annotated with @Named("io.github.ascopes:protobuf-maven-plugin:2.7.0:generate")
[ERROR] 
[ERROR] Learn more:
[ERROR]   https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER
[ERROR] 
[ERROR] 1 error
[ERROR] 
[ERROR] ======================
[ERROR] Full classname legend:
[ERROR] ======================
[ERROR] AbstractGenerateMojo:        "io.github.ascopes.protobufmavenplugin.mojo.AbstractGenerateMojo"
[ERROR] ClassLoaders$AppClassLoader: "jdk.internal.loader.ClassLoaders$AppClassLoader"
[ERROR] MainGenerateMojo:            "io.github.ascopes.protobufmavenplugin.mojo.MainGenerateMojo"
[ERROR] Mojo:                        "org.apache.maven.plugin.Mojo"
[ERROR] MojoExecutionScopeModule:    "org.apache.maven.execution.scope.internal.MojoExecutionScopeModule"
[ERROR] Named:                       "com.google.inject.name.Named"
[ERROR] PlexusBindingModule:         "org.eclipse.sisu.plexus.PlexusBindingModule"
[ERROR] ProtobufBuildOrchestrator:   "io.github.ascopes.protobufmavenplugin.generation.ProtobufBuildOrchestrator"
[ERROR] ProtocResolver:              "io.github.ascopes.protobufmavenplugin.protoc.ProtocResolver"
[ERROR] TemporarySpace:              "io.github.ascopes.protobufmavenplugin.utils.TemporarySpace"
[ERROR] UrlResourceFetcher:          "io.github.ascopes.protobufmavenplugin.dependencies.UrlResourceFetcher"
[ERROR] WireModule:                  "org.eclipse.sisu.wire.WireModule"
[ERROR] ========================
[ERROR] End of classname legend:
[ERROR] ========================
[ERROR] 
[ERROR]       role: org.apache.maven.plugin.Mojo
[ERROR]   roleHint: io.github.ascopes:protobuf-maven-plugin:2.7.0:generate
[ERROR] java.lang.RuntimeException: org.apache.maven.plugin.PluginContainerException: Unable to load the mojo 'generate' (or one of its required components) from the plugin 'io.github.ascopes:protobuf-maven-plugin:2.7.0': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR] 
[ERROR] 1) [Guice/ErrorInCustomProvider]: IllegalStateException
[ERROR]   at MojoExecutionScopeModule.configure(MojoExecutionScopeModule.java:50)
[ERROR]       \_ installed by: WireModule -> MojoExecutionScopeModule
[ERROR]   at TemporarySpace.<init>(TemporarySpace.java:45)
[ERROR]       \_ for 2nd parameter
[ERROR]   at UrlResourceFetcher.<init>(UrlResourceFetcher.java:65)
[ERROR]       \_ for 1st parameter
[ERROR]   at ProtocResolver.<init>(ProtocResolver.java:63)
[ERROR]       \_ for 5th parameter
[ERROR]   at ProtobufBuildOrchestrator.<init>(ProtobufBuildOrchestrator.java:71)
[ERROR]       \_ for 2nd parameter
[ERROR]   at AbstractGenerateMojo.sourceCodeGenerator(AbstractGenerateMojo.java:71)
[ERROR]       \_ for field sourceCodeGenerator
[ERROR]   while locating MainGenerateMojo
[ERROR]   at ClassRealm[plugin>io.github.ascopes:protobuf-maven-plugin:2.7.0, parent: ClassLoaders$AppClassLoader@531d72ca]
[ERROR]       \_ installed by: WireModule -> PlexusBindingModule
[ERROR]   while locating Mojo annotated with @Named("io.github.ascopes:protobuf-maven-plugin:2.7.0:generate")
[ERROR] 
[ERROR] Learn more:
[ERROR]   https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER
[ERROR] 
[ERROR] 1 error
[ERROR] 
[ERROR] ======================
[ERROR] Full classname legend:
[ERROR] ======================
[ERROR] AbstractGenerateMojo:        "io.github.ascopes.protobufmavenplugin.mojo.AbstractGenerateMojo"
[ERROR] ClassLoaders$AppClassLoader: "jdk.internal.loader.ClassLoaders$AppClassLoader"
[ERROR] MainGenerateMojo:            "io.github.ascopes.protobufmavenplugin.mojo.MainGenerateMojo"
[ERROR] Mojo:                        "org.apache.maven.plugin.Mojo"
[ERROR] MojoExecutionScopeModule:    "org.apache.maven.execution.scope.internal.MojoExecutionScopeModule"
[ERROR] Named:                       "com.google.inject.name.Named"
[ERROR] PlexusBindingModule:         "org.eclipse.sisu.plexus.PlexusBindingModule"
[ERROR] ProtobufBuildOrchestrator:   "io.github.ascopes.protobufmavenplugin.generation.ProtobufBuildOrchestrator"
[ERROR] ProtocResolver:              "io.github.ascopes.protobufmavenplugin.protoc.ProtocResolver"
[ERROR] TemporarySpace:              "io.github.ascopes.protobufmavenplugin.utils.TemporarySpace"
[ERROR] UrlResourceFetcher:          "io.github.ascopes.protobufmavenplugin.dependencies.UrlResourceFetcher"
[ERROR] WireModule:                  "org.eclipse.sisu.wire.WireModule"
[ERROR] ========================
[ERROR] End of classname legend:
[ERROR] ========================
[ERROR] 
[ERROR]       role: org.apache.maven.plugin.Mojo
[ERROR]   roleHint: io.github.ascopes:protobuf-maven-plugin:2.7.0:generate
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

Logs

[INFO] Skipping plugin execution (cached): protobuf:generate
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=9250, ConflictMarker.markTime=13625, ConflictMarker.nodeCount=5, ConflictIdSorter.graphTime=5500, ConflictIdSorter.topsortTime=7750, ConflictIdSorter.conflictIdCount=5, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=61250, ConflictResolver.conflictItemCount=5, DfDependencyCollector.collectTime=7003000, DfDependencyCollector.transformTime=111833}
[DEBUG] io.github.ascopes:protobuf-maven-plugin:jar:2.7.0
[DEBUG]    com.fasterxml.jackson.core:jackson-databind:jar:2.18.1:compile
[DEBUG]       com.fasterxml.jackson.core:jackson-annotations:jar:2.18.1:compile (version managed from default)
[DEBUG]       com.fasterxml.jackson.core:jackson-core:jar:2.18.1:compile (version managed from default)
[DEBUG]    javax.annotation:javax.annotation-api:jar:1.3.2:compile
[DEBUG] Created new class realm plugin>io.github.ascopes:protobuf-maven-plugin:2.7.0
[DEBUG] Importing foreign packages into class realm plugin>io.github.ascopes:protobuf-maven-plugin:2.7.0
[DEBUG]   Imported:  < project>com.spxxx:proto:0.0.1-SNAPSHOT
[DEBUG] Populating class realm plugin>io.github.ascopes:protobuf-maven-plugin:2.7.0
[DEBUG]   Included: io.github.ascopes:protobuf-maven-plugin:jar:2.7.0
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-databind:jar:2.18.1
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-annotations:jar:2.18.1
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-core:jar:2.18.1
[DEBUG] Loading mojo io.github.ascopes:protobuf-maven-plugin:2.7.0:generate from plugin realm ClassRealm[plugin>io.github.ascopes:protobuf-maven-plugin:2.7.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@531d72ca]
[DEBUG] Reported OS is Mac OS X
[DEBUG] Reported CPU architecture is aarch64
[DEBUG] Reported java.home is /Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home
[DEBUG] Parsed PATH environment variable to [/Users/debrajmanna/.jenv/shims, /Users/debrajmanna/.pyenv/shims, /Users/debrajmanna/.nvm/versions/node/v19.6.0/bin, /Users/debrajmanna/binaries, /Users/debrajmanna/.local/bin, /opt/kotlinc/bin, /opt/gradle-8.8/bin, /opt/apache-maven-3.9.9/bin, /Applications/Sublime Text.app/Contents/SharedSupport/bin, /opt/homebrew/bin, /opt/homebrew/sbin, /usr/local/bin, /System/Cryptexes/App/usr/bin, /usr/bin, /bin, /usr/sbin, /sbin]
[DEBUG] Parsed PATHEXT environment variable to []
[DEBUG] Injected artifact handler org.apache.maven.artifact.handler.DefaultArtifactHandler$__sisu20@6b0bba7a
[DEBUG] Detected remote repositories as [central (https://repo.maven.apache.org/maven2, default, releases), jcentral (https://jcenter.bintray.com, default, releases), github (https://maven.pkg.github.com/Spotnana-Tech/codegen, default, releases+snapshots)]
[WARNING] Error injecting: io.github.ascopes.protobufmavenplugin.mojo.MainGenerateMojo
com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) [Guice/ErrorInCustomProvider]: IllegalStateException
  at MojoExecutionScopeModule.configure(MojoExecutionScopeModule.java:50)
      \_ installed by: WireModule -> MojoExecutionScopeModule
  at TemporarySpace.<init>(TemporarySpace.java:45)
      \_ for 2nd parameter
  at UrlResourceFetcher.<init>(UrlResourceFetcher.java:65)
      \_ for 1st parameter
  at ProtocResolver.<init>(ProtocResolver.java:63)
      \_ for 5th parameter
  at ProtobufBuildOrchestrator.<init>(ProtobufBuildOrchestrator.java:71)
      \_ for 2nd parameter
  at AbstractGenerateMojo.sourceCodeGenerator(AbstractGenerateMojo.java:71)
      \_ for field sourceCodeGenerator
  while locating MainGenerateMojo

Learn more:
  https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER

1 error

======================
Full classname legend:
======================
AbstractGenerateMojo:      "io.github.ascopes.protobufmavenplugin.mojo.AbstractGenerateMojo"
MainGenerateMojo:          "io.github.ascopes.protobufmavenplugin.mojo.MainGenerateMojo"
MojoExecutionScopeModule:  "org.apache.maven.execution.scope.internal.MojoExecutionScopeModule"
ProtobufBuildOrchestrator: "io.github.ascopes.protobufmavenplugin.generation.ProtobufBuildOrchestrator"
ProtocResolver:            "io.github.ascopes.protobufmavenplugin.protoc.ProtocResolver"
TemporarySpace:            "io.github.ascopes.protobufmavenplugin.utils.TemporarySpace"
UrlResourceFetcher:        "io.github.ascopes.protobufmavenplugin.dependencies.UrlResourceFetcher"
WireModule:                "org.eclipse.sisu.wire.WireModule"
========================
End of classname legend:
========================

    at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:251)
    at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1104)
    at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1139)
    at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:50)
    at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:86)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
    at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:67)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:109)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:124)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:62)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
    at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1101)
    at org.eclipse.sisu.inject.Guice4$2.get (Guice4.java:235)
    at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:83)
    at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:53)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:265)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:257)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:491)
    at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.restoreProject (BuildCacheMojosExecutionStrategy.java:277)
    at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute (BuildCacheMojosExecutionStrategy.java:136)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:193)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:180)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:539)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
    at java.lang.Thread.run (Thread.java:833)
Caused by: java.lang.IllegalStateException
    at org.apache.maven.execution.scope.internal.MojoExecutionScope$1.get (MojoExecutionScope.java:43)
    at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:86)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
    at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:67)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:109)
    at org.eclipse.sisu.bean.BeanScheduler$CycleActivator.onProvision (BeanScheduler.java:232)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:117)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:62)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get (ProviderToInternalFactoryAdapter.java:40)
    at org.apache.maven.execution.scope.internal.MojoExecutionScope$2.get (MojoExecutionScope.java:112)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get (InternalFactoryToProviderAdapter.java:45)
    at com.google.inject.internal.SingleParameterInjector.inject (SingleParameterInjector.java:40)
    at com.google.inject.internal.SingleParameterInjector.getAll (SingleParameterInjector.java:60)
    at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:113)
    at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:33)
    at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:98)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:109)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:124)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:93)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:300)
    at com.google.inject.internal.SingleParameterInjector.inject (SingleParameterInjector.java:40)
    at com.google.inject.internal.SingleParameterInjector.getAll (SingleParameterInjector.java:60)
    at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:113)
    at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:33)
    at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:98)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:109)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:124)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:93)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:300)
    at com.google.inject.internal.SingleParameterInjector.inject (SingleParameterInjector.java:40)
    at com.google.inject.internal.SingleParameterInjector.getAll (SingleParameterInjector.java:60)
    at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:113)
    at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:33)
    at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:98)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:109)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:124)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:93)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:300)
    at com.google.inject.internal.SingleParameterInjector.inject (SingleParameterInjector.java:40)
    at com.google.inject.internal.SingleParameterInjector.getAll (SingleParameterInjector.java:60)
    at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:113)
    at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:33)
    at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:98)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:109)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:124)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:93)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:300)
    at com.google.inject.internal.SingleFieldInjector.inject (SingleFieldInjector.java:50)
    at com.google.inject.internal.MembersInjectorImpl.injectMembers (MembersInjectorImpl.java:146)
    at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:124)
    at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:33)
    at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:98)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:109)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:124)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:93)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:300)
    at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1101)
    at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1139)
    at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:50)
    at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:86)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
    at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:67)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:109)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:124)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:62)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
    at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1101)
    at org.eclipse.sisu.inject.Guice4$2.get (Guice4.java:235)
    at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:83)
    at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:53)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:265)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:257)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:491)
    at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.restoreProject (BuildCacheMojosExecutionStrategy.java:277)
    at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute (BuildCacheMojosExecutionStrategy.java:136)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:193)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:180)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:539)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
    at java.lang.Thread.run (Thread.java:833)

Operating system

macOS

JDK version

21

Maven version

3.9.9

Plugin version

2.7.0

Protoc version

3.24.0

Additional details

See #470 for the initial discussion.

See https://issues.apache.org/jira/browse/MBUILDCACHE-110 for the JIRA raised with Apache.

Would you like to contribute a bugfix?

  • Yes, I'd like to contribute a bugfix!
@ascopes ascopes added bug Something isn't working help needed Issues that need additional help from the community or subject experts. labels Nov 26, 2024
@ascopes ascopes self-assigned this Nov 26, 2024
@ascopes
Copy link
Owner Author

ascopes commented Nov 26, 2024

This appears to possibly be a bug in the Maven Build Cache plugin. @debraj-manna since you found this initially... would it be possible to raise this on that project as well on their issue tracker? Happy to work with them to find the cause of this but I do not have experience using that extension.

@debraj-manna
Copy link

I have raised the below issue.

https://issues.apache.org/jira/browse/MBUILDCACHE-110

@ascopes
Copy link
Owner Author

ascopes commented Nov 26, 2024

Thanks!

@ascopes ascopes removed the bug Something isn't working label Nov 30, 2024
@ascopes ascopes changed the title [Bug]: Dependency on Plexus Utils in some configurations Dependency on Plexus Utils when using Maven Cache extension Nov 30, 2024
@zoujiaqing

This comment was marked as off-topic.

@ascopes
Copy link
Owner Author

ascopes commented Nov 30, 2024

@zoujiaqing protocArtifact isn't an option in this plugin. Not sure this relates to this problem though?

@zoujiaqing
Copy link

Sorry!
I misunderstood!
This project doesn't have that problem.

@cstamas
Copy link
Contributor

cstamas commented Jan 15, 2025

Reported as https://issues.apache.org/jira/browse/MBUILDCACHE-115 IMHO this has nothing to do with plexus-utils. What made you think it is about plexus-utils?

@ascopes
Copy link
Owner Author

ascopes commented Jan 15, 2025

From the initial discussion at #470, seems that adding plexus-utils as a dependency resolves the issue in this case, or at the very least hides it.

Thanks for raising the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help needed Issues that need additional help from the community or subject experts.
Projects
None yet
Development

No branches or pull requests

4 participants