maven与idea版本不匹配解决

https://blog.csdn.net/weixin_40633275/article/details/102686611

今天整理c盘发现快要爆满 了,于是想把maven仓库迁移到其他盘

至于怎么更改,网上很多教程,这里就不详细说明了

遇到下面问题

maven与idea版本不匹配解决_第1张图片

 按照提示去查看log日志

maven与idea版本不匹配解决_第2张图片

 

2019-10-22 16:52:08,646 [ 161168]  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)

maven与idea版本不匹配解决_第3张图片

将上面的两行扔到stackoverflow上面去就找到

maven与idea版本不匹配解决_第4张图片

 大概意思就是Maven和Intellij IDEA的版本对不上

 此时我的IDEA版本时2018.2.4的

在Apache Maven官网上找到比我的IDEA要老的maven版本

maven与idea版本不匹配解决_第5张图片

 在maven网站上下载3.5.2的版本

 

 maven与idea版本不匹配解决_第6张图片

 解压后配置环境

maven与idea版本不匹配解决_第7张图片

 在IDEA中配置好就可以导入maven包啦

参考:https://stackoverflow.com/questions/57842143/idea-unable-import-maven-project?r=SearchResults

你可能感兴趣的:(maven)