Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6561

New RepositorySystem implementation as replacement of deprecated from maven-compat

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      Create a component that will replace org.apache.maven.repository.RepositorySystem implementation from maven-compat module to keep backward compatibility with Maven 2.x plugins.

      While testing MNG-5995 and with deleted maven-compat.jar - a compilation of basic project failed with error:

       

      [INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ my-app ---
      [WARNING] Error injecting: org.apache.maven.plugin.compiler.CompilerMojo
      com.google.inject.ProvisionException: Unable to provision, see the following errors:
      
      1) No implementation for org.apache.maven.repository.RepositorySystem was bound.
      while locating org.apache.maven.plugin.compiler.CompilerMojo
      
      1 error
      at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:226)
      at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
      at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
      at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
      at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
      at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
      at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
      at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
      at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
      at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
      at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
      at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
      at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
      at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
      at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
      at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
      at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
      at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
      at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
      
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project my-app: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile failed: Unable to load the mojo 'compile' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-compiler-plugin:3.8.0': com.google.inject.ProvisionException: Unable to provision, see the following errors:
      [ERROR]
      [ERROR] 1) No implementation for c was bound.
      [ERROR] while locating org.apache.maven.plugin.compiler.CompilerMojo
      [ERROR] at ClassRealm[plugin>org.apache.maven.plugins:maven-compiler-plugin:3.8.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@6e5e91e4] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
      [ERROR] while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value="org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile")
      [ERROR]
      [ERROR] 1 error
      [ERROR] role: org.apache.maven.plugin.Mojo
      [ERROR] roleHint: org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile

      Sometimes we can change usages of org.apache.maven.repository.RepositorySystem to org.apache.maven.bridge.MavenRepositorySystem

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              slachiewicz Sylwester Lachiewicz
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: