我开始为opendaylight开发控制器项目,我使用 eclipse安装程序高级模式方式(教程链接:https://github.com/vorburger/opendaylight-eclipse-setup)进行安装已经与opendaylight控制器项目的日食。因此,当我尝试运行mvn clean install时,我收到错误:
当我转到org.opendaylight.controller.dsbenchmark的pom.xml时,我注意到pom定义了yang-data-impl依赖项(groupId和ArtifactId标签),但是没有版本标签,不过我是我试图插入一个版本标签(使用 2.0.0-SNAPSHOT ),但创建此标签会在其他项目中生成错误( org.opendaylight.controller.benchmark-aggregator 的项目并且还生成另一个错误,指出无法找到版本( 2.0.0-SNAPSHOT )(缺失工件org.opendaylight.yang:yang-data-impl:jar:2.0.0 -SNAPSHOT )。
我是opendaylight控制器系统的新手,我不知道我要做什么版本或什么,所以有人可以解释我做错了什么或我需要阅读什么来学习如何解决这个问题?
*对不起英语,我不会流利
*我之前遇到错误,依赖项丢失,但我已手动修复所有这些错误(逐个安装所有依赖项)
*现在这是我唯一的错误
pom.xml在这里:
<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: --><!--
Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
<version>0.12.0-SNAPSHOT</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opendaylight.controller</groupId>
<artifactId>dsbenchmark</artifactId>
<version>1.5.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>mdsal-artifacts</artifactId>
<version>1.7.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>benchmark-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-api</artifactId>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-core-api</artifactId>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-data-impl</artifactId>
</dependency>
<dependency> <!-- ERROR HERE!!!! -->
<groupId>org.opendaylight.yang</groupId>
<artifactId>yang-data-impl</artifactId>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.jacoco</groupId>
<artifactId>
jacoco-maven-plugin
</artifactId>
<versionRange>
[0.7.2.201409121644,)
</versionRange>
<goals>
<goal>prepare-agent</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
答案 0 :(得分:0)
您是否阅读了ODL Eclipse Setup FAQ,并尝试了所有提示?
例如,自动配置从http://nexus.opendaylight.org下载工件所需的自定义Maven settings.xml,但这是您第一次需要重新启动Eclipse一次。)
不要触摸任何pom.xml - 它应该只是开箱即用,因为在ODL CI中所有这些项目(如controller / benchmark / chbenchmark)当然都可以正常构建。
Eclipse中的所有项目是红色还是只有一些?