无法解析 org.apache.maven.archetypes 的版本 [英] Failed to resolve version for org.apache.maven.archetypes

查看:18
本文介绍了无法解析 org.apache.maven.archetypes 的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的本地机器上配置了 maven3.0.3.已经安装了 m2e eclipse 插件.但是当我尝试使用 maven-archetype-webapp 创建一个新的 maven 项目时,我得到以下异常.

I have configured maven3.0.3 in my local machine. Have installed m2e eclipse plugin. But when i try to create a new maven project using maven-archetype-webapp, i get the following exception.

 Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE    from any of the configured repositories.
 Could not resolve artifact org.apache.maven.archetypes:maven-archetype- webapp:pom:RELEASE
 Failed to resolve version for org.apache.maven.archetypes:maven-archetype- webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype- webapp/maven-metadata.xml in local ([HOME]/.m2/repository)
 Failed to resolve version for org.apache.maven.archetypes:maven-archetype-  webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-  webapp/maven-metadata.xml in local ([HOME]/.m2/repository)

我在代理后面做了一些处理,代理配置在 {HOME}/.m2/settings.xml 和 M2_HOME/conf/settings.xml 中更新.

I do some processing behind a proxy and the proxy configurations are updated in {HOME}/.m2/settings.xml and M2_HOME/conf/settings.xml.

原型生成命令在命令行中工作正常.它通过代理下载依赖项.

The archetype generate command works fine in command line. It downloaded the dependencies through proxy.

非常感谢任何帮助.

编辑 05-10-2012在eclipse中新建Maven Web项目时,原型maven-archetype-webapp"版本显示为RELEASE.这是有联系的吗?

Edit 05-10-2012 While creating a new Maven Web project in eclipse, the archetype "maven-archetype-webapp" version is displayed as RELEASE. Is this in anyway linked?

推荐答案

我遇到了同样的问题.我通过添加 maven 原型目录来修复它蚀.步骤如下:

I had the same problem. I fixed it by adding the maven archetype catalog to eclipse. Steps are provided below:

  1. 打开窗口>首选项
  2. 打开 Maven > 原型
  3. 点击添加远程目录"并添加以下内容:

这篇关于无法解析 org.apache.maven.archetypes 的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆