[英]Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories
Getting Below Error while creating maven project .创建 maven 项目时出现错误。 Also, tried below options but didn't work out:另外,尝试了以下选项但没有解决:
1) Changed workspace, created new projects. 1) 改变工作区,创建新项目。
2) Added Remote Archetype catalog as http://repo1.maven.org/maven2/archetype-catalog.xml in Catalog file and Description as maven catalog 2)在目录文件中添加远程原型目录为http://repo1.maven.org/maven2/archetype-catalog.xml ,描述为maven目录
3) Deleted .m2 folder and tried to create new maven project 3)删除.m2文件夹并尝试创建新的maven项目
4) Tried to update maven project 4)尝试更新maven项目
5) I have manually added settings.xml file in .m2 folder as it is not getting created automatically. 5) 我在 .m2 文件夹中手动添加了 settings.xml 文件,因为它不是自动创建的。
I am using eclipse for mobile automation so I have updated preferences for Android and have 2 perpectives like Java and DDMS.我正在使用 eclipse 进行移动自动化,所以我更新了 Android 的首选项,并有 2 个视角,如 Java 和 DDMS。
Please help as I am struggling to create maven project.请帮助,因为我正在努力创建 Maven 项目。
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.无法从任何已配置的存储库中解析原型 org.apache.maven.archetypes:maven-archetype-quickstart:1.1。 Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.无法解析工件 org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 无法从https://repo.maven传输 org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 。 apache.org/maven2已缓存在本地存储库中,在central 的更新间隔已过或强制更新之前,不会重新尝试解析。 Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central ( https://repo.maven.apache.org/maven2 ): Connection refused: connect Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.原始错误:无法传输工件 org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central ( https://repo.maven.apache.org/maven2 ):连接被拒绝:连接失败从https://repo.maven.apache.org/maven2传输 org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 已缓存在本地存储库中,直到 central 的更新间隔才会重新尝试解析已过期或强制更新。 Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central ( https://repo.maven.apache.org/maven2 ): Connection refused: connect原始错误:无法传输工件 org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central ( https://repo.maven.apache.org/maven2 ):连接被拒绝:连接
Please follow the exact steps mentioned below: - Delete .m2 folder from the path: C:\\Users\\.请按照下面提到的具体步骤操作: - 从路径中删除 .m2 文件夹:C:\\Users\\。 - Now go to the file ->Restart - Once eclipse launched create maven project you should be able to create new maven project. - 现在转到文件 -> 重新启动 - 一旦 Eclipse 启动创建 maven 项目,您应该能够创建新的 maven 项目。
It's look like problem with server connection.看起来像是服务器连接的问题。 I have been faced the same problem yesterday and solved it by use this following mirror config:我昨天遇到了同样的问题,并通过使用以下镜像配置解决了它:
<mirror>
<name>Mirror-US</name>
<id>Central</id>
<url>http://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
Check your Setting.xml is located or not检查您的 Setting.xml 是否位于
Keep Connected to internet,保持连接到互联网,
Step 1:- Delete .m2 folder步骤 1:- 删除 .m2 文件夹
Step 2:- Open Eclipse click on Window->Preferences第 2 步:- 打开 Eclipse 单击窗口->首选项
Step 3:- Pop-Up will display , Click Maven-> Archetype第 3 步:- 将显示弹出窗口,单击 Maven-> Archetype
Step 4:- Click on "add remote catalog"第 4 步:- 点击“添加远程目录”
Step 5:- Enter the deatil第 5 步:- 输入详细信息
CATALOG FILE = https://repo1.maven.org/maven2/archetype-catalog.xml
DESCRIPTION = maven_catalog
Step 6:- Click on Verify , After the verification hit Ok .第 6 步:- 单击“验证”,验证后单击“确定”。
检查任何代理设置,如果是,则禁用它或删除 .m2 文件夹并创建 maven 项目
Adding a mirror is the right direction,but the content is添加镜像是正确的方向,但内容是
<mirror>
<name>Mirror-US</name>
<id>Central</id>
<url>https://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
you can confirm the url: https://repo1.maven.org/maven2您可以确认网址: https : //repo1.maven.org/maven2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.