为什么mvn clean install -U不能正常工作:不可解析的父POM

时间:2016-02-05 16:34:25

标签: maven

我已从github克隆the repository并发出mvn clean install -U但由于某种原因我得到了:

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.github.gwtmaterialdesign:gwt-material-addins:[unknown-version]: Could not find artifact com.github.gwtmaterialdesign:gwt-material-parent:pom:1.5.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 3, column 13
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.github.gwtmaterialdesign:gwt-material-addins:[unknown-version] (E:\java\gwt-material\gwt-material-addins\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.github.gwtmaterialdesign:gwt-material-addins:[unknown-version]: Could not find artifact com.github.gwtmaterialdesign:gwt-material-parent:pom:1.5.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 3, column 13 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

如何解决此错误?我实际上想要更新我的本地存储库,因为有一个我依赖的更新。我不记得我是如何在第一时间安装依赖项的,但当时我没有得到这个错误。错误甚至在我身边吗?

1 个答案:

答案 0 :(得分:0)

那里不是很棒的设计。您收到此错误是因为gwt-material-addins依赖于gwt-material-parent的SNAPSHOT版本,但该工件未部署在任何存储库中(在SNAPSHOT版本中)。

因此,您需要首先克隆并安装gwt-material。这将在正确的SNAPSHOT版本中安装gwt-material-parent,然后您就可以构建gwt-material-addins

回顾一下:

  • 克隆https://github.com/GwtMaterialDesign/gwt-material
  • mvn clean install
  • 上运行gwt-material
  • 然后在mvn clean install上运行gwt-material-addins