mac 下maven工程报错

eclipes是mac版本,java 12 启动后,创建maven工程。报错。错误如下CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-compiler-plugin:jar:3.1 -> org.codehaus.plexus:plexus-container-default:jar:1.5.5 -> org.apache.xbean:xbean-reflect:jar:3.4: ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.xbean:xbean-reflect:jar:3.4: ArtifactResolutionException: Failure to transfer org.apache.xbean:xbean-reflect:pom:3.4 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.xbean:xbean-reflect:pom:3.4 from/to central (https://repo.maven.apache.org/maven2): connect timed out

在terminal终端执行下面命令

find /Users/liudawei/.m2/repository -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;

进入eclipse,修改pom.xml.随便删除一行,再将原来的内容拷贝回来,保存。启动重新编译即可。

我的操作是,重启eclispe,然后在做上面的操作

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

友情链接更多精彩内容