Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE: Failed to resolve version for org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE: Could not find metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml in local (D:\vamre\shixunke\maven\resporsitory\resporsitory)
插件org.apache.maven.plugins:maven-archetype-plugin:RELEASE或其依赖项无法解决:无法读取org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE:的工件描述符,无法解析org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE:版本,无法在本地(D:\vamre\shixunke\maven\resporsitory\resporsitory)中找到元数据org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml
根据您提供的错误信息,看起来是 Maven 没有能够找到 org.apache.maven.plugins:maven-archetype-plugin:RELEASE 的元数据文件。这可能是由以下原因之一造成的:
本地 Maven 存储库中缺少相关依赖项:您可以通过手动在本地 Maven 存储库中添加缺少的依赖项来解决该问题。请尝试在命令行中使用以下命令:mvn install:install-file -Dfile=path/to/your-dependency.jar -DgroupId=your.groupId -DartifactId=your.artifactId -Dversion=your.version -Dpackaging=jar
。需要将以上信息替换为您正在添加的依赖项的实际信息。
Maven 中央仓库找不到相关依赖项:默认情况下,Maven 使用中央仓库中的依赖项。如果中央仓库中没有找到所需的依赖项,Maven 将无法解析此依赖项。此时,您可以指定其他仓库中的具体依赖关系。例如,您可以手动配置 settings.xml 文件并添加一个新的远程仓库。
依赖项版本号错误:如果您在 pom.xml 文件中使用的依赖项版本号不正确,则 Maven 可能无法找到该依赖项。您可以尝试使用正确的版本号来解决此问题。
希望这些信息能帮助您解决问题。如果您需要更多的帮助,请提供更详细的错误信息,以便我们可以更好地帮助您解决问题。
不知道你这个问题是否已经解决, 如果还没有解决的话:最近在学习JAvaWeb,在第一次使用IDEA(以前没用过)创建maven项目时,老是创建不成功,文件残缺,下面是错误提示。
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.282 s
[INFO] Finished at: 2019-01-05T18:29:17+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE: Failed to resolve version for org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE: Could not find metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml in local (E:\apache-maven-3.6.0\repository) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
[ERROR] Maven execution terminated abnormally (exit code 1)
这个错误着实让我头疼,在网上找了大量的解决办法一直不奏效,最后自己慢慢摸索出来了一个解决办法,原理不是很明确,但是确实解决了我这个问题,所以记录下来与大家分享,希望能帮助有需要的人。
一、
首先打开maven解压目录下的conf文件夹里的setting.xml,在其中添加如下仓库位置和插件下载url(因为默认的是在国外,在这里我们改成阿里云的国内镜像)
<localRepository>E:\apache-maven-3.6.0\repository</localRepository>
这个仓库路径是你自己选的,需要存在这个路径(我是直接在maven的解压文件夹里创建了一个repository)
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
添加阿里云的国内镜像地址。
保存之后退出。
二、
在IDEA中依次按照路径file-setting找到maven配置选项(如下图),将如下两项修改:第一项修改为maven解压目录下的conf文件夹里的setting.xml,第二项会自动读取setting.xml文件里的仓库地址(如果未自动读取,检查下自己是否写错了),也可以手动更改。更改完成之后点击Apply-OK。
之后重启IDEA,新建maven项目,就可以发现上面的错误不见啦。
可以开心地跟IDEA玩耍啦~~~
如果有问题欢迎与我交流。