我遇到了集成的maven eclipse插件(m2e)的问题。我正在使用eclipse氧气和maven 3.5.2。 Eclipse不会下载项目的pom.xml中声明的任何依赖项,也不构建任何项目。但是,如果我通过控制台命令构建项目,它正在正常工作!
首先我认为这是代理问题,但我在eclipse中配置了代理:
我还尝试更改" Active Provider"但没有任何效果。
接下来的尝试是将代理信息放在maven settings.xml中,即使这样做也没有。
我的settings.xml看起来像这样:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
<id>msgProxy</id>
<active>true</active>
<protocol>http</protocol>
<host>i.do.not.tell.you</host>
<port>1234</port>
<nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
</proxy>
</proxies>
<profiles/>
</settings>
eclipse maven安装Dialoge,看起来像这样:
如果我尝试从原型创建新的Maven项目,则会显示以下错误消息:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-
webapp:1.0 from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-
webapp:pom:1.0
Failure to transfer org.apache.maven.archetypes:maven-archetype-
webapp:pom:1.0 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-
webapp:pom:1.0 from/to central (https://repo.maven.apache.org/maven2):
connect timed out
Failure to transfer org.apache.maven.archetypes:maven-archetype-
webapp:pom:1.0 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-
webapp:pom:1.0 from/to central (https://repo.maven.apache.org/maven2):
connect timed out
如果我开始更新项目,似乎maven需要永远下载一些东西......
你有什么建议留给我吗?如果是的话,我会非常感激。
提前致谢。
答案 0 :(得分:0)
我发现了问题。 我们公司有自己的联系。所以,我将存储库添加到我的settings.xml中...... 问题解决了,谢谢你的帮助