时间:2021-05-20
1. 异常现象
从 Intellij IDEA 2017.1 版本升级到当前最新版本Intellij IDEA 2019.2.2 之后,打开原有的项目时出现异常:
14:42 Unable to import Maven project
See logs for details
Show Log in Explorer
Intellij IDEA 异常日志:
2019-09-19 14:54:44,349 [2556395] ERROR - #org.jetbrains.idea.maven - IntelliJ IDEA 2019.2.2 Build #IU-192.6603.28
2019-09-19 14:54:44,349 [2556395] ERROR - #org.jetbrains.idea.maven - JDK: 11.0.3; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2019-09-19 14:54:44,349 [2556395] ERROR - #org.jetbrains.idea.maven - OS: Windows 10
2019-09-19 14:54:44,352 [2556398] ERROR - #org.jetbrains.idea.maven - Last Action: Maven.ShowSettings
2019-09-19 14:55:06,491 [2578537] 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.PathTranslator
for 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.UrlNormalizer
for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source)
at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)
2 errors
java.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.PathTranslator
for 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.UrlNormalizer
for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source)
at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)
2 errors
at 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)
2. 排查分析
升级前的 Maven 版本是Apache Maven 3.5.0,升级后版本是Apache Maven 3.6.2:
1)确认 conf\settings.xml 有无问题。
2)Maven 新老版本兼容有问题:
3. 解决方案
下载并使用Maven 3.6.1 与Intellij IDEA 2019.2.2 搭配。重新打开原有项目,问题解决。
Maven 库地址:https://archive.apache.org/dist/maven/maven-3/
到此这篇关于IDEA 2019.2.2配置Maven3.6.2打开Maven项目出现 Unable to import Maven project的问题的文章就介绍到这了,更多相关IDEA 配置Maven出错内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
IDEA配置maven环境一、配置maven本地环境先参照以下博客进行maven的安装,配置IDEA如何搭建maven安装、下载、配置(图文)使用Intelli
前提系统安装jdk1.8及以上,配置好maven的ide(这里用idea进行演示,maven版本3.5,配置阿里云源)项目搭建新建一个maven项目,创建最简单
idea2019.2.2中,导入新的maven项目后,在mavenproject中只有LifeCycle,没有Dependencies和Plugins的解决方法
每次导入一个新的Project项目的时候已经配置好的maven被还原为默认状态如果idea的版本比较老的话看到的是这样的然后再修改Maven配置就可以了2.在创
今天用androidstudio3.0打开项目时发现一直在谷歌的maven仓库加载卡到这不动了,看了下maven仓库的配置发现:buildscript{repo