Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 编译出错可能的解决方法

版权声明:在本博客所发表的文章,均为ybcwjj作品。对未经许可擅自使用者,本人保留追究其法律责任的权利。 https://blog.csdn.net/yinbaicheng/article/details/81945073

日食中新建的Maven项目后报如下错误:

CoreException:无法获取参数compilerId的值,用于插件执行default-compile:PluginResolutionException:插件org.apache.maven.plugins:maven-compiler-plugin:3.1或其中一个依赖项无法解析:无法收集依赖项org.apache.maven.plugins:maven-compiler-plugin:jar:3.1 - > org.codehaus.plexus:plexus-compiler-api:jar:2.2 - > org.codehaus.plexus:plexus-utils:jar:3.0。 8:ArtifactDescriptorException:无法读取org.codehaus.plexus的工件描述符:plexus-utils:jar:3.0.8:UnresolvableModelException:无法从https://repo.maven传输org.codehaus.plexus:plexus:pom:3.2 .apache.org / maven2缓存在本地存储库中,在中心的更新间隔过去或强制更新之前,不会重新尝试解析。原始错误:无法传输工件组织。

解决方法 

网上查了好久试了好几种方法,都没能解决,

后来发现是因为,setting.xml中的<localRepository> D:\ LOCAL_MVN_REPOSITORY </ localRepository>路径被我破坏,

然后直接修改一个新的目录:<localRepository> D:\ eclipse_local_maven </ localRepository>上面报错信息立即消失。

猜你喜欢

转载自blog.csdn.net/yinbaicheng/article/details/81945073