0

嗨,我尝试克隆存储库并构建 opendaylight wiki 页面中提到的源代码。但是构建失败了。

链接:https ://wiki.opendaylight.org/view/OpenDaylight_Controller:Netconf:Testtool#Building_testtool

以下是我遵循的步骤:

  1. 从git查看最新的 netconf 存储库
  2. 进入 netconf/netconf/tools/netconf-testtool/ 文件夹
  3. 使用 mvn clean install 命令构建 testtool

构建失败并出现以下错误跟踪:

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.opendaylight.netconf:netconf-parent:1.5.0-SNAPSHOT: Could not find artifact org.opendaylight.mdsal:binding-parent:pom:0.13.0-SNAPSHOT and 'parent.relativePath' points at no local POM @ org.opendaylight.netconf:netconf-parent:1.5.0-SNAPSHOT, /home/balakrishnan/netconf_simulator/netconf/netconf/netconf-parent/pom.xml, line 11, column 11
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.opendaylight.netconf:netconf-testtool:1.5.0-SNAPSHOT (/home/balakrishnan/netconf_simulator/netconf/netconf/tools/netconf-testtool/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.opendaylight.netconf:netconf-parent:1.5.0-SNAPSHOT: Could not find artifact org.opendaylight.mdsal:binding-parent:pom:0.13.0-SNAPSHOT and 'parent.relativePath' points at no local POM @ org.opendaylight.netconf:netconf-parent:1.5.0-SNAPSHOT, /home/balakrishnan/netconf_simulator/netconf/netconf/netconf-parent/pom.xml, line 11, 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
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
4

2 回答 2

2

构建需要您的 Maven 设置不知道的工件。您需要编辑您的settings.xml文件;如果您在 Unix 风格的环境中运行:

cp -n ~/.m2/settings.xml{,.orig}
wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml

这将配置 Maven 从OpenDaylight Nexus 存储库下载 OpenDaylight 工件;然后,您将能够netconf-testtool直接构建。

于 2018-05-15T07:39:43.963 回答
0

您需要自顶向下构建整个netconf 项目(即mvn install)。

于 2018-05-14T18:55:17.073 回答