2015-06-17 39 views
0

我收到以下错误,我不知道为什么。我已经在多个环境中建立了自己的项目,但我从未遇到过任何问题,但是最近我已经将该项目添加到运行Windows 8并且设置正确的所有环境(例如Maven ...)的环境中,并且我似乎正在收到此问题Maven错误:无法计算构建计划

Multiple annotations found at this line: 
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (execution: default-compile, phase: compile) 
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (execution: default-testCompile, phase: test-compile) 
    - CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read 
    artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-compiler- 
    plugin:pom:2.5.1 from/to central (http://repo.maven.apache.org/maven2): Address family not supported by protocol family: connect 
    - CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read 
    artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 
    from http://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.plugins:maven-compiler-plugin:pom:2.5.1 from/to central (http://repo.maven.apache.org/maven2): Address family not supported 
    by protocol family: connect 

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 

我已经看过这个网上,并试图下面列出来尝试解决这个问题,但他们都不工作了许多不同的事情。只是要注意我没有使用任何代理

  • 删除存储库的.m2,Maven的 - >更新项目...
  • 删除所有.lastUpdated文件时,Maven - >更新项目...
  • 尝试选择“强制更新快照/版本“更新项目时

有没有人有任何其他想法,我可以尝试?

+0

首先尝试在命令行上构建项目,而不是在Eclipse内部....除此之外。这个“Address family not supported ...”似乎是一个网络/防火墙问题...... – khmarbaise

回答

0

它似乎是你的项目不安装所需的依赖项。 因此您需要自行安装。

下载从Maven仓库两个罐子和POM文件并且使用命令安装它(优于复制到直接在文件夹中)

mvn install:install-file -Dfile=<path-to-file> -DpomFile=<path-to-pomfile> 

,并确保已安装所有必要的库为项目和交叉验证与jar文件

+0

即使您可以尝试使用rm -rf手动清除.m2/repository /文件夹,然后重建项目。希望这对你有用。祝你好运。 –

0

在Eclipse中.m2/repository文件夹,转到Windows>首选项>的Maven>用户设置

在用户设置,在现场与路径填写>%M2_HOME%\conf(或正确的路径)。

+0

Maven文档可能有助于确定'settings.xml'的路径是:https://maven.apache.org/settings.html#Quick_Overview –