AI智能
改变未来

关于Maven3.62 Unable to import maven project: See logs for details (不能导入包问题)

折腾了半天,原来是我Maven3.062 不兼容IDEA版本2019.2

顺便总结一下 出现 Unable to import maven project: See logs for details 可能的原因

1.看下idea是否配置好你下载的Maven版本

没有修改之前,默认是这样的

修改本地Maven后

记住点击确认保存后不要重启Idea,保存直接创建一个新项目,这里用当前窗口(如果你保存后关闭idea再打开它还是选择默认的)

2.setting.xml配置文件有地方错了,认真检查下

目录例:D:\\apache-maven-3.6.2\\conf.setting.xml

<mirror><id>alimaven</id><mirrorOf>central</mirrorOf><name>aliyun maven</name><url>http://maven.aliyun.com/nexus/content/groups/public/</url></mirror>

3.检查本地仓库配置

<localRepository>D:\\apache-maven-3.6.0\\repo</localRepository>

4.2019.2版本不兼容Maven3.62,后来换了Maven3.60秒解决(这是我出现的问题)

总结

出现这类问题得自己会查看日志文件,看报错(虽然是英文看不懂借助翻译)
打开了日志,Help>>show Log in Explorer或者直接点这里

2020-07-18 17:16:32,543 [ 586283]  ERROR -      #org.jetbrains.idea.maven - IntelliJ IDEA 2019.2  Build #IU-192.5728.982020-07-18 17:16:32,543 [ 586283]  ERROR -      #org.jetbrains.idea.maven - JDK: 11.0.3; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o2020-07-18 17:16:32,543 [ 586283]  ERROR -      #org.jetbrains.idea.maven - OS: Windows 72020-07-18 17:16:32,551 [ 586291]  ERROR -      #org.jetbrains.idea.maven - Last Action: Maven.Reimport2020-07-18 17:16:32,576 [ 586316]  ERROR -      #org.jetbrains.idea.maven - com.google.inject.CreationException: Unable to create injector, see the following errors:1) No implementation for org.apache.maven.model.path.PathTranslator was bound.while locating org.apache.maven.model.path.PathTranslatorfor field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source)at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)2) No implementation for org.apache.maven.model.path.UrlNormalizer was bound.while locating org.apache.maven.model.path.UrlNormalizerfor field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source)at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)2 errorsjava.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see the following errors:1) No implementation for org.apache.maven.model.path.PathTranslator was bound.while locating org.apache.maven.model.path.PathTranslatorfor field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source)at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)2) No implementation for org.apache.maven.model.path.UrlNormalizer was bound.while locating org.apache.maven.model.path.UrlNormalizerfor field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source)at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)2 errorsat com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543)at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:159)at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)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.addComponent(DefaultPlexusContainer.java:344)at org.codehaus.plexus.DefaultPlexusContainer.addComponent(DefaultPlexusContainer.java:332)at org.jetbrains.idea.maven.server.Maven3XServerEmbedder.customizeComponents(Maven3XServerEmbedder.java:573)at org.jetbrains.idea.maven.server.Maven3XServerEmbedder.customize(Maven3XServerEmbedder.java:542)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
赞(0) 打赏
未经允许不得转载:爱站程序员基地 » 关于Maven3.62 Unable to import maven project: See logs for details (不能导入包问题)