[英]Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp
I am getting the above error message when I try and create a simple maven project. 当我尝试创建一个简单的maven项目时,我收到上述错误消息。 I have exhausted the previous suggestions, eg Window > Preferences > Maven > Archetypes > Add Remote Catalog... and adding this as the catalog file: http://repo1.maven.org/maven2/archetype-catalog.xml 我已经用尽了之前的建议,例如Window> Preferences> Maven> Archetypes> Add Remote Catalog ...并将其添加为目录文件: http : //repo1.maven.org/maven2/archetype-catalog.xml
When I click verify it says this is empty. 当我点击确认它说这是空的。
I have also tried deleting the maven repository in the .m2 directory with no reward. 我还尝试删除.m2目录中的maven存储库而没有任何奖励。
My complete error is this: 我的完整错误是这样的:
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 (C:\Users\USER_ID\.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 (C:\Users\USER_ID\.m2\repository)
The maven-metadata.xml file is in the correct place (I think) but I'm not entirely sure if it is the right file contents, what should go in this file? maven-metadata.xml文件位于正确的位置(我认为),但我不完全确定它是否是正确的文件内容,该文件应该包含哪些内容?
I have also tried deleting and changing the settings.xml file in terms of both content and location, again with this repeated, infuriating message. 我还尝试在内容和位置方面删除和更改settings.xml文件,再次使用这个重复的,令人愤怒的消息。
After some research on the same issue I have found that one of the solutions found was to follow these steps: 经过对同一问题的一些研究后,我发现其中一个解决方案是遵循以下步骤:
Open Window > Preferences 打开窗口>首选项
Open Maven > Archetypes 打开Maven> Archetypes
Click 'Add Remote Catalog' and add the following: 单击“添加远程目录”并添加以下内容:
Hope this is of some use to you. 希望这对你有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.