Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while importing Springboot 2.7 projects in intellij Idea with maven 3.8.5

when Using start.spring.io projects generated with springboot 2.7 comes with MavenProject 3.8.5 which when imported in intellij causes an error that is quite difficult to debug or not self speaking by itself.

The error

java.lang.RuntimeException: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error injecting constructor, java.lang.NoSuchMethodError: org.apache.maven.model.validation.DefaultModelValidator: method 'void <init>()' not found
  at org.jetbrains.idea.maven.server.embedder.CustomModelValidator.<init>(Unknown Source)
  while locating org.jetbrains.idea.maven.server.embedder.CustomModelValidator
  at ClassRealm[maven.ext, parent: ClassRealm[plexus.core, parent: null]] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
  while locating org.apache.maven.model.validation.ModelValidator annotated with @com.google.inject.name.Named(value="ide")

1 error
      role: org.apache.maven.model.validation.ModelValidator
  roleHint: ide
like image 888
Austine Gwa Avatar asked Sep 12 '25 13:09

Austine Gwa


2 Answers

Under Intellij File > Setting > Build Execution... > Build tools > Maven > Maven home path just point to your maven directory: enter image description here

Apply and reload project.

like image 110
Pines Tran Avatar answered Sep 14 '25 04:09

Pines Tran


That should have been fixed in 2022.1 in the scope of this bug

Please update your IDE

like image 38
Konstantin Annikov Avatar answered Sep 14 '25 03:09

Konstantin Annikov