I created a project using Spring Initializr.
When I open it in IntelliJ I see this error in the build:
java.lang.RuntimeException: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com.google.inject.ProvisionException: Unable to provision, see the following errors:
- Error injecting constructor, java.lang.NoSuchMethodError: org.apache.maven.model.validation.DefaultModelValidator: method 'void ()' not found at org.jetbrains.idea.maven.server.embedder.CustomModelValidator.(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
I also noticed if I try to add a run configuration no main class is found. What could be wrong here?
Tried
./mvnw spring-boot:run
and it worked fine but running it in IDE fails. IntelliJ by default uses the Maven wrapper to load the project.
Therefore there are two temporary solutions:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With