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

Compatibility with Maven 4.x #330

Open
jorsol opened this issue Dec 12, 2022 · 7 comments
Open

Compatibility with Maven 4.x #330

jorsol opened this issue Dec 12, 2022 · 7 comments

Comments

@jorsol
Copy link
Contributor

jorsol commented Dec 12, 2022

Running a project with Apache Maven 4.0.0-alpha-3 gives the following error:

[WARNING] ClassRealm[plugin>org.codehaus.mojo:flatten-maven-plugin:1.3.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@659e0bfd]
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) [Guice/MissingImplementation]: No implementation for ModelBuilderThreadSafetyWorkaround annotated with interface TypeArguments$Implicit was bound.

Did you mean?
    ModelBuilderThreadSafetyWorkaround bound at LocatorWiring

Requested by:
1  : LocatorWiring

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

1 error

======================
Full classname legend:
======================
LocatorWiring:                      "org.eclipse.sisu.wire.LocatorWiring"
ModelBuilderThreadSafetyWorkaround: "org.codehaus.mojo.flatten.ModelBuilderThreadSafetyWorkaround"
TypeArguments$Implicit:             "org.eclipse.sisu.inject.TypeArguments$Implicit"
========================
End of classname legend:
========================

    at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist (Errors.java:576)
    at com.google.inject.internal.InternalInjectorCreator.initializeStatically (InternalInjectorCreator.java:163)
    at com.google.inject.internal.InternalInjectorCreator.build (InternalInjectorCreator.java:110)
    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.discoverComponents (DefaultPlexusContainer.java:460)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.discoverPluginComponents (DefaultMavenPluginManager.java:421)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm (DefaultMavenPluginManager.java:403)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.lambda$setupPluginRealm$2 (DefaultMavenPluginManager.java:351)
    at org.apache.maven.plugin.DefaultPluginRealmCache.lambda$get$0 (DefaultPluginRealmCache.java:156)
    at java.util.concurrent.ConcurrentHashMap.computeIfAbsent (ConcurrentHashMap.java:1708)
    at org.apache.maven.plugin.DefaultPluginRealmCache.get (DefaultPluginRealmCache.java:154)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm (DefaultMavenPluginManager.java:350)
    at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm (DefaultBuildPluginManager.java:206)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:103)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:334)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:322)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:172)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:160)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:37)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:106)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:74)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:58)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:130)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:304)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:226)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:151)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:854)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:281)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:197)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[DEBUG] Loading mojo org.codehaus.mojo:flatten-maven-plugin:1.3.0:flatten from plugin realm ClassRealm[plugin>org.codehaus.mojo:flatten-maven-plugin:1.3.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@659e0bfd]
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Reactor Summary for Aggregator 2.1-SNAPSHOT:
[INFO] 
[INFO] Project ................................................................................... FAILURE [  0.404 s]
[INFO] (RFC 3454) ................................................................................ SKIPPED
[INFO] (RFC 4013) ................................................................................ SKIPPED
[INFO] (RFC 3491) ................................................................................ SKIPPED
[INFO] Aggregator ................................................................................ SKIPPED
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time:  1.130 s
[INFO] Finished at: 2022-12-13T12:17:14+01:00
[INFO] --------------------------------------------------------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:flatten-maven-plugin:1.3.0:flatten (flatten) on project parent: Execution flatten of goal org.codehaus.mojo:flatten-maven-plugin:1.3.0:flatten failed: Unable to load the mojo 'flatten' (or one of its required components) from the plugin 'org.codehaus.mojo:flatten-maven-plugin:1.3.0': java.util.NoSuchElementException
[ERROR]       role: org.apache.maven.plugin.Mojo
[ERROR]   roleHint: org.codehaus.mojo:flatten-maven-plugin:1.3.0:flatten
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:flatten-maven-plugin:1.3.0:flatten (flatten) on project parent: Execution flatten of goal org.codehaus.mojo:flatten-maven-plugin:1.3.0:flatten failed: Unable to load the mojo 'flatten' (or one of its required components) from the plugin 'org.codehaus.mojo:flatten-maven-plugin:1.3.0'
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:339)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:322)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:172)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:160)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:37)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:106)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:74)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:58)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:130)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:304)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:226)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:151)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:854)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:281)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:197)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution flatten of goal org.codehaus.mojo:flatten-maven-plugin:1.3.0:flatten failed: Unable to load the mojo 'flatten' (or one of its required components) from the plugin 'org.codehaus.mojo:flatten-maven-plugin:1.3.0'
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:152)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:334)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:322)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:172)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:160)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:37)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:106)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:74)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:58)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:130)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:304)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:226)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:151)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:854)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:281)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:197)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginContainerException: Unable to load the mojo 'flatten' (or one of its required components) from the plugin 'org.codehaus.mojo:flatten-maven-plugin:1.3.0'
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:531)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:130)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:334)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:322)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:172)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:160)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:37)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:106)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:74)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:58)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:130)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:304)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:226)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:151)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:854)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:281)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:197)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
      role: org.apache.maven.plugin.Mojo
  roleHint: org.codehaus.mojo:flatten-maven-plugin:1.3.0:flatten
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:267)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:497)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:130)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:334)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:322)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:172)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:160)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:37)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:106)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:74)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:58)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:130)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:304)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:226)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:151)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:854)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:281)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:197)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.util.NoSuchElementException
    at org.eclipse.sisu.plexus.RealmFilteredBeans$FilteredItr.next (RealmFilteredBeans.java:118)
    at org.eclipse.sisu.plexus.RealmFilteredBeans$FilteredItr.next (RealmFilteredBeans.java:1)
    at org.eclipse.sisu.plexus.DefaultPlexusBeans$Itr.next (DefaultPlexusBeans.java:76)
    at org.eclipse.sisu.plexus.DefaultPlexusBeans$Itr.next (DefaultPlexusBeans.java:1)
    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:497)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:130)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:334)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:322)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:172)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:160)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:37)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:106)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:74)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:58)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:130)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:304)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:226)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:151)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:854)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:281)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:197)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR] 
@selckin
Copy link

selckin commented Dec 13, 2022

Hit the same error testing maven alpha, can try to make a minimal project to reproduces if needed

@olamy
Copy link
Member

olamy commented Dec 20, 2022

Maven core issue https://issues.apache.org/jira/browse/MNG-7642

@slawekjaranowski
Copy link
Member

Maven 4.0.0-alpha-5

Execution default of goal org.codehaus.mojo:flatten-maven-plugin:1.4.1-SNAPSHOT:flatten failed: 
An API incompatibility was encountered while executing org.codehaus.mojo:flatten-maven-plugin:1.4.1-SNAPSHOT:flatten: 
java.lang.AbstractMethodError: Receiver class org.codehaus.mojo.flatten.model.resolution.FlattenModelResolver does not define or inherit an implementation of the resolved method 'abstract org.apache.maven.model.building.ModelSource resolveModel(org.apache.maven.model.Dependency)' of interface org.apache.maven.model.resolution.ModelResolver.

@slawekjaranowski
Copy link
Member

After #351 - only a few test are failed with 4.0.0-alpha-5

  • flatten-shaded-drp/pom.xml
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.3.0:shade (shade) on project flatten-shaded-drp: 
Execution shade of goal org.apache.maven.plugins:maven-shade-plugin:3.3.0:shade 
failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-shade-plugin:3.3.0:shade: java.lang.NoSuchMethodError: 'java.lang.Object org.apache.maven.model.Model.getReports()'
  • complete-multimodule-parent-pom-cifriendly/pom.xml

    • cifriendly in dependency from parent
  • legacy-property-support/pom.xml

    • project name with property
  • resolve-properties-ci/pom.xml

    • cifriendly in dependency version
  • resolve-properties-ci-do-not-interpolate-profile-activation-file/pom.xml

    • cifriendly in profile activation
  • issue-348-repository-from-project/pom.xml

Unrecognised tag: 'goals' (position: START_TAG seen ...</version>\n        <goals>... @77:16)  @ io.netty:netty-bom:4.1.84.Final

  at org.apache.maven.model.building.DefaultModelProblemCollector.newModelBuildingException (DefaultModelProblemCollector.java:176)
    at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:937)
    at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:664)
    at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:645)
    at org.codehaus.mojo.flatten.ModelBuilderThreadSafetyWorkaround.build (ModelBuilderThreadSafetyWorkaround.java:132)
  • complete-multimodule-parent-pom-direct-dependencies/pom.xml

I only list failed tests - without more investigation

But I confirm generally is working with Maven 4

@slawekjaranowski
Copy link
Member

flatten-shaded-drp fixed in #355

@ammachado
Copy link

Running mvn clean install -Dquickly (using Maven 4.0.0-alpha-5) on Apache Camel (https://github.com/apache/camel/tree/c57398568f9db0c7ec6bb5eb2b0964bb8a5c8794) gives:

Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.stream()" because "dependencies" is null
    at org.apache.maven.model.ModelBase.setDependencies (ModelBase.java:164)
    at org.codehaus.mojo.flatten.FlattenMojo.createCleanPom (FlattenMojo.java:686)
    at org.codehaus.mojo.flatten.FlattenMojo.createFlattenedPom (FlattenMojo.java:554)
    at org.codehaus.mojo.flatten.FlattenMojo.execute (FlattenMojo.java:406)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:143)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:336)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:324)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:77)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:114)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:60)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:132)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:313)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:228)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:153)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:865)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:284)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:201)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Works fine on Maven 3.9.2.

@slawekjaranowski
Copy link
Member

@ammachado can you extract a simple project which reproduce your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants