【发布时间】:2019-05-11 11:12:29
【问题描述】:
我有一个关于 Carbon 版本的 hello-world ODL 项目。我将 POM 依赖项更改为公共存储库中的最新版本,现在我在编译“impl”项目时遇到了错误:
cannot access org.opendaylight.yangtools.yang.binding.RpcOutput [ERROR] class file for org.opendaylight.yangtools.yang.binding.RpcOutput not found
这是由于 'api' 项目中的 yang 工具生成的源。源包含“RpcOutput”的导入,但“impl”项目没有找到它。
我将“api”项目中的 POM 更改为 Carbon,它工作正常。
我的“api”项目的 POM 是
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
<!--<version>0.10.4-Carbon</version>--> <--this works-->
<version>4.0.1</version> <--this fails-->
<relativePath/>
</parent>
版本 4.0.1 和 3.0.6 失败 - org.opendaylight.mdsal.binding-parent 项目中最新版本的 ODL 和 yang 工具有什么变化?
在简单的“impl”项目中编译失败:
public class HelloWorldImpl implements HelloService{
@Override
public ListenableFuture<RpcResult<HelloWorldOutput>> helloWorld(HelloWorldInput input) {
HelloWorldOutputBuilder hout = new HelloWorldOutputBuilder();
hout.setGreeting("hello" + input.getName());
return RpcResultBuilder.success(hout.build()).buildFuture();
}
}
失败并出现“未找到 org.opendaylight.yangtools.yang.binding.RpcOutput 的类文件”错误。
“impl”项目 pom 是
<parent>
<groupId>org.opendaylight.controller</groupId>
<artifactId>config-parent</artifactId>
<!--<version>0.6.4-Carbon</version>--><!--this was the old working-->
<version>0.8.4</version> <!--this is also the latest ver-->
<relativePath/>
</parent>
主要的pom是
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent</artifactId>
<!--<version>1.8.4-Carbon</version>--><!--this was old working ver-->
<version>5.0.0</version> <!--this is also the latest ver-->
<relativePath/>
</parent>
【问题讨论】:
标签: opendaylight ietf-netmod-yang