解决maven3.6版本不兼容idea2017问题

idea报错

#org.jetbrains.idea.maven - IntelliJ IDEA 2017.3.2 Build #IU-173.4127.27
2019-07-24 19:47:21,019 [2456584] ERROR - #org.jetbrains.idea.maven - JDK: 1.8.0_152-release
2019-07-24 19:47:21,019 [2456584] ERROR - #org.jetbrains.idea.maven - VM: OpenJDK 64-Bit Server VM
2019-07-24 19:47:21,019 [2456584] ERROR - #org.jetbrains.idea.maven - Vendor: JetBrains s.r.o
2019-07-24 19:47:21,019 [2456584] ERROR - #org.jetbrains.idea.maven - OS: Windows 10
2019-07-24 19:47:21,019 [2456584] ERROR - #org.jetbrains.idea.maven - Last Action: Maven.Reimport
2019-07-24 19:47:21,640 [2457205] ERROR - #org.jetbrains.idea.maven - org.eclipse.aether.internal.impl.DefaultArtifactResolver.setLoggerFactory(Lorg/eclipse/aether/spi/log/LoggerFactory;)Lorg/eclipse/aether/internal/impl/DefaultArtifactResolver;
java.lang.NoSuchMethodError: org.eclipse.aether.internal.impl.DefaultArtifactResolver.setLoggerFactory(Lorg/eclipse/aether/spi/log/LoggerFactory;)Lorg/eclipse/aether/internal/impl/DefaultArtifactResolver;

 

只是idea的一个人人都知道的bug,只需要加入这个maven依赖就可以             解决maven导包问题



<!--解决maven3.6版本不兼容idea2017问题-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>

包导入成功后运行时如果报错

ClassNotFoundException org slf4j impl StaticLoggerBinder

说明你的版本不对,我的版本适合包里面版本一样的



posted @ 2019-07-24 20:22  cd/Bornfortechnology  阅读(8008)  评论(2编辑  收藏  举报