无法构建ODL sdn控制器代码。

时间:2016-06-17 09:23:26

标签: sdn opendaylight

我已使用

下载了代码
git clone https://git.opendaylight.org/gerrit/p/integration/distribution.git

当我尝试构建它时,它会显示以下错误。

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.opendaylight.integration:root:0.5.0-SNAPSHOT: Could not find artifact org.opendaylight.odlparent:odlparent:pom:1.7.0-SNAPSHOT and 'parent.relativePath' points at no local POM @ line 4, column 11
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project org.opendaylight.integration:root:0.5.0-SNAPSHOT (/home/controller/distribution/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.opendaylight.integration:root:0.5.0-SNAPSHOT: Could not find artifact org.opendaylight.odlparent:odlparent:pom:1.7.0-SNAPSHOT and 'parent.relativePath' points at no local POM @ line 4, column 11 -> [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

2 个答案:

答案 0 :(得分:0)

您需要make sure your settings.xml points to the OpenDaylight Nexus artifact repository。最简单的方法是下载https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml并将其放在~/.m2文件夹中(无论在哪里 - 这取决于您的操作系统)。

答案 1 :(得分:0)

是的,您的settings.xml应该更新。另一种更新方式(尽管结果如上):

从终端运行:
cp -n ~/.m2/settings.xml{,.orig} ; \wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml

正如stephen所建议的,路径可能因您的操作系统而异。相应地改变它。