简体   繁体   English

无法解析原型org.apache.maven.archetypes:maven-archetype-webapp

[英]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.

相关问题 org.apache.maven.archetype.exception.ArchetypeGenerationFailure - org.apache.maven.archetype.exception.ArchetypeGenerationFailure 向Maven原型添加属性值 - Adding property values to a maven archetype Maven无法找到我的自定义maven原型 - Maven can not find my custom maven archetype 在 maven 原型的 archetype-post-generate.groovy 脚本中使用 XmlParser - Using XmlParser in archetype-post-generate.groovy script for maven archetype 如何在Maven原型XML中调用Java方法 - How to call Java methods in Maven archetype XML 自定义Maven Archetype或项目生成的替代方案 - Custom Maven Archetype or alternatives to project generation 我在 Intellij 中为 maven 创建了一个自定义原型,但想删除它 - I created a custom archetype for maven in Intellij, but want to delete it 错误“在当前项目和插件组中找不到前缀‘原型’的插件”在创建新的 java maven 项目中 - Error "No plugin found for prefix 'archetype' in the current project and in the plugin groups" getting in creating new java maven project 如何修复'创建maven项目时找不到前缀'archetype'错误的插件 - How to fix 'No plugin found for prefix 'archetype' error when creating a maven project tomcat7-maven-plugin log4j:找不到记录器的附加程序(org.apache.catalina.startup.Catalina) - tomcat7-maven-plugin log4j: no appender could be found for logger (org.apache.catalina.startup.Catalina)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM