我安装了maven 3.3.3并且安装成功了。
然而,在尝试在eclipse中创建maven项目时,我收到以下错误
'Creating maven-archtype-quickstart' has encountered a problem
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
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. 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. 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
我已经使用/不使用用户名密码将代理详细信息添加到我的settings.xml(从我的浏览器获取)
<proxies>
<proxy>
<id>462603</id>
<active>true</active>
<protocol>http</protocol>
<username>com\462603</username>
<password>xxxxxxxx</password>
<host>proxy.company.com</host>
<port>6050</port>
<nonProxyHosts>10.*|*.company.com</nonProxyHosts>
</proxy>
</proxies>
我在Eclipse-&gt; Windows-&gt; Preferences-&gt; Maven-&gt;用户设置
中列出了这个settings.xml还在Eclipse中添加了archtype http://repo1.maven.org/maven2/archetype-catalog.xml - &gt; Windows-&gt; Preferences-&gt; Maven-&gt; Archtype
除此之外,错误仍然存在
我知道有很多这样的重复问题,但所有提到的解决方案都没有用
答案 0 :(得分:0)
保持连接到互联网,
步骤1:-删除.m2文件夹
第2步:-打开Eclipse,然后单击Window-> Preferences
第3步:-将显示弹出窗口,单击Maven->原型
步骤4:-单击“添加远程目录”
第5步:-输入数据
CATALOG FILE = https://repo1.maven.org/maven2/archetype-catalog.xml
DESCRIPTION = maven_catalog
步骤6:-单击“验证”,在验证后单击“确定”。