问题描述
我正在尝试编译项目https://github.com/spring-cloud/spring-cloud-aws
,但是父项目引用了flatten-maven-plugin
,因此出现错误。
如果此插件是公共的,我不确定为什么会出现以下错误。我无法摆脱这个插件。我在git项目上打开了一张票,但因为它可能无法收集到任何答案。
Error resolving version for plugin 'org.codehaus.mojo:flatten-maven-plugin' from the repositories [local (C:\Users\ranajit.jana\.m2\repository),central (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository pom.xml /spring-cloud-aws-**** line 1 Maven pom Loading Problem
我要进行一些更改时正在编译此代码。
任何人都知道该怎么办?
============================
现在已解决。
这是回购问题,插件回购指向无法解析此插件的repo1.maven.apache.org/maven2。
我必须添加以下内容来解决此问题。 这被添加为一个附加的插件仓库
<pluginRepository>
<id>maven-plugin-repo-mvn</id>
<name>Maven plugin repo maven</name>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
解决方法
打开.m2 /存储库,然后转到路径 org / codehaus / mojo / flatten-maven-plugin/。。在那里删除子目录的版本号。以及所有包含的文件。 Maven将在下次需要它们时自动下载它们。