当我尝试更新Maven依赖项时,我收到类似错误 - 无法计算构建计划:null 。起初我曾经得到像
这样的错误无法计算构建计划:无法传输org.apache.maven.plugins:来自http://repo1.maven.org/maven2的maven-surefire-plugin:pom:2.7.1被缓存在本地存储库中,解析不会重新尝试,直到中心的更新间隔已经过去或强制更新。原始错误:无法传输工件org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from / to central(http://repo1.maven.org/maven2):ConnectException < / p>
但是,当我更改settings.xml文件并在settings.xml中添加了存储库和插件存储库时,如
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
<snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
</repository>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
<snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
</pluginRepository>
之前的错误已被删除,但现在我收到以下错误:无法计算构建计划:null 如何摆脱这个错误!!以及如何摆脱这个警告
不会导出或发布类路径条目org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER。可能会导致运行时ClassNotFoundExceptions 。我试图快速解决它,但每当我重新打开项目时它再次出现。任何帮助将不胜感激。
答案 0 :(得分:0)
我能够通过在config中的settings.xml文件中启用代理来解决此问题。首先通过在settings.xml文件中添加repository
和pluginRepository
来尝试不同的解决方案,如上面的问题所述。但实际问题在于代理配置。我已尝试过@akb在maven in 5 min not working给出的解决方案。解决方案#1因为我的组织的代理设置没有自动配置,所以解决方案对我来说很有效。只需在settings.xml中包含以下数据并执行mvn clean,并更新它所依赖的依赖项。
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>webproxy</host>
<port>8080</port>
<username>proxyuser</username>
<password>proxypass</password>
</proxy>
</proxies>