Failed to read artifact descriptor for org.apache.maven.plugins:maven-archetype-plugin:jar
1 问题描述
之前设置了nexus私服,设置了maven-conf-setting.xml的mirror为nexus的maven-central,并注释了之前设置的阿里云私服mirror,出现了这样的报错:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-archetype-plugin:jar。
接着点击maven给出的错误的解决方案:
https://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
2 可能的问题
-
You are referring to a non-existing plugin, e.g. by means of a typo in its group id, artifact id or version.
意思是 你指的是一个不存在的插件,可能你的group id、artifact或者version写错了字。 -
You are using a third-party Maven plugin that is not deployed to the central Maven repository and your POM/settings is missing the required
to download the plugin. Note that declarations are not considered when looking for the plugin and its dependencies, only are searched for plugins.
意思是 你使用的第三方Maven插件没有部署到中央Maven仓库,您的POM/设置中缺少下载该插件所需的。请注意,在寻找插件及其依赖项时,不考虑 声明,只搜索 的插件。 -
The plugin repository you have configured requires authentication and Maven failed to provide the correct credentials to the server. In this case, make sure your ${user.home}/.m2/settings.xml contains a
declaration whose matches the of the plugin repository to use. See the Maven Settings Reference for more details.
意思是 你配置的插件库需要认证,而Maven未能向服务器提供正确的凭证。
在这种情况下,请确保你的${user.home}/.m2/settings.xml包含一个声明,其 与要使用的插件仓库的 一致。更多细节请参见Maven设置参考。
${user.home}/.m2/settings.xml是默认的存储路径,一般我们都选择其他盘存放本地maven仓库,如果你设置了自己的私服,又设置了mirror,需要配置本地仓库访问私服。 -
There is a general network problem that prevents Maven from accessing any remote repository, e.g. a missing proxy configuration.
有一个普遍的网络问题使Maven无法访问任何远程仓库,例如代理配置丢失。 -
Maven failed to save the files to your local repository, see LocalRepositoryNotAccessibleException for more details.
Maven未能将文件保存到您的本地仓库,详见LocalRepositoryNotAccessibleException。 -
The plugin repository you have configured is disabled for the specific version of the plugin you requested. For instance, if you want to use a SNAPSHOT version of a plugin, make sure you don't have
configured. Likewise, in order to resolve a released version of the plugin, the plugin repository should not be configured withfalse . See the POM Reference for more information on repository configuration.false
你所配置的插件库对于你所要求的特定版本的插件是禁用的。例如,如果你想使用一个插件的SNAPSHOT版本,确保你没有配置 。同样地,为了解决插件的发布版本,插件库不应该配置false 。关于版本库配置的更多信息,请参见POM参考。false
3 根据原因解决
我觉得应该是 原因2 导致了我的这个ERROR,因为我设置了mirror为maven-central,但是里面应该是空的没有东西,当时应该没有配置nexus的Remote storage。所以我在配置里把阿里云的镜像又开了。
<mirror>
<id>alimavens</id>
<name>aliyun maven</name>
<url>https://maven.aliyun.com/repository/public</url>
<mirrorOf>central</mirrorOf>
</mirror>
问题就解决了 可以使用骨架创建了。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
· 25岁的心里话